PDA

View Full Version : checkink the afterburn object shadows check box with maxscript


Strob
08-14-2008, 07:43 PM
Hi,

I am not very experienced in maxscript so maybe I don't do the right thing but I try to make a script within which I would change the state of the afterburn object shadows check box (because after burn light properties can't be changed in the light lister).

But I just try to type exactly what the listener gives me when I do that action in th UI and I get a system exception:

$Spot01.UseObjectShadows = off
** system exception **


And it does not work neither when I try to make a loop like this:

for i in $ do
i.UseObjectShadows = off
-- Error occurred in i loop
-- Frame:
-- i: $Spot02
-- called in i loop
-- Frame:
-- i: $Spot02
** system exception **

Could any one explain me what I'm doing wrong please?

ZeBoxx2
08-15-2008, 12:44 AM
you may not be doing anything wrong - it may simply not be supported to set that from maxscript (though it would be odd).

Try 'showProperties $' with the light selected and see if there's perhaps other methods of accessing the property in question.. it may have an interface as well (showInterface $).. no idea as I don't have afterburn myself; but in general, if the property exists (and it does, or it'd throw an error about that property not existing), and it expects a boolean value (which 'off' is, although you can try 'false', or '0' in case it expects an integer), then the syntax you used should be correct.

Strob
08-15-2008, 03:38 AM
Hi ZeBoxx2, thank you for your answer.

But I already tried to see the list of properties and YES it is there. It just seems I can't access it for some reason. I also already tried false and 0 instead of off without success neither...

I have a scene with tons of lights and I would like to change this checkbox at will... I can't believe it is not possible any other way than changing every single one one after the other...

I'll keep trying.

CGTalk Moderation
08-15-2008, 03:38 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.