Hi Lidia,

I am using the following and it seems to work reliably for me for the main
graph editor view. (In fact I am using pm.animView(), but my quick test
works with cmds as well.)

mc.animView(
    'graphEditor1GraphEd',
    startTime = 10,
    endTime = 100,
    minValue = -20,
    maxValue = 2000,
    )

And then to fill in those 4 numbers, I am querying the animation values and
frame numbers of the animCurves I'm interested in. Is that enough to go on?
I have a simple framing tool I can post where I frame selected curves or
keyframes and then add an addition padding buffer around the 4 edges.

Chris


On Tue, Nov 10, 2015 at 1:50 AM, Lidia Martinez <[email protected]>
wrote:

> I must add, I had a little more success creating a window with no border
> and no title, parenting the graphEditor on it, and then using the window to
> focus on it.
> Using the windowName + graphEd string would give me the right item to
> focus on... but anyway, not really the way I want to do it...
>
> --
> Lidia
>
> 2015-11-10 19:47 GMT+13:00 Lidia Martinez <[email protected]>:
>
>> I want to show the the contents of a curve node on the main graphEditor ,
>> like when we use F hotkey.
>>
>> I found a FAQ article about executing the FrameAll; command on the script
>> editor. Just what I needed...except that it was for Maya 2.5....
>>
>> http://ewertb.soundlinker.com/mel/mel.041.php
>>
>>
>> But that code doesn´t work for me. The final step, doesn´t. Focusing on
>> the +graphEd item, works... but not always.
>> At the end what I did makes sense though...
>>
>> sceds = mc.getPanel(scriptType="graphEditor")
>>
>> for sce in sceds:
>>         lbl = mc.scriptedPanel(sce, q=True, label=True)
>>         if lbl == "Graph Editor":   # The main graph editor not the tear
>> off
>>                 mc.select("curveName")
>>                 mc.setFocus(sce+"graphEd") # Necessary?
>>                 mc.animCurveEditor(sce+"graphEd",e=1, lookAt="select")
>>
>>
>> The last line is basically what  fitPanel  script does for Graph Editor,
>> if you show all commands when pressing F on it, you see fitPanel and then
>> FrameAll executed.
>>
>> But FrameAll ... i can´t find any .mel file over there to see the
>> contents. I think that´s the piece left...
>>
>>
>> Anybody, ideas?  Graph editor is tricky. I just want to press F there
>> programatically.
>>
>>
>>
>> --
>> Lidia
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAAB1%3D8ykp%2B-o%2B2-02CmRhWEkMt8DZpnAtxRwBOyFb7%3Dn2Y62%2BQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAAB1%3D8ykp%2B-o%2B2-02CmRhWEkMt8DZpnAtxRwBOyFb7%3Dn2Y62%2BQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAHUba0LRTe7rQU4AdjSMtdWTuUrWRXfCCn9QBTZSH-u6OSQRhA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to