How Can I Query A Graph Editor?

Hi all

Just wondering how I can query what objects and curves are currently being displayed in a graph editor window?

hi jarod

all selected objects are shown in the graph editor window. if an object has animCurves connected these are additionally displayed.
you can querry the name of the different anim curve nodes with the keyframe command.

CODE
keyframe -q -name nameOfYourControler;

hi malacay

thankyou for your reply.

It is true that I can use the "ls -sl;" command to find which objects are selected. But I don't think I've explained myself fully...

I would like to find explicity which objects are in loaded in the graph editor. If the "auto load selected" option is not acitve then objects in the graph editor are not always the currently selected ones.

Furthermore I need to be able to find which curves are highlighted in the grapheditor outliner.

Basically I'm trying to create a smarter "framing" script for the graph editor

does that make sense?

hmmm...

just doing some more investigation... it seems that the selectionConnection might be used to do this. however I can't seem to get it to return an array of the highlighted animcurves...

any suggestions?

hi

now i might understand what you want to do...

so there is a command which i think will help you a lot - the "animCurveEditor".
find it in the maya help to get all the usefull flags.

so but be carefull when you call the graphEditor window. it must be called like this:

string $shownAnimCurves[] = animCurveEditor -q -cs [b]graphEditor1GraphEd[/b];
print $shownAnimCurves;

hope this helps

greetz malacay

hey

that's exactly what I need!

thanks mate!

sorry I wasn't as precise as I should have been initially.

yay

Alrighty!

I have got my script working perfectly in maya 7.0! yay.

however the -cs flag doesn't exist in 6.5

In v 7.0 this works...

string $shownAnimCurves[] = animCurveEditor -q -cs graphEditor1GraphEd;

Any suggestions?