On 11/03/2016 at 16:31, xxxxxxxx wrote:
I'm trying to create a tag plugin that accesses all properties of an object, list them in the plugin interface, and alter their values with various code multipliers. I'm able to get the property types, but am unable to update an object property. Here is what I have so far:
for bc, paramid, groupid in description: # Iterate over the parameters of the description
if bc[c4d.DESC_NAME] and bc[c4d.DESC_IDENT] and prop == True:
theType = bc[c4d.DESC_IDENT]
theType = str(theType)
type2 = "c4d." + str(theType)
doc.SendInfo(c4d.MSG_DOCUMENTINFO_TYPE_LOAD, c4d.FORMAT_C4DIMPORT, "", None, False)
if bc[c4d.DESC_NAME] == "Size":
print op[c4d.PRIM_CUBE_LEN]
print type2
print op[type2]
The output with the tag on a default cube gives me:
Vector(200, 200, 200)
c4d.PRIM_CUBE_LEN
IndexError: Invalid key type.