On 07/03/2017 at 05:47, xxxxxxxx wrote:
Hi there,
I'm a little despaired on understanding how reading out UserData works.
I found https://developers.maxon.net/docs/Cinema4DPythonSDK/html/modules/c4d/C4DAtom/GeListNode/BaseList2D/index.html#BaseList2D.GetUserDataContainer
...but if I try this...
obj = doc.GetActiveObject()
for id, data in obj.GetUserDataContainer() :
print "ReadUserData-GetName() " + obj.GetName()
print "ReadUserData-id() " + str(id)
print "ReadUserData-data() " + str(data)
...and the output is...
ReadUserData-GetName() a_NAME_1438 #1
ReadUserData-id() ((700, 5, 0), (9, 15, 0))
ReadUserData-data() <c4d.BaseContainer object at 0x1340e26f8>
...then of course I assume that the data is a c4d.BaseContainer() as in the documentation mentioned that has again some data in it.
if I try this...
for i,d in data:
print "i: "+ str(i) + " d:"+ str(d)
...this is the output...
i: 1 d:Name
i: 2 d:Name
i: 3 d:3
i: 10 d:1
i: 21 d:130
...where can I find what this 3,1,130 means (d:)?
…where is the actual text stored of the text field ("NAME_1438")?