1
$\begingroup$

Why are custom object properties defined by API no longer available in the Objects Custom Properties menu? Is there any way to bring them back?

Video demo: https://imgur.com/Bi3GBFC

Simple code used in demo to show the change:

import bpy
from bpy.props import IntProperty

class ModalOperator(bpy.types.Operator):
    """Custom property test"""
    bl_idname = "object.custom_prop_test"
    bl_label = "Custom prop test"

    def execute(self, context):
        context.selected_objects[0].test = 10
        return {"FINISHED"}

def menu_func(self, context):
    self.layout.operator(ModalOperator.bl_idname, \
    text=ModalOperator.bl_label)

def register():
    bpy.utils.register_class(ModalOperator)
    bpy.types.VIEW3D_MT_object.append(menu_func)
    bpy.types.Object.test = bpy.props.IntProperty(name='test prop', default=0 )

def unregister():
    bpy.utils.unregister_class(ModalOperator)
    bpy.types.VIEW3D_MT_object.remove(menu_func)
    del bpy.types.Object.x_offset


if __name__ == "__main__":
    register()
```
$\endgroup$
1
  • $\begingroup$ i cannot see any property in both versions if i run your code. Maybe you wanna try this to assign (make sure) a value exists of that property? bpy.context.active_object["test prop"] = 0 $\endgroup$
    – Chris
    Jan 20 at 6:49

1 Answer 1

2
$\begingroup$

Enable Developer Extras in Preferences > Interface > Diplay

UI: only show API defined custom properties when Developer Extras is on.

These are intended to behave just like any other builting property, so no to always show them in the Custom Properties panels for regular users.

[Link]

$\endgroup$
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .