DISCLAIMER: This might be a trivial matter but I hope you'll hear me out.
I'm trying to add a userdata with a dropdown list. Much like this interface in Maya (https://www.dropbox.com/s/8d7n77nb7imtnuh/c4d087_enum_list_attribute.jpg?dl=0)
I managed to do that with the help of this blog. I modified it and it works as expected but my concern is it is using a "SetString" type rather than "Brackets" type. See illustration below.
So instead of
bc[c4d.DESC_NAME] = "Name"
I would prefer the former as my previous codes are written like that.
In the code below, I inserted a
# comment line for the things that I'd like to be revised.
con = c4d.BaseObject(5181) doc.InsertObject(con) bc = c4d.GetCustomDataTypeDefault(c4d.DTYPE_LONG) bc[c4d.DESC_NAME] = "spaceSwitch" bc[c4d.DESC_CUSTOMGUI]=c4d.CUSTOMGUI_CYCLE # how to change to bracket type test = c4d.BaseContainer() test.SetString(1, "head") test.SetString(2, "chest") bc.SetContainer(c4d.DESC_CYCLE, test) # how to change to bracket type descID = con.AddUserData(bc) con[c4d.ID_USERDATA, descID.id]=1 c4d.EventAdd()
Thank you for looking at my problem.