2
$\begingroup$

I'm trying to catch an event when an F-Curve is selected in my add-on. I've added a handler to bpy.app.handlers.depsgraph_update_post where I'm iterating through bpy.context.view_layer.depsgraph.updates, however, nothing appears to be triggered for F-Curve selections.

def selection_change_handler(scene):
    for u in bpy.context.view_layer.depsgraph.updates:
        print(u)

def register():
    bpy.app.handlers.depsgraph_update_post.append(selection_change_handler)

I was thinking that I could somehow subscribe to msgbus with bpy.msgbus.subscribe_rna, but I'm not sure if/how this would work with every FCurve in a Scene.

subscribe_to = bpy.types.FCurve.path_resolve("select", False)
#TypeError: descriptor 'path_resolve' for 'bpy_struct' objects doesn't apply to a 'str' object

I also tried adding a draw handler to the Graph Editor, but I've been unsuccessful in getting the context for this correct with a multiple file add-on. https://blender.stackexchange.com/a/76020/81083

Can anyone tell me how I can listen for F-Curve selection updates? Thank you!

$\endgroup$
2
  • 1
    $\begingroup$ i did some research on this for a day. apparently it is not possible. $\endgroup$ Jul 6, 2022 at 8:45
  • 1
    $\begingroup$ @HarryMcKenzie Thank you for your efforts! $\endgroup$ Jul 6, 2022 at 22:16

0

You must log in to answer this question.

Browse other questions tagged .