THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 10/08/2011 at 16:43, xxxxxxxx wrote:
From what I've read so far in the documentation and on the forums, I understand that each BaseObject has a BaseContainer, which contains the attributes of that object. I thought the BaseContainer was a Python dictionary (or a subclass of it) but this doesn't seem to be the case, because it doesn't respond to dictionary methods like values() or keys().
How can I get a listing of the keys present in a given BaseContainer? I've seen some of them on the forums here (i.e. PRIM_CUBE_LEN, PRIM_CUBE_SUBX, etc.) but I can't find them anywhere in the documentation. Where should I be looking for this information?
To use a specific example, I'm trying to figure out which attributes of a MoText object I can control via Python. So I tried this:
myObject = c4d.BaseObject(1019268) doc.InsertObject(myObject) c4d.EventAdd() bc = myObject.GetDataInstance() print 'myObject keys:', bc.keys()
And got this error:
AttributeError: 'c4d.BaseContainer' object has no attribute 'keys'