sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [REQ] manipulate camera by something like mover2 ?

    Scheduled Pinned Locked Moved Plugins
    8 Posts 4 Posters 2.2k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • bagateloB Offline
      bagatelo
      last edited by

      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?"

      Link Preview Image
      Plugin: Mover 2

      Apr 2014  * Renamed to MoveIt , and available in t SketchUcation Plugin Store Aug 16, 2009 * Released update fixing possible bugsplat...

      favicon

      (sketchuptips.blogspot.com)

      Set camera offset for rotation and translation numericly:
      http://www.pixero.com/downloads_sketchup.html

      favicon

      (www.smustard.com)

      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/

      While the cat's away, the mice will play

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by

        I will look into adding the Camera as a movable target using the mover2 controls. Give me a couple days..

        Hi

        1 Reply Last reply Reply Quote 0
        • D Offline
          driven
          last edited by

          @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

          learn from the mistakes of others, you may not live long enough to make them all yourself...

          1 Reply Last reply Reply Quote 0
          • Dan RathbunD Offline
            Dan Rathbun
            last edited by

            
            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
            

            I'm not here much anymore.

            1 Reply Last reply Reply Quote 0
            • D Offline
              driven
              last edited by

              @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

              learn from the mistakes of others, you may not live long enough to make them all yourself...

              1 Reply Last reply Reply Quote 0
              • Dan RathbunD Offline
                Dan Rathbun
                last edited by

                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.

                I'm not here much anymore.

                1 Reply Last reply Reply Quote 0
                • Dan RathbunD Offline
                  Dan Rathbun
                  last edited by

                  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.

                  I'm not here much anymore.

                  1 Reply Last reply Reply Quote 0
                  • Dan RathbunD Offline
                    Dan Rathbun
                    last edited by

                    @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.

                    ~

                    I'm not here much anymore.

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post
                    Buy SketchPlus
                    Buy SUbD
                    Buy WrapR
                    Buy eBook
                    Buy Modelur
                    Buy Vertex Tools
                    Buy SketchCuisine
                    Buy FormFonts

                    Advertisement