Once you create the light the Command History window is updated with the commands that were sent to Layout during that operation. Now let's add a Null object to the scene and name it "Gambit" (Items > Add > Null). Your Command History window should look something like Fig.06
Fig.06 - Command History Window after a Spotlight and Null have been added to the scene
Click on the AddNull Gambit command in the list and it will display the command in the text field located at the bottom of the Command History window. Select the entire text string and copy it (Ctrl + C). Clear the scene and switch back over to Modeler.
In a new object (File > New Object), create a box with the default settings (Create > Primitives > Box). Select the top polygon on the box and click the Add Powergon command. Delete the default script and paste the command we just copied from Layout in its place (Fig.07
Fig.07 - New command added to the Add Powergon Command input field
It should read "AddNull Gambit". When executed in Layout, this command would simply add a Null object with the name Gambit to the scene, placing it at the origin. Let's dress this script up a little and tell it to place the Null in the center of the select polygon using a couple of the special "escape" character we learned about earlier (Fig.08
Add the \r character so that we can create a line return letting Layout know that we want to perform another command after we create the Null. Then type Position \c, which will tell Layout to move the null to the center of the selected polygon. Let's give this a test run. The full script should read as follows:
AddNull Gambit\rPosition \c
Fig.08 - Completed Powergon Command that will generate a Null named Gambit in the center of the selected polygon
Click OK to attach the script to the selected polygon, save your object and send it over to Layout. With the Box selected, choose Items > Cvt Powergons to execute the command we just created. You should now have a Null object positioned in the center of the top polygon that has been named Gambit (Fig.09).
Let's think about what just happened. We clicked one button and performed three tasks:
1. We added a Null to the Scene
2. We named the Null
3. We positioned the Null exactly where we wanted it.
Sounds like Powergons can reduce steps and increase our productivity. Not too shabby if you ask me.
Fig.09 - Our Gambit Null was created, named and positioned by clicking one button
OK, so we've added a spotlight and a Null using Powergons - big deal, right? Sure, these are simple tasks but we're just scratching the surface. I'll share with you three examples of how I've used Powergons to speed up past productions.
Use Powergons to quickly add and parent lights in strategic locations all over the car: headlights, break lights, turn signals and more. Why stop there? You can also add and parent a particle emitter to the tail pipe for extra detail for your scene.
Sure you could do all of this without the use of Powergons, but imagine the time you'd be wasting doing it the old-fashioned, manual way (Fig.10 - 11
Fig.10 - Attach scripts to the headlights of a car using Powergons
Fig.11 - The spotlights for this car rig were created using Powergons