Check State
I have a script where I need to have a check state running through every object in the selection and if any of the objects are being used as a variable then DO NOT run the script.
This is what I have so far and it is not right.
Because if 2 objects are ok and 1 is a bad object, the script still runs, it does not stop after finding the bad one.
StartObj = $Sphere005 EndObj = $Sphere001 CheckSt = false for i = 1 to selection.count do ( obj = selection[i] if (obj.name == StartObj.name or obj.name == EndObj.name)then ( CheckSt = false ) else ( CheckSt = true ) ) if CheckSt == false then ( messagebox "Make sure the reference objects are NOT selected" ) else ( --Run Scripted Function Here )
Comments
Alright
Alright I'll implement this version of it instead.
Thanks again Anubis.
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
if i see, this fn s'd be
if i see, this fn s'd be called per obj,
if so, the loop s'd be out of the fn, like...
my recent MAXScripts RSS (archive here)
Thanks
Thanks Garp,
I'll be sure to implement this.
I appreciate the help.
JokerMartini
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
Run your code 'manually'.
At the end of the loop, your ChechSt variable will have its value set according to the last object tested.
Try this instead