ScriptSpot

Forum topic · Scripts Wanted

Camera animation + dummies

By a1ex1s · 2014-06-19

Description

Hi guys,

I would like to create a script that could align my camera on multiple dummies.
One key on the timeline per dummy on the camera animation.

Here is a short exemple of what it should look like :

I have 100 dummies in my scene in a specific layer called "--dummy".

I have a specific camera called "Cam-anim"

I would like the script to align my camera on each dummy and at the end I should have 100 keys on my timeline, frame 1 for dummy 1 ... frame 50 for dummy 50 and so on...

If anyone could help me get trough the basics that would be awesome !

Thank's

Comments (1)

here you go

kenzor · 2015-03-15

It's a bit late but ...
Select your dummies. Then run the code.
A camera is created then aligned frame by frame to each of the selected dummies.


theCamera = freeCamera()
theDummies = ( selection as array )
for theFrame = 1 to theDummies.count do
(
	with animate on
	(
		at time theFrame ( theCamera.transform = theDummies[theFrame].transform )
	)
)