Hi,
There is a code in the documentation file that allocates a new user data
Here is the code
import c4d
def AddLongDataType(obj):
if obj is None: return
bc = c4d.GetCustomDataTypeDefault(c4d.DTYPE_LONG) # Create default container
bc[c4d.DESC_NAME] = "Test" # Rename the entry
element = obj.AddUserData(bc) # Add userdata container
obj[element] = 30 # Assign a value
c4d.EventAdd() # Update
I select and object and execute the code. However, nothing happens.
Is there a way around this?
Thank you.
Edit a_block: Fixed code tags.