I'm a student that is just stumped by what seems a simple assignment. I simply need to write a script that will parse a given scene and delete anything that is NOT a box. I can accurately determine if something isn't a box with:
for i in $objects do
if classOf i!=box thenbut as soon as I try to delete those objects by using:
delete iI get a Unknown Exception Error. I have tried the help files and just can't see why this shouldn't work.
Comments (7)
Comment policy
I have the same error with your code.
But this works:
This also works fine:
for i in $objects do ( if
And it does return OK if I just enter that in the listener, but when part of the overall utility embedded in an event handler it fails. I can't figure out why.
Posted code below as you requested...
This work for me: ( for o
This work for me:
I just tried exactly what you wrote and still no dice.
The only other info is that this is part of a Utility. So the user presses a button to make this bit of code run. I can't think of how that would change anything, but there it is.
I just keep getting:
>> MAXScript Rollout Handler Exception:
-- Unknown system exception <<
can you post your code please?
Here's my code...