View Full Version : expression not updating

07 July 2007, 10:21 PM
I have the following script that uses a poly sphere translation to control the emitter rate..

vector $spherePos = `xform -q -ws -t pSphere1`;

if ($spherePos.y < 0) {
setAttr sparkEmit1.rate 100;
else if ($spherePos.x > 20) {
setAttr sparkEmit1.rate 1000;
else {
setAttr sparkEmit1.rate 0;

seems to work fine but it doesnt update while the timeslider is going unless I hit 'edit' in the expression editor. Is it because of the setAttr commands?

08 August 2007, 12:35 AM
this expression works for me and evaluates each frame as expected. Even setting the the expression to evaluate "on demand" still works.

with maya closed try renaming your prefs folder then launching maya so you get defaults and try again?

08 August 2007, 01:22 AM
thanks for your reply harmless, you are right, i closed my session and reopened Maya, now everything is fine :)

CGTalk Moderation
08 August 2007, 01:22 AM
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.