// jtrLightDropper.mel // Created June 2, 2008 // Author - Jordan Rempel // INSTRUCTIONS - Place script (without procedure definition) // in your shelf. When moving in your camera view, click the // shelf button and a new light will be created from that // position. If you wish to map the procedure to a hotkey, // call this script (jtrLightDropper) from one of your script // directories within the hotkey editor. global proc jtrLightDropper() // Use only text below if using for shelf { string $panel = `getPanel -withFocus`; string $camera = `modelPanel -query -camera $panel`; select $camera; float $translate[] = `xform -query -translation $camera`; float $rotate[] = `xform -query -rotation $camera`; defaultSpotLight(1, 1,1,1, 0, 40, 0, 0, 0, 0,0,0, 1, 0); move -r $translate[0] $translate[1] $translate[2]; rotate -r $rotate[0] $rotate[1] $rotate[2]; }