2

I am trying to create custom property for an object of type float array.

I tried simply adding a key value pair to object as:

bpy.context.object['test_property'] = 100

There is no error, however I can't see the property in Custom Properties of Object Data Properties Panel.

I also tried following the instructions in https://blender.stackexchange.com/a/43786 Still I am not able to see the property in the UI panel.

How do I add a property to the object via python so that it's also visible in the Custom Properties panel?

Loma Harshana
  • 597
  • 2
  • 9
  • 2
    Hello ! This will create a custom property in the object property panel (orange icon). If you want to add a custom property to the object data (Green triangle icon), you'll need to access it with bpy.context.object.data['test_property'] = 100 – Gorgious Jan 02 '23 at 09:06
  • 1
    @Gorgious Thank you very much. That's what I was looking for. Could you please post the comment as the answer, so that I can accept it. – Loma Harshana Jan 05 '23 at 05:18

0 Answers0