DzPlayToggleAction - Pauses script execution

nategovannategovan Posts: 35

Hi,

I'm just using trying to trigger the timeline within a script and it appears as though the Play Pause Timeline action is synchonous in terms that it does not give control back to the script whilst the animation is running. eg:

	print('BEFORE PLAY')
	MainWindow.getActionMgr().findAction('DzPlayToggleAction').trigger()
	print('AFTER PLAY')

If you execute this script whilst the timeline is running, result = trigger() pauses the timeline and the script progresses.

If you execute this script whilst the timeline is not running, result = trigger() resumes play for the timeline but the script does not progress (eg, doesn't reach the 'after play' print). At least, this continues until the user manually stops the timeline or another script re-triggers the action.

Is this expected behavour? Is there any other way to return immediately from this method? Short of calling an external script.

 

Thanks

Post edited by nategovan on
Sign In or Register to comment.