setSoundDisplay was not loaded, so better to timeControl

This commit is contained in:
Toke Jepsen 2019-07-01 18:27:31 +01:00
parent e9ee9463f1
commit bb828cb828

View file

@ -17,6 +17,11 @@ class AudioLoader(api.Loader):
sound_node = cmds.sound(
file=context["representation"]["data"]["path"], offset=start_frame
)
mel.eval("setSoundDisplay {} 1".format(sound_node))
cmds.timeControl(
mel.eval("$tmpVar=$gPlayBackSlider"),
edit=True,
sound=sound_node,
displaySound=True
)
return [sound_node]