PDA

View Full Version : expression - order of execution? Maya


CLT
03-11-2003, 07:56 PM
Hi,

Can anyone enlighten me as to whether expressions execute in any particular order -
I seem to remember something .. about this...

I have different expressions on different joints and I find that it does`nt seem to update correctly - if I then touch enable expression menu item - the joints that are a problem jump to their proper postion -

suggesstions ?

Cheers

cavetroll
03-11-2003, 10:31 PM
in maya expressions are evaluated at every frame. that means they are executed when you update your scene like when moving the timeslider.
sometimes that causes objects only to update correctly if you do so, like in your case you turned expressions back on.
changing the execution behaviour may only be possible with particle expressions where you have both creation- and runtime-expressions.
couldn't you turn the expressions on the joints into direct connections via connEditor or the hypergraph?
just my 2 cent.
cheers, tom.

CLT
03-12-2003, 07:46 PM
Hi,

Thanks 4 your reply ... the thing is I have not turned the expression off.. refering to the menu is just to check
its updated ... I `ll outline the situation..
A spine is moving on an expression .. then a leg on another
expression and so on...
because the spine expression appears to execute last..
the leg position does not update.. because that expression has already executed.. with me?.. what I wanted to find out was
if there is order of execution I can put the spine 1st .. and
that should solve the update problem.

Hope thats clear...

cavetroll
03-12-2003, 09:18 PM
mmmhh. if I understand you correctly you ran into a situation where two expressions seem to be dependant of each other causing update problems. what about the behaviour when you scrub the timeline?
maybe you can try to put the two expressions into one and let the spine expression get evaluated first.
hope that helps,
cheers, tom.

_vine_
03-13-2003, 03:13 AM
I would be prone to suggest cavetroll's advice of combining the expressions into one.

I can't think of a situation where all of you expressions can't be joined together, especially if one is supposed to update another in the case of joints. (Unlike particles where you would deal with runtime and creation expressions).

Probably just cut and past all of them into one master expression.

I find items linked with the connection editor work a bit sluggishly (especially if lots of items are linked) since Maya has to make it's own behavior in the background, so expressions tend to work better.

I hope this helps :beer:

cavetroll
03-13-2003, 11:22 AM
Originally posted by _vine_
I
Probably just cut and past all of them into one master expression.

I find items linked with the connection editor work a bit sluggishly (especially if lots of items are linked) since Maya has to make it's own behavior in the background, so expressions tend to work better.


Keep in mind that it is not recommended to put ALL expressions into one master expression as your scene might significantly slow down because of all the calculations done.
Usually direct connections work faster within maya if they are not too complex.
Keep track of the framerate while you are working (HeadsUpDisplay Show FPS) to recognise when your rig gets too slow.
:beer: Tom.

CLT
03-13-2003, 06:44 PM
Thanx 4 your replys...

I`ll investigate options u all suggested .. I`ve tried a few things already ..but I`ll stick with it

Cheers

CGTalk Moderation
01-14-2006, 02:00 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.