hey,
maybe you can put them in gaieus picasa?
http://forums.sketchucation.com/viewtopic.php?f=328&t=29653
hey,
maybe you can put them in gaieus picasa?
http://forums.sketchucation.com/viewtopic.php?f=328&t=29653
A very basic plugin that creates 7 default scenes (one for each standard Viewpoint)
When executed again, the scene camera is updated to zoom the complete model (in case elements have been added)
Accesable through the plugins menu.
Update version 1.1:
Top-bottom-left-right-back-front are in parallel projection
ISO is perspective
Is there an overview avaalable somewhere on the updates (if any) done to the API in the new version?
Thx
Chris,
you gonna put these also in the picasa thing of gaieus?
Great pics Chris!
You can see the excitement splatting of my face! Although finally have a descent beer (stella) can also have to do with that
To the mods: maybe it's a good idea to have some kind of after-basecamp topic in which you can put all the links to pictures etc?
NB. back at working place, jetlag kicks in
Chris took pictures and if I recall correct he said 'not gonna happen in the first couple of months'
Nice to see the face behind each name! (Although i don't remember them anymore due to being up 24 hours and the beers)
Registration and Brunch starts in 5 minutes!
Gai,
Hungarian-Greek, all the same to me
I know one thing: enough beer leads to a universal language spoken by all, understood by none!
Overview of the code for each standard view (informative)
Top
direction = Z_AXIS.reverse
Sketchup.active_model.active_view.camera.set( ORIGIN, direction, direction.axes.y)
Sketchup.active_model.active_view.zoom_extents
Bottom
direction = Z_AXIS
Sketchup.active_model.active_view.camera.set( ORIGIN, direction, direction.axes.y)
Sketchup.active_model.active_view.zoom_extents
Front
direction = Y_AXIS
Sketchup.active_model.active_view.camera.set( ORIGIN, direction, direction.axes.y)
Sketchup.active_model.active_view.zoom_extents
Back
direction = Y_AXIS.reverse
Sketchup.active_model.active_view.camera.set( ORIGIN, direction, direction.axes.y)
Sketchup.active_model.active_view.zoom_extents
Left
direction=X_AXIS
Sketchup.active_model.active_view.camera.set( ORIGIN, direction, direction.axes.y)
Sketchup.active_model.active_view.zoom_extents
Right
direction=X_AXIS.reverse
Sketchup.active_model.active_view.camera.set( ORIGIN, direction, direction.axes.y)
Sketchup.active_model.active_view.zoom_extents
Iso
direction=Geom;;Vector3d.new -0.666667, 0.666667, -0.333333
Sketchup.active_model.active_view.camera.set( ORIGIN, direction, direction.axes.y)
Sketchup.active_model.active_view.zoom_extents
This emulates the standard cameras, combined with zoom extents.
Credits to ThomThom!
Morgan,
After a few beers, if needed, i'm willing to try translating from french to english and vice versa
yes to 'copy' the standard cameras it would be great to be able to copy the eye, target and up of the standard cameras into new cameras so i can use those.
fact is i can't itterate over those standard cameras as shown above and i need the specific values of eye and target otherwise i need to calculate the center of the bounding box of all elements of the model to specify the eye and target.
At the other hand, maybe i'm lacking any sense today (you wouldn't be the first to say that today )
I was thinking about that.
But I need the standard views attributes for that so i can use them in a camera definition.
I have not yet found a way to adress these standard views. (or i'm looking over it completely)
Thx Jim for the code update
ThomThom,
I've tried just to see if there was any diff. and there is none.
I also already tried to do active_view.refresh after each view switch but that doesn't help either.
In the API this is the explanation on send_action:
The send_action method sends a message to the message queue to perform some action asynchronously.
I don't know if this could have something to do with it
Btw did you try the code?
Extra info, if you switch pages 'scenes) in the same loop all goes well.
ThomThom:
no, but i'll give it a shot
Jim:
scene transitions are off
Normally i'll be comming over from Belgium.
What's the best way to travel from denver to boulder?
Any other European delegates?
If i'm comming over, i'll see you guys back there, i'm probably gonna be the only not native english speaker there so look for the accent
i'm not into the dll stuff, but i'm currently working on communication between Sketchup and Microsoft PowerPoint and Microsoft Project.
Win32OLE.so can be used in that case
huuray for ThomThom!
thx!
For those interested can be set with:
Sketchup.active_model.options[0][0]='false' or 'true'
I know it is possible to use Sketchup.send_action("viewIso:") to set the active_view to one of the standard views.
The problem is, when this is used in a loop like this all images return equal:
standardviews=['SV_Top','SV_Bottom','SV_Front','SV_Back','SV_Left','SV_Right','SV_Iso']
standardviews.each{|view|
if view=='SV_Top'
Sketchup.send_action("viewTop;")
elsif view=='SV_Bottom'
Sketchup.send_action("viewBottom;")
elsif view=='SV_Front'
Sketchup.send_action("viewFront;")
elsif view=='SV_Back'
Sketchup.send_action("viewBack;")
elsif view=='SV_Left'
Sketchup.send_action("viewLeft;")
elsif view=='SV_Right'
Sketchup.send_action("viewRight;")
elsif view=='SV_Iso'
Sketchup.send_action("viewIso;")
end
x = Sketchup.active_model.active_view
path="c;\\"+Sketchup.active_model.title
imagename = path+view.to_s+".jpg"
Sketchup.set_status_text("Writing #{imagename}")
x.write_image(imagename,200,200,true)
}
Now when i add a messagebox at the end of the loop it seems to goes well.
This is probably gonna be something stupid, i really have an off day on coding SU ruby.
In view menu-->Animation-->Settings it is possible to enable/disable scene transistions.
Can this function be accessed by ruby?
Thx!