2
$\begingroup$

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?

$\endgroup$
4
$\begingroup$

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
$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.