On 19/06/2013 at 06:41, xxxxxxxx wrote:
I just have a little question:
I whant to create Userdata with Python and therefore read throu the documentation of the python sdk. After some work, I came up with this code:
pyTag = c4d.BaseTag(5612) bc = c4d.GetCustomDatatypeDefault(c4d.DTYPE_GROUP) name = "group name" myID = 100 bc[c4d.DESC_NAME] = name bc[c4d.DESC_SHORT_NAME] = name did = c4d.DescID(c4d.DescLevel(c4d.ID_USERDATA), c4d.DescLevel(myID)) did = [c4d.ID_USERDATA, myID] pyTag.SetUserDataContainer(did, bc) #A string type UD entry for this group childGrp_Item1 = c4d.GetCustomDatatypeDefault(c4d.DTYPE_STRING) name = "test" myID = 101 inhalt = "fasdfi" childGrp_Item1[c4d.DESC_NAME] = name childGrp_Item1[c4d.DESC_ANIMATE] = 0 childGrp_Item1[c4d.DESC_PARENTGROUP] = pyTag.GetUserDataContainer() did2 = c4d.DescID(c4d.DescLevel(c4d.ID_USERDATA), c4d.DescLevel(myID)) did2 = [c4d.ID_USERDATA, myID] pyTag.SetUserDataContainer(did2, childGrp_Item1)
Now I have two options, I can't change. Therefore I made this picture.
The red line means, I whant to access this option.
and the green line means, I whant to change it on this value (in this example).
normaly, the top option in the list is selectet (on the string type, it is a "normal, editable" sting. But there are also the "statig string" and the "more lines string")
So how can I access these options?
I know that there id also the command
childGrp_Item1 = c4d.GetCustomDatatypeDefault(c4d.DTYPE_STATICTEXT)
to create a static string/text. But it seems not the right one. So what command should I use?
thanks for help and have a nice day!