Page 1 of 1

How to get Empty's name for linked library?

Posted: Fri May 15, 2009 4:20 pm
by grzybu
Hi,

I wonder how to get empty's name in case of linked library objects in python?
I have i.e. mesh object list but if I check object.name then I have many object with the same name if they use the same library or just have the same name in different libraries. I need unique names of those object and best I think will be just add empty's name to object.name.
Then I'll be sure I have unique name of object.

Posted: Fri May 15, 2009 11:50 pm
by jesterKing
The name together with the path to the linked library already is unique.

If you want to, you could also use UUIDs you generate yourself and put them in custom properties.

/Nathan

Posted: Mon May 18, 2009 9:14 am
by grzybu
jesterKing wrote:The name together with the path to the linked library already is unique.

If you want to, you could also use UUIDs you generate yourself and put them in custom properties.

/Nathan
The problem I have is when I link some group, and I have there object called i.e. Cube, then each instance of this group contains object named Cube.
This is what I get with object.name. Also object.lib value is the same for each object, because they are instances of the same group. So I have multiple objects with the same combination of object.lib and object.name.
But each instance is child of an Empty. And if I can somehow find Empty's name then I'll have unique id of object.
UUID generation is good idea but not such straight forward in case you want to modify scene in blender and then reexport it. Then you don't see properties in 3d window.
Knowing Empty's name is all what I need.