PDA

View Full Version : CameraMap to 1000 objects script


plejboy
03-08-2007, 11:06 AM
Hey guys.
How would one write a script that does this?

01. Find every object named, lets say, Fragment01-1000
02. Add a Camera map modifier to every one.
03. In the Camera map modifier choose a named camera.
04. Collapse every object into a poly object.

I know its probably not a challange to some of you but since im not a scripter Im having a hard time getting it right.

I would have used a instanced camera map but the camera needs to be pick for every object and thats just way too time consuming...

Thanks in advance.

dutch_delight
03-08-2007, 12:59 PM
something like this?


for obj in Geometry where classof obj == Editable_Mesh or classof == Editable_Poly do

(

select obj

modPanel.addModToSelection (CameraMap ()) ui:on

obj.modifiers[1].cameraNode = $Camera01

macros.run "Modifier Stack" "Convert_to_Poly"

)

plejboy
03-08-2007, 02:01 PM
That seems to do the job! :)
I owe you one. Would have taken an extra day at least.
Thanks!

CGTalk Moderation
03-08-2007, 02:01 PM
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.