Hmmm, when the scene has an object that is stored as “Cube” in the object list, you can indeeed get it like this:
ob_act = Blender.Object.Get(“Cube”)
If this doesn’t work for you, I would need some more of your script code to see what’s wrong, and also the error message.
EDIT: I just realize I might have misunderstood you. I’ll write up an example of what works for me.
EDIT2: You’re right, it doesn’t work that way. Dunno what I was thinking, sorry. allobs is a list ob Blender objects, and ar is a string, probably, so testing can’t work. We would have to test against the name of the object in the list, but that would involve more looping and will take even longer, so my try…except suggestion below should be a better approach.
i would think that this is a very slow procedure
Yes, that was my fear also. Well, another thing you could use is the try…except construct in Python:
ob_act = Blender.Object.Get(ar)
print "Object", ar, "doesn't exist"