2
$\begingroup$

I want to draw just the datablock selector button from the pointer property ui:

enter image description here

I tracked the operator down to bpy.ops.ui.eyedropper_ui, but when I draw it in a panel, the poll conditions are not met and the button is greyed out:

enter image description here

I assume that this is because the operator doesn't know which property to write the selected datablock to. I had a look at the poll function in the C++ source code:

enter image description here

And while I don't know C++ it seems to say that there needs to be an active button in the UI which it takes it's data from.

Is it possible to fake this (maybe using something like UILayout.context_pointer_set) and draw the button on its own while satisfying the poll function?

$\endgroup$

0

You must log in to answer this question.

Browse other questions tagged .