Create and move between muti cameras
-
Can anybody point me to a script or tut that would show me the best way to create an array of cameras and move between them. I have consulted the API but can't seem to put it together yet.
Another area of frustration is quick and dirty animations, say sliding a group across the red axis or whatever.
thanks -
Hi jessejames, welcome to the forums.
Here are a couple basic suggestions..
Scenes can be used to save camera positions. Open the Scenes dialog from the Windows menu, setup your camera position, and then "Add scene" using the (+) button in the Scenes dialog.
There is a Film and Stage extension that may be useful if you need more advanced camera functions, but I understand it may be buggy.
For the animations, try morisdov's Proper Animation extension. It will let you set a position for Groups per Scene, and then will move the object when you select between the Scenes.
-
Thanks Jim,
Actually i was referring to Ruby, and how this would be done in Ruby. I would like to create a bunch of cameras and move between them(sort of a moving camera animation).I know how to create cameras by...
camera = Sketchup.camera.new
but not sure the SURuby way of moving between them. I have consulted the docs, but not able to put this action together. Thanks in advance for your kind help
-
have a look at the web exporter plugin You may be able to find the ruby code in there that you are looking for. Search this forum for "web exporter"
Essentially it does what you want to do but it does not creat pages it exports images (36) or (72) images from (36) or 72 camera positions created in a circle around the model.
-
Oh, I guess this is the Ruby Forum...
Your syntax for creating a camera is correct. You can store them in an array instead:
cameras = [] camera = Sketchup.camera.new # Set camera params cameras.push(camera)
Just as a simple example, you can move forward and backward through the cameras using an index:
def nextCamera @i += 1 @i = 0 if @i >= cameras.length Sketchup.active_model.active_view.camera = cameras[@i] end
- These examples will not work as shown due to the lack of existance and scope of the various variables used.
-
Thanks Phil Rader,
I will check out that scriptThanks Jim,
from the code i should be able to put things together now.Thanks again guys
-
Jesse
have a look at Rick's script flight path. It may just be the thing you are looking for:
-
Thanks a lot Phil, Although i may try to write a flight path script myself. I am very interested in completing my study of the Ruby API, and things are coming along faster every day!
I love this program!
Advertisement