[REQ] manipulate camera by something like mover2 ?
-
One more of the series "Alex and their crazy ideas.... "
Would it be possible to control the camera of Sketchup using something similar to the tool "Mover2?"
http://sketchuptips.blogspot.com/2007/08/plugin-mover-2.html
Set camera offset for rotation and translation numericly:
http://www.pixero.com/downloads_sketchup.htmlhttp://www.smustard.com/script/CameraControls
I think something like move camera "up/down", "front/behind", "right/left" by typed numeric values.
Please, visit my blog: http://cg-alex.blogspot.com/
-
I will look into adding the Camera as a movable target using the mover2 controls. Give me a couple days..
-
@jim said:
I will look into adding the Camera as a movable target using the mover2 controls. Give me a couple days..
hi Jim,
if your revisiting Mover2, could you add .show_modal for us mac users, I can't figure out how to (I'm sure I added it before)
cheers
john -
if RUBY_PLATFORM.include?('darwin') dialog.show_modal() else dialog.show() end
You can get fancier with a global like $MAC_SHOW_MODAL_DIALOGS=true
So the user can change their preference on the fly.if RUBY_PLATFORM.include?('darwin') if $MAC_SHOW_MODAL_DIALOGS dialog.show_modal() else dialog.show() end else dialog.show() end
-
@dan rathbun said:
....That way way you would not need to badger every plugin coder to modify their plugins.
cheers Dan, I'll give it a try, I usually just change them myself, but sometimes can't figure out 'where' to when people use super instead of UI::WedDialog
I don't understand what super is... or where it comes from...
john
btw. merry xmas to all
-
Actually it would be "more proper" to have the control var as a class varible rather than yet another in the multitude of globals.
I'll edit the code posting above.
-
Hey John it occurs to me that YOU can override your UI::WebDialog class and force any call to show() to actually call show_modal(). You would use method aliaising, based on the global var.
That way way you would not need to badger every plugin coder to modify their plugins.
Something like this: EDITED
class UI;;WebDialog @@ALWAYS_SHOW_MODAL=false def self.always_show_modal? @@ALWAYS_SHOW_MODAL end def self.always_show_modal=(arg) @@ALWAYS_SHOW_MODAL=arg end alias_method( ;old_show, ;show ) def show(&block) if RUBY_PLATFORM.include?('darwin') if @@ALWAYS_SHOW_MODAL show_modal(block) else old_show(block) end else old_show(block) end end # show() override end # class override if RUBY_PLATFORM.include?('darwin') UI.menu("View").add_separator() UI.menu("View").add_item('Show WebDialogs as Modal') { if UI;;WebDialog.always_show_modal? UI;;WebDialog.always_show_modal=(true) else UI;;WebDialog.always_show_modal=(false) end } end
Made control var a class var, instead of a global.
Added menu option under View menu. -
@driven said:
I don't understand what super is... or where it comes from...
super is a Ruby keyword that acts similar to a method, but has a quirk.
super
calls the same method in the ancestor PASSING UP the parameters that the child method received.super()
calls the same method in the ancestor BUT PASSES AN EMPTY parameter list.super(arg1, arg2, ...)
calls the same method in the ancestor BUT PASSES ONLY the parameters listed.~
Advertisement