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
)
By
Comments (4)
Comment policy
Alright I'll implement this version of it instead.
Thanks again Anubis.
if i see, this fn s'd be called per obj,
if so, the loop s'd be out of the fn, like...
Thanks Garp,
I'll be sure to implement this.
I appreciate the help.
JokerMartini
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