PDA

View Full Version : Bizzare Rollout issue...


Gibbz
06-10-2006, 12:59 PM
Ok i have this bizzare issue happening with my maxscript.
It only happens when I open my script for the first time after max loads....

i create a rollout(as a dialog), a subrollout which has more rollouts on it.

so to access these i have for example...
myMainRollout.mySubRollout.myRolloutTransforms.open

Ok now the first time i load max, then run the script and try to access anything from myMainRollout i get errors, but ONLY the first time.

example
myMainRollout.mySubRollout.rollouts[1].open
returns the error
-- Unknown property: "mySubRollout" in undefined

So i assume this is a problem with "myMainRollout", however if i put those commands in the maxscript listener the issue do not occur....

Any ideas whats goin on with this?

marktsang
06-10-2006, 04:47 PM
this sounds like a scope issue,

sounds like the rollout is out of scope
check the scope of the subrollout

mark

Gibbz
06-11-2006, 02:08 AM
cheers, making it a global worked, I dont understand why it wouldnt work the first time tho.

marktsang
06-11-2006, 03:05 PM
post the code and maybe someone can tell you why

mark

shibumenon
06-12-2006, 05:49 AM
I used to face similar problems with my scripts earlier, when I didn't take care of my variables.
When I started declaring/initializing them, the problem dissapeared.

shibu

CGTalk Moderation
06-12-2006, 05:49 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.