PDA

View Full Version : create spotlight with the scripteditor


metos
01-26-2003, 07:13 PM
hi

I try to create spotlight by the script editor
and define the name of the light in the spotlight creation.

CreateSpotLight -> with that, I have a new Spotlight with the next free number. as spotlight1

I want to define , directly, the name for this spotlight.


but the command
CreateSpotLight -name sky_spot; dont work.



someone have te solution plz ?
thk :)

ps : sorry for my bad english (I m french)

Ocean Size
01-26-2003, 08:55 PM
Well, I'm glad you posted this question, because now I know how to do this, after a little experimentation.

Enter this command into the script editor and it should create a spotlight named sky_spot.

spotLight -n sky_spot;

metos
01-26-2003, 09:24 PM
thank you, very much :bounce:

mark_wilkins
01-26-2003, 09:33 PM
Be careful, though, because the name you ask for is not necessarily the name Maya will give the light -- for example if you ask for a light called mySpot and there's already a mySpot in the scene.

In a script, the careful way to do this is to make an array variable to hold the actual node names associated with the light. Maya gives your script both the names of the transform and the shape node that make up the light:

string $light_name[] = `spotLight -n mySpot`;


print $light_name[0]; // transform node's name
print $light_name[1]; // shape node's name

-- Mark

metos
01-27-2003, 07:01 PM
on more question :

to select (by script editor) a mental ray render

in : render/render using/ mental ray (and not maya software)


when a swich it to mental ray
there is nothing added in the script editor command executed.


how I can do il in a script ?

CGTalk Moderation
01-14-2006, 06:00 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.