When I add a property to an object using this code:
bpy.types.Object.TestA = bpy.props.FloatProperty(name=“FLOAT VALUE”,min=-9999.9,max=9999.9,default=0.0)
and then use: bpy.types.Object.TestA
It returns:
(<built-in function FloatProperty>, {‘default’: 0.0, ‘max’: 9999.9, ‘name’: ‘FLOAT VALUE’, ‘attr’: ‘Test4’, ‘min’: -9999.9})
BUT, when I use: bpy.context.object.TestA
It evaluates the code and returns an actual number. This is great, but the weird thing is that when I try to store a property in a shapekey, it will not evaluate the property no matter how I try to access it.
When I use:
bpy.types.ShapeKey.TestB = bpy.props.FloatProperty(name=“FLOAT VALUE”,min=-9999.9,max=9999.9,default=0.0)
and then access in the console with: bpy.types.ShapeKey.TestB
It returns: (<built-in function FloatProperty>, {‘default’: 0.0, ‘max’: 9999.9, ‘name’: ‘FLOAT VALUE’, ‘min’: -9999.9})
Which is the same as with the Object. Naturally, I figured that if I accessed the value using its context, it would evaluate to a number. So I used this code:
bpy.context.object.active_shape_key.TestB
but what returned was the same:
(<built-in function FloatProperty>, {‘default’: 0.0, ‘max’: 9999.9, ‘name’: ‘FLOAT VALUE’, ‘min’: -9999.9})
I really need a solution to this problem…
EDIT:
Okay, so it looks like everything I create within bpy.types.ShapeKey becomes read only. When I create properties within bpy.types.Object it can be edited. This is going to be difficult to work around if not impossible without recompiling everything in C.