Pietas
12-01-2009, 06:45 PM
In order to add audio to the main time control for a given shot, the example given is as follows:
import maya.cmds as cmds
import maya.mel
aPlayBackSliderPython = maya.mel.eval('$tmpVar=$gPlayBackSlider')
cmds.timeControl( aPlayBackSliderPython, e=True, sound='ohNo', displaySound=True )
However, if I want to do this sort of thing (set and sync the audio in the playback slider) in a command line batch process, mayapy would not recognize the ‘$gPlayBackSlider’ (it would error out with ‘"$gPlayBackSlider" is an undeclared variable.’).
Does anybody know how to add audio onto the main timeControl to a sync’d time using mayapy ?
import maya.cmds as cmds
import maya.mel
aPlayBackSliderPython = maya.mel.eval('$tmpVar=$gPlayBackSlider')
cmds.timeControl( aPlayBackSliderPython, e=True, sound='ohNo', displaySound=True )
However, if I want to do this sort of thing (set and sync the audio in the playback slider) in a command line batch process, mayapy would not recognize the ‘$gPlayBackSlider’ (it would error out with ‘"$gPlayBackSlider" is an undeclared variable.’).
Does anybody know how to add audio onto the main timeControl to a sync’d time using mayapy ?
