If I have a property like bpy.types.Object.thing = BoolProperty()
how would I go about removing it? I have tried del bpy.context.object.thing
and bpy.context.object.remove("thing")
and del bpy.context.object["thing"]
. Do I just have to create a new object with this objects data? Or is there a way to delete them?
$\begingroup$
$\endgroup$
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
0
Your first command adds a new property to bpy.types.Object
as in your altering the base class used for all objects. The next steps you are trying to remove a custom property from an individual object instance.
To add and remove a property from all objects -
bpy.types.Object.thing = bpy.props.BoolProperty()
del bpy.types.Object.thing