Custom Attribute Node Button turn off Light When Pressed

Custom Attribute Node Button turn off Light When Pressed

ronnee4BMB7
Participant Participant
629 Views
2 Replies
Message 1 of 3

Custom Attribute Node Button turn off Light When Pressed

ronnee4BMB7
Participant
Participant

I figure this is a simple script but I unfortunately don't have the time to learn all the scripting I wish I could.

 

Basically I have a pick button node in a custom attribute menu called "Lights Out" and I simply need to know the simplest way to have this button control the on/off checkbox of multiple vraylights.

 

I appreciate any help you can give me.

0 Likes
630 Views
2 Replies
Replies (2)
Message 2 of 3

kevinvandecar
Community Manager
Community Manager

Hi, first of all V-Ray is not an Autodesk product, so not sure if their lights have the same MAXScript behavior. But assuming they implemented them from the built-in lights, then it should be a simple matter of using the 'on' property and setting it to the value of "on" or "off".

 

For example, for a built-in light it would look like this:

$Omni001.on = off
$Omni001.on = on

To check the syntax for their lights, you could try to turn on the MAXScript listener, make sure the macro recorder is on, then run the command manually in the UI and watch what is recorded in the macro recorder window. If it's different, then use that syntax for the V-Ray lights (you'll also have to test type if they are behaving differently). If nothing echos, then they may not have exposed the functionality to MAXScript, and you will have to contact them to see if there is another way.

 

hope it helps,

kevin

 


Kevin Vandecar
Developer Technical Services
Autodesk Developer Network



0 Likes
Message 3 of 3

ronnee4BMB7
Participant
Participant
Hi kevin,

I should specify that I already have access to the on/off property. My issue is that I want to wire a button or checkbox to activate/deactivate the on/off property, but it doesn't appear in the wire parameters dialogues.
0 Likes