0
$\begingroup$

I am able to create a prop_search in my panel, but I'm unable to add the eye-dropper the select my object in the scene directly.

layout.prop_search(self, "source", context.scene, "objects", text="")
$\endgroup$
1
  • $\begingroup$ Hmm so it's only possible in blender 2.79 then? $\endgroup$
    – Bert VdB
    May 28, 2017 at 12:44

1 Answer 1

1
$\begingroup$

There is currently no native way to do it. prop_search is a generally bad idea for linking objects since it stores only the name of the object, once you change it in the outliner the reference will get lost. I am using a custom made property for that purpose which stores a pointer to the object and it has a custom made eye dropper as well. https://github.com/WowDevTools/Blender-WMO-import-export-scripts You can find it in this addon in idproperty folder. Let me know if you have any questions on how to use it. Besides, I heard they are adding proper object pointers into 2.79, so once it is out, you may consider replacing those custom properties with the official ones.

$\endgroup$

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