no, sorry for causing confusion. this is only helpful when developing tool plugins and you want to use keyboard to control your tool behavior, you need a code of each key so that you can specify what to look for. these codes are nowhere to be found (su ruby api) so only way I found is to run the key discovery tool posted above and pressing keyboard print respective codes to the ruby console.
Posts made by a4chitect
-
RE: Little trick to find out your desired keycode
-
RE: Help needed: drawing_color (all colors)?
I was certain that after trying "darkred" sketchup returned an error, but now the same "darkred" works as expected - thanks!!
-
Help needed: drawing_color (all colors)?
could someone provide a list of all color names recognized by the view.draw_points method?
-
Little trick to find out your desired keycode
prints the code to the ruby console
class KeysTool def onKeyDown(key, rpt, flags, view) puts "key; " + key.to_s + ", repeat; " + rpt.to_s + ", flags; " + flags.to_s end end Sketchup.active_model.select_tool KeysTool.new
paste the above code into webconsole, execute
after that focus from the webconsole to sketchup and pressing keyboard prints respective codes to the console -
Has google taken down my favorite ruby api developer's guide
http://download.sketchup.com/sketchuphelp/gsu6_ruby/Docs
there is a mirror http://groups.google.com/group/SketchUp-Plugins-Dev/web/Ruby-methods.html
(with a little less screen space (due to google groups toolbar and sidebar) but more colors)and a different approach http://code.google.com/apis/sketchup/docs/developers_guide/index.html (imho less informative, without examples but for quick reference)
=> farewell old guide and thanks for sticking with me for such a long time
a little less 'sketchup' and more google in the address bar -
RE: 3D Basecamp - "The Best of Ruby" presentation
these are wonderful for their perfect user interface and integration (look like native tools)
bezierspline (fredo6)
joint-push-pull (fredo6)
offset-on-surface (fredo6)bevel (cphillips)
subdivide&smooth (whaat)
component-spray (didier bur)
roof (tig)
volume calculator (tig)view-based-face-reverser (didier bur)
webconsole (jim)
ruby toolbar (jim) -
RE: Bezierspline by fredo6 editing
holy shit - you are right: Ctrl is toggling these modes THANKS a lot!
-
RE: Selecting only Lock Groups
all right, respect. there you go webconsole
-
RE: Selecting only Lock Groups
Sketchup.active_model.active_entities.each{|ent| if(ent.typename=="Group" && ent.locked?) Sketchup.active_model.selection.add ent end }
paste the above into a ruby console (I suggest using Jim's Webconsole) and Execute
http://sketchuptips.blogspot.com/2007/08/plugin-webconsolerb.html
warning: no testing for errors or bugs, use at your own risk
-
Bezierspline by fredo6 editing
could someone help me understand why when editing spline sometimes the selecting cursor is a black filled square and sometimes it is an empty square? the filled cursor can't be locked to axes when moving while the empty square can and also snaps to geometry better. I could't recognize any apparent reason why sometimes I get the filled one and sometimes don't. thanks
-
RE: [undoc] Camera info window
does someone understand this dialog?: Sketchup.send_action 21245
-
RE: [Plugin] Name Group on Creation
sorry for not checking myself first... thanks for looking into it
-
RE: [undoc] Camera info window
I wonder how many Sketchup.send_action ##### numbers do something useful?!
thanks TBD, keep them coming! -
RE: Polyreducer Experiments
whaat please stop playing with such childish tricks, and make something more demanding on your skills and talent: reverse polyreducer (user draws a rough shape and your script turns this into a beautiful and detailed component)
all right, am just kidding.
-
[Plugin] Clean Unwanted Edges
Script explanation:
the loop goes through all selected geometry, check if the current entity is an edge, and if yes it erases this edge in 2 cases- it is an edge belonging to 2 faces at the same time, their normals are parallel (faces are coplanar) and their front color is the same
- it is an edge which doesn't form any faces
this part is taken (after a little modification) directly from the script Skin by Darrel Belvin so all credit is his (hope he doesn't mind me posting this)
Warning: please save your model prior to running this
-
RE: Simplify Tool
this part is taken (after a little modification) directly from the script Skin by Darrel Belvin so all credit is his (hope he doesn't mind me posting this)
warning: please save your model prior to running this
@unknownuser said:
Script explanation:
the loop goes through all selected geometry, check if the current entity is an edge, and if yes it erases this edge in 2 cases- it is an edge belonging to 2 faces at the same time, their normals are parallel (faces are coplanar) and their front color is the same
- it is an edge which doesn't form any faces
-
RE: Inference interference
sorry remus, but i'm pretty certain it's still gonna snap to 'invisible' lines or vertices. I guess that this particular problem could be solved by coding a new freehand tool in ruby, then you could specify to draw planar only (like when hodling a specific key) - this wouldn't be very hard to do, unfortunately it's impossible for me to devote any time for this.
-
RE: [Plugin] SketchyBevel 0.1(Updated May 11)
thanks chris, nice little script - great idea with the face shrinking
-
RE: Lock toolbars
there is a little trick to help you, once you are happy with your toolbar arrangement, close sketchup (the UI gets saved internally). anytime your screen gets resized, or messed up, or your toolbars change - don't close sketchup, open another instance of sketchup - this one opens with the original UI. then close both windows but make sure that you close the clean and tidy @last
this way your clean UI gets saved as last overwriting the messy one (since all instances of sketchup share one UI setting)