• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Maxscript adding lights.
#1
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?
  Reply
#2
Hello,

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

I hope this helps.

Kresimir
  Reply
#3
Thanks Kresimir! I was forgetting that "."
  Reply
#4
You're welcome !
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)