Using EvalDeferred commands in sequence

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  10 October 2005
Using EvalDeferred commands in sequence

I am trying to do a script where I wanna use several eval deffered command in sequence to run several differet scripts. Trick is that they have to happen in the correct order.

sending the commands like this gets inconsistant results:

evalDeferred $cmd1;
evalDeferred $cmd2;
evalDeferred $cmd3;
evalDeferred $cmd4;

It usually ends up running the commands in this order.


which is not what I would expect. Is there anyway to make sure these all run in the correct order that I sent the commands in?

Charles R. Anderson
Lead Animator/Character TD
Airtight Games
  10 October 2005

You might want to try wrapping your sequence of a command in a procedure, then executing that procedure.

global proc cmds()
 global proc stuff()
 	 // Do some stuff

or alternatively, you can build a semicolon list of sequential commands, and then execute them:

global proc stuff()
	 evalDeferred($cmd1 + ";" + $cmd2 + ";" + etc);

or you could probably get away with using just eval statements. Those usually behave pretty well and execute in order. I find myself very rarely having to use evalDeferred.
  10 October 2005
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 06:10 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.