quick solution is to use the following line in the ruby console to set the current selected scene -
Sketchup.active_model.pages.selected_page.transition_time = 4
quick solution is to use the following line in the ruby console to set the current selected scene -
Sketchup.active_model.pages.selected_page.transition_time = 4
Thanks for the support guys
To Clarify usage below are some details
Each Position number X, corrsponds to the X'th sketchup Scene/Page
Position 1 will be for the FIRST scene tab
Position 3 will correspond to the THIRD tab etc
1) to begin with Set position number X, and Get position number X, you dont care about scenes or number of them. just make object selections, and Set their positions, move them and set additional positions, Get positions manually to see how things paly out
2) after you finished Setting the positions of various objects you may add scenes/pages as many as positions as you have or more
3) only now you should START the ANIMATION OBSERVER
this will make all objects that have position 2 set, to ANIMATE (move) to position 2 when you clickon the SECOND scene tab.
click FOURTH tab, objects with position 4 will animate to position 4
4) STARTing Animation Observer automates the objects animation by using scene tabs instead of manual right click command GET position X - via corresponding click on SCENE X in the order of scenes
5) to modify object positions and scene view angles youd want to STOP ANIMATION OBSERVER, otherwise the objects keep on moving disturbing your adjustments of new positions etc
so STOP ANIMATION OBSERVER, make adjustments
START ANIMATION OBSERVER again to use scenes tab clicks instead of GET position X
6) not all objects need to have all position numbers set, just those few you want to move on X'th scenes tab click
7) you can select multiple objects and SET their position X in one command click
8) to "enable" the command of "GET to position X" those objects currently selected should have "Position X" set or otherwise - the right click menu command "GET position X" will be grayed out ("disabled")
this way you can find out if an object has position X set or not, or groups of selected objects have position X set or not
Hello
Inside SketchUp it works fine but when creating an AVI file with Export -> Animation
the - Sketchup::Pages.add_frame_change_observer - is not firing between frames.
Is there anything i should change or another observer i can use between frames in Export Animation ?
http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=10926
Thanks
Cheers for the enthusiasion
You have downloaded the Sketchup SDK - which is not required to use the Ruby API.
No extra add-on on top of standard Sketchup Free /or Pro installation is required for you to start using the Ruby API.
Just look in your plugins folder for examples and at the following link for a great starting point -
http://sketchuptips.blogspot.com/2008/08/tutorial-getting-started-with-sketchup.html
Moris
It would be nice if you can clearly and simply explain what is the problem your solution solves.
Components are organised in standard component libraries - your solution adds an additional hierarchy tree to organise components ? which "type" of sketchup user benefits the most from this add on ?
Other 3D CAD tools have extensive RDBMS systems linked to them, decades old legacy and enrichment. Sketchup came very late to this party and it will not compete with the old monsters.
The key might be identifying an existing one specific "type" of a sketchup niche user and tailoring your solution for his way of workflow - not airplanes design, archeology maybe ?
Moris
Long time ago i discovered that leaving graphic design to others was the best productivity route for me - I stick to programming and application/solution design.
I am most pruductive on Microsoft Visual Studio and it also splits in two very nicely the programming from graphic design.
You can try the free visual studio web developer express that gives you full javascript intellisence.
For Chrome please wait for SketchUp 7 hopefully before all your hair turns white or you still keet something to complain about its colour.
@n lindenthal said:
Now my question is, whether and how it is possible, to set transition time in this code line. For example:
@unknownuser said:
Morisdov.transf_get("transf5") set transition time to 8
No - transition times setting is a property of sketchups own scenes animation - not a property of "transf_get("transf5")" function, which is not designed to be called from the ruby console.
@rombout said:
when ad i.e. 2 steps for a cube i than ad 2 scenes and update eacht scene with its own position of the cube. than i play the animation my cube disappears at one the positions???
Please follow the "readme.txt" instructions, grab one of the sample models submitted by MALAISE, or use the http://morisdov.googlepages.com/xml_dictionary_attributes.zip - plugin to debug your model.
http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=11390&p=79744#p79168
@princedragoncok said:
My request would be avi. animation export however. I want rendering engines to recognise these movements for rendering animations.
If there is a will there is a way - look at TOMASZ render -
http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=11390&st=0&sk=t&sd=a&start=30#p80623
i guess we will get sketchup 7 before sketchup crew gives an answer
http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=10926&p=73880#p73880
Moris
rombout look here - stopping UI.play_sound ? -
http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=10352&p=68452#p68452
on windows at least two ways to do this:
Moris
here are the best two links you might need -
http://homepage1.nifty.com/markey/ruby/win32ole/index_e.html
http://wiki.rubygarden.org/Ruby/page/show/ScriptingExcel
Moris
New version 1.04 released of - "Proper_Animation.rb"
download from - http://morisdov.googlepages.com
New plugin i released enables setting each animation Scenes/pages Transition Times
After you added scenes change transition times from menu Plugins--> Scenes Tranision Time
download from http://morisdov.googlepages.com
@n lindenthal said:
use the mouse or ruby console to selectone object (by name). Now my question is, how to tell the selected object to »Get Position - 2«?
Morisdov.transf_get("transf2")
You must understand this is not the intentended use of this plugin -
You will more productive following "normal" procedures.
w = UI;;WebDialog.new
w.set_url "http://www.google.com"
w.show
Works just fine on Windows XP+IE6 - both from Ruby script file and ruby console.
Verify you dont have another issue.
@n lindenthal said:
How can I tell the ruby console, to »Get Position - 2«?
I ask this to have a proper animation, without getting all other remembers of a scene.
Select only the objects you want to move to position 2 (those that indeed have position 2 set) and right mouse click "Transformation->Get position 2".
Other objects will not "move".
New version 1.03 released of - "Proper_Animation.rb"
Try this - simple and lots of explanations for a starter -
http://code.google.com/apis/sketchup/docs/gsrubyapi_examples.html