How to spin a barn
-
Do you really need to spin the barn or orbit the camera around it? There's a big difference.
-
Doesn't the 'Ruby Example' that are enabled under Preferences have an Animation that does this?
I'd check but I deleted the folder
-
I'd forgotten about that one because I never use it. Under Camera>Animations there's Spin View if you've ticked Ruby Script Examples under Extensions in Preferences.
-
Orbit the camera around it, but the subject got youre attention didn't it?[flash=640,480:3f7cm05z]http://www.youtube.com/v/0NX1EF9eGrE[/flash:3f7cm05z]
-
Other than the fact the downward spiral comes into play, the spin view works. But I need a flat spin about the z axis, to do what I want.
-
You might look at Camera OrbitOnTarget. It seems to me that there's another plugin that will allow you to establish camera locations about a center point but I can't remember what it is called and didn't find it in a quick scan of the list. You might look through the list of plugins yourself and see if you can find anything that might work for you.
-
With some thinking outside the box this will work
-
This ones handy, http://forums.sketchucation.com/viewtopic.php?p=45473#p45473 john
-
I tried teh creat360 plugin, probably not ready for SU8, I had 10 scenes as soon as I started SU, 10 scenes of an empty drawing.
So I loaded a model, after deleting those scenes, right clicked, looked in the plugins menu, the tools menu, even the draw menu, no plugin, access point/menu found. I tried again same results. So I de activated it for now. Perhaps someone is still here that knows how it works. -
Here is a simple plugin that will spin the current view. Input consist of angle and delay between screen updates.
def spin_vue inp = inputbox(["Angle;","Delay;"],[1,0.1],"Spin the View") if inp angle=inp[0].to_f;delay=inp[1].to_f mod = Sketchup.active_model vue = mod.active_view tar = vue.guess_target cam = vue.camera eye = cam.eye tr=Geom;;Transformation.rotation(tar,Z_AXIS,angle.degrees) for i in 1..(360/angle).to_i eye.transform! tr cam.set eye,tar,Z_AXIS vue.refresh sleep(delay)#control speed of rotation end end end UI.menu("Plugins").add_item("Spin View") { spin_vue }
-
would flightpath work? Just make the path a circle around the barn. I've rarely used this so I can't speak for it, but it seems to me to a be a possibility.
-
I tried flightpath in the past, if the camera would be pointing other than in the direction of the "flight", then maybe, otherwise no.
SD I wish I knew what to do with the code you posted. I am going to guess that all I need to do with it is paste it in a notepad ++ files and save it as rotate.rb. But I have a doubt that is that is needed.
-
Yes, just copy and save. If there is only one object in the model, it doesn't matter if you spin the view or the ojbect. If spinning the object is required then you can use this method.
def spin_object inp = inputbox(["Angle;","Delay;"],[1,0.1],"Spin Object") if inp angle=inp[0].to_f;delay=inp[1].to_f mod = Sketchup.active_model ent = mod.entities sel = mod.selection corg=[] sel.each{|e| corg<<e if e.class==Sketchup;;Group || \ (e.class==Sketchup;;ComponentInstance and not e.definition.behavior.always_face_camera? and not e.definition.behavior.shadows_face_sun?)} sel.clear for i in 1..(360/angle).to_i corg.each{|e| tr=Geom;;Transformation.rotation(e.bounds.center,Z_AXIS,angle.degrees) e.transform! tr } Sketchup.active_model.active_view.refresh sleep(delay) end end end
The objects to be spun must be groups or components. You can select more than one.
-
SD, the first version works ok, thanks.
The spin object (2nd version)does not show up in the plugin menu.
I compared the two and I added the last line from the first one to the second like thisUI.menu("Plugins").add_item("Spin View") { spin_vue }
UI.menu("Plugins").add_item("Spin Object") { spin_obj }
That didn't help...help
-
@tspco said:
SD, the first version works ok, thanks.
The spin object (2nd version)does not show up in the plugin menu.
I compared the two and I added the last line from the first one to the second like thisUI.menu("Plugins").add_item("Spin View") { spin_vue }
UI.menu("Plugins").add_item("Spin Object") { spin_obj }
That didn't help...help
Oops. Sorry about that. The text in the "curly" brackets should be
{ spin_object }
It is always the name of the method to be called whin the menu item is selected.
-
There is a spin view animation included with SketchUp - you need to enable Ruby Script Examples in the Extensions dialog. The option appears in the Camera menu.
Oh, sorry Dave - didn't see your response.
-
Jim been there done that, I just don't care for the downward movement while spinning.
Advertisement