I was writing a script this weekend and I wanted to store some information with the objects in my scene. My first thought was to use object properties so I opened Blender and the API and tried it out…
The first problem I had was that there is no documentation on how to make a property object. No Blender.Object.NewProperty(), no prop = Blender.Object.Property() etc. So I read back and forth for a while and found that Object.object.addProperty() seemed to create properties. It doesn’t return them though so you need to use obj.getProperty(‘name’) to get the actual object. Also the arguments you give to addProperty are undocumented. I looked at the source and it seems it takes one to three arguments:
obj.addProperty(property_object) -> documented
obj.addProperty(‘name’,‘type’) -> undocumented
obj.addProperty(‘name’,value,‘type’) -> undocumented
These seem to work, but I’ve had problems with some of the things I am trying to do. If anyone knows how to use object properties, or has working examples I would appreciate the help. As it is now I will just use the registry to store my data, the registry fits better for this application anyway.