detect which attribute is currently selected in graph editor?

57 views
Skip to first unread message

Darwin Giordano

unread,
Feb 11, 2023, 5:11:44 PM2/11/23
to Python Programming for Autodesk Maya
Isn't there a way in real time that selecting in the graph editor an attribute detects that the attribute is selected and if the user selects another attribute from the graph editor it detects that the selected attribute is changed to a different one?
This without selecting animation keys. I just want to be able to detect which attribute is currently selected in graph editor.
Message has been deleted

TTw TTa

unread,
Feb 17, 2023, 4:24:09 AM2/17/23
to Python Programming for Autodesk Maya
``` python
from maya import cmds

editor_name = "graphEditor1"
editor_outline_name = editor_name + "OutlineEd"


print(cmds.outlinerEditor(editor_outline_name, q = 1, exists = 1))
objects = cmds.outlinerEditor(editor_outline_name, q = 1, selectionConnection = 1)

print(cmds.selectionConnection(objects, q = 1, object = 1))

```
this is the code may what your need

Darwin Giordano

unread,
Feb 19, 2023, 12:33:50 PM2/19/23
to Python Programming for Autodesk Maya
Thank you very much for the answer  TTw TTa  ! I will keep in mind the method you suggest.
In the end I went another way.
callback_id = OpenMayaAnim.MAnimMessage.addAnimKeyframeEditedCallback(my_keyframe_callback, None)
Reply all
Reply to author
Forward
0 new messages