FORUMS: list search recent posts

animCurveEditor connection issues

COW Forums : Autodesk Maya

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Adam Benson
animCurveEditor connection issues
on Jan 20, 2015 at 5:03:55 am

Hello all,
I'm working on a tool and I'm trying to pipe scripted data into the cmds.animCurveEditor() node. I'm missing a key detail somewhere and I'm wondering if anyone has any insight.
I'm trying to get a cmds.scriptNode(n='testing', bs='SOME EQUATION'), or some equivalent, to get displayed graphically in a animation graph editor, using cmds.animCurveEditor(). Here's a test sample that I've built to strip down the idea into it's most basic function:

from maya import cmds

def testWindow():
try:
cmds.select('testScript', r=True)
cmds.delete('testScript')
except ValueError:
pass
testScriptNode = cmds.scriptNode(n='testScript', bs='sin(time)')
if cmds.window('testWindow', ex=True):
cmds.deleteUI('testWindow')
cmds.window('testWindow')
cmds.frameLayout('mainFrame', l='AnimationGraph')
if cmds.selectionConnection('thisConnection', ex=True):
cmds.deleteUI('thisConnection')
animCurveFrame = cmds.animCurveEditor(sr='on')
thisSelection = cmds.selectionConnection('testScript')
cmds.editor(animCurveFrame, e=True, selectionConnection=thisSelection)
cmds.showWindow('testWindow')

testWindow()

If anyone has any insights into this, I appreciate the help.
Adam

Adam Benson
Visual Effects Artist
http://www.SleepDeprivedProductions.com
http://www.SleepDeprivedFilms.com


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]