View Full Version : Querying the type of light

09 September 2007, 06:12 PM
Quite bothersome, I just need to find out what type of light I have. I've been spending a decent bit of time looking through channels on lights, looking through commands to call up what type of object it is, changing the type of light with echoing all commands. I've found nothing to help me out.

Pretty much all I'm doing is finding what light it is and to pump it through an if else statement to do different actions to the lights in my scene according to what type of light it is.

Any help would be greatly appreciated. Even if it's not "spotLight" "directionalLight", if it's just numbers of the type of light, it would work out as well, I'll just put the variable through a switch.

09 September 2007, 07:37 PM
string $type = `nodeType <lightObjShape>`;

09 September 2007, 07:42 PM
Awww, ya gotta be kinding me. I feel like a fool. Thanks Azshall, so simple.

CGTalk Moderation
09 September 2007, 07:42 PM
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.