PDA

View Full Version : adding target null for a selected item



dilaima
02-13-2004, 07:26 AM
can anyone help me plz, to do a script that can add a target null to a pre selected item (camera, light, object), instead of each time i add null, select camera, open motion and target to null...
thanx in advance

Kvaalen
02-16-2004, 05:04 AM
Try this out:



generic
{
scene = Scene();
curSel = scene.getSelect();

AddNull("Null");
SelectItem(curSel[1].name);
TargetItem("Null");
HController(2);
PController(2);
}


To make it better, you can add an interface to give the null your own name and you can also give an error message if nothing is selected.

Hope that helps.