1

Is it possible to have python callbacks invoked when a user does something like select an object, bone, vertex, etc...?

For example, imagine a FK/IK setup where clicking on certain bones trigger the FK/IK switch and other necessary modifications. This isn't precisely what I'm trying to do but it should get the point across.

Chuck
  • 1,090
  • 1
  • 11
  • 25
  • 2
    Try a search on msgbus – batFINGER Mar 05 '21 at 15:17
  • 1
    Interesting. Looks like it lets you know about changes to datablocks. Not sure object selection qualifies. I tried some experiments to see if I could register interest in bpy.context.selected_objects but couldn't get my callback to be invoked. Maybe I need an example. – Chuck Mar 05 '21 at 15:35
  • 3
    Not sure msgbus works with context. The other one to look at is a depsgraph update handler which runs a lot. or just remembered this one https://blender.stackexchange.com/questions/160909/handle-vertex-property-changes-with-msgbus-subscribe-rna – batFINGER Mar 05 '21 at 15:39

0 Answers0