PDA

View Full Version : Curtain Wall script


humfrez
02-14-2006, 09:01 PM
hi all,

i just started to learn maxscript and i created this script for generating glass curtain walls from a selected polygon object.

i would like to ask anyone experienced enough to check my script for mistakes
or anything that could or should be done better
this version of the script http://janduda.yweb.sk/CurtainWall_enhanced.ms doesnt seem to accept user input from the spinners and i dont know why :(
could anyone check it and help me with this ?

the previous, http://janduda.yweb.sk/CurtainWall.ms simplier version of the script works fine.
after i run this script, the other enhanced version starts working properly.

thanks for your time.
cheers Jan.

antonv
02-14-2006, 10:43 PM
Didn't get the chance to look at your script (waiting for a render...) but from your description it seems like you have some variables that you declared as global in the first script but not in the second and once you initialize them in the first they are seen by the second.
Hope this helps!

humfrez
02-15-2006, 12:03 PM
do i need to declare variables as global ? for them to work. btw i have them declared in both versions of the script.

antonv
02-15-2006, 09:58 PM
In your enhanced script you are setting the variables to "value" instead of "yourspinner.value". You could use "yourspinner.value" in the rest of the script to avoid using extra variables because you don't need to set anything after you've changed the spinners. Their new value will be the one read.

Also try to use "selection[1]" instead of "$" for the selected object.

CGTalk Moderation
02-15-2006, 09:58 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.