0
$\begingroup$

I can’t figure out how to add listeners to dropdowns in UI panels.

I copied some example of dropdown to select an Action:

# picker dropdown to pick Pose library
if bpy.context.object.animation_data is not None:
     self.layout.prop(bpy.context.object.animation_data, "action")

So far I've had to create a button/operator, clicking this button will update UI List view to match dropdown selected Pose Library.

But I’d like to get some method to listen to selection from this drop down.

When user selects pose library A, I’ll show a list containing all the poses from library A and so on.

Any help/links appreciated!

$\endgroup$
  • $\begingroup$ You can check the selection in the panel's draw function and display the poses accordingly. $\endgroup$ – Robert Gützkow Oct 24 '19 at 20:53
  • $\begingroup$ Thanks. Will try that. $\endgroup$ – ezez Oct 28 '19 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.