Sitni Sati Forums
Maxscript adding lights. - Printable Version

+- Sitni Sati Forums (https://forum.afterworks.com)
+-- Forum: Products (https://forum.afterworks.com/forumdisplay.php?fid=4)
+--- Forum: FumeFX [max] (https://forum.afterworks.com/forumdisplay.php?fid=8)
+--- Thread: Maxscript adding lights. (/showthread.php?tid=1487)



Maxscript adding lights. - mikeguy3086 - 01-14-2014

I've been trying to make simple script that will add lights to Fume. Here is a very simple version of it:

Code:
rf = Omnilight()
rollout chooseFume "Select Fume Container"
    (
        fn chooseFume = classof obj == FumeFX
        pickbutton chooseit "Select Fume Container"
        button addFL "Add Lights to FumeFX"
        
            on chooseit picked obj do
                (
            if obj != undefined do
                    (
                chooseit.text = obj.name
                    )
                )
                
                on addFL pressed do
                (
                    AddLight nodeAdds a light
                   )
    )
createDialog chooseFume

I just cant get it work. I copy and pasted the function to add lights from the Maxscript documentation.

Code:
AddLight nodeAdds a light

I can't figure out how to have my button add the light. Any thoughts?


Re: Maxscript adding lights. - sitnisati - 01-15-2014

Hello,

With FumeFX selected and Omni001 in the scene, it would go like this: $.AddLight $Omni001

I hope this helps.

Kresimir


Re: Maxscript adding lights. - mikeguy3086 - 01-17-2014

Thanks Kresimir! I was forgetting that "."


Re: Maxscript adding lights. - sitnisati - 01-17-2014

You're welcome !