PDA

View Full Version : adding sound using mayapy


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 ?

CGTalk Moderation
12-01-2009, 06:45 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.