Outcome
Draw a custom property already stored on a Blender Object, Pose Bone, Scene, or another Blender data block as an editable PME control.
Use a Custom item and pass the real data owner plus the bracket-form property identifier to L.prop().
Object example
For a custom property named my_control on the active object:
obj = C.active_object; L.prop(obj, '["my_control"]', text="Control") if obj and "my_control" in obj else L.label(text="Control unavailable")This draws the real Blender property, so there is no second PME-owned value to synchronize.
Pose Bone example
Suppose Copy Data Path gives you a path ending in:
pose.bones["hand.L"]["fingers_grasp"]Separate the owner from the property identifier:
bone = C.object and C.object.pose and C.object.pose.bones.get("hand.L"); L.prop(bone, '["fingers_grasp"]', text="Fingers") if bone and "fingers_grasp" in bone else L.label(text="Fingers unavailable")Steps
- Confirm the custom property exists on the intended Object, Bone, Scene, or other owner.
- Use Copy Data Path or the Python Console to identify that owner.
- Add a Custom item to the Pie Menu, Popup Dialog, or Panel Group.
- Call
L.prop(owner, '["property_name"]'). - Guard both the owner and the property so the layout remains usable with another selection.
- Edit the value through PME and confirm the original Blender custom property changes.
Blender property or PME Property?
- Use this direct
L.prop()pattern when the value already belongs to Blender data, a rig, or another add-on. - Use PME’s Property Editor when PME should own a reusable preference or option for several menus and Macros.
Keeping that ownership clear prevents two controls from drifting apart.
Pitfalls
- Split the copied data path into the owner and the
'["name"]'identifier expected byL.prop(). - A Pose Bone property requires the correct armature and bone. Guard the lookup before drawing it.
- Guard multi-object layouts because selected objects may have different custom properties.
- A property provided by another add-on can disappear when that add-on is disabled or changes its data model.
- Complex logic belongs in an external script; keep a Custom layout item focused on drawing controls.
Related answers
- Create a PME-owned Property Editor slider
- Read and write PME-owned Properties with props()
- Guard object-specific Custom controls