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

    Create and move between muti cameras

    Scheduled Pinned Locked Moved Developers' Forum
    8 Posts 3 Posters 649 Views 3 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.
    • J Offline
      jessejames
      last edited by

      Can anybody point me to a script or tut that would show me the best way to create an array of cameras and move between them. I have consulted the API but can't seem to put it together yet.

      Another area of frustration is quick and dirty animations, say sliding a group across the red axis or whatever.
      thanks

      Always sleep with a loaded gun under your pillow!

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

        Hi jessejames, welcome to the forums.

        Here are a couple basic suggestions..

        Scenes can be used to save camera positions. Open the Scenes dialog from the Windows menu, setup your camera position, and then "Add scene" using the (+) button in the Scenes dialog.

        There is a Film and Stage extension that may be useful if you need more advanced camera functions, but I understand it may be buggy.

        For the animations, try morisdov's Proper Animation extension. It will let you set a position for Groups per Scene, and then will move the object when you select between the Scenes.

        Hi

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

          Thanks Jim,
          Actually i was referring to Ruby, and how this would be done in Ruby. I would like to create a bunch of cameras and move between them(sort of a moving camera animation).

          I know how to create cameras by...

          camera = Sketchup.camera.new
          

          but not sure the SURuby way of moving between them. I have consulted the docs, but not able to put this action together. Thanks in advance for your kind help

          Always sleep with a loaded gun under your pillow!

          1 Reply Last reply Reply Quote 0
          • P Offline
            Phil Rader AIA
            last edited by

            have a look at the web exporter plugin You may be able to find the ruby code in there that you are looking for. Search this forum for "web exporter"

            Essentially it does what you want to do but it does not creat pages it exports images (36) or (72) images from (36) or 72 camera positions created in a circle around the model.

            http://www.philrader.com

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

              Oh, I guess this is the Ruby Forum...

              Your syntax for creating a camera is correct. You can store them in an array instead:

              
              cameras = []
              camera = Sketchup.camera.new
              # Set camera params
              cameras.push(camera)
              
              

              Just as a simple example, you can move forward and backward through the cameras using an index:

              
              def nextCamera
                @i += 1
                @i = 0 if @i >= cameras.length
                Sketchup.active_model.active_view.camera = cameras[@i]
              end
              
              
              • These examples will not work as shown due to the lack of existance and scope of the various variables used.

              Hi

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

                Thanks Phil Rader,
                I will check out that script

                Thanks Jim,
                from the code i should be able to put things together now.

                Thanks again guys ☀

                Always sleep with a loaded gun under your pillow!

                1 Reply Last reply Reply Quote 0
                • P Offline
                  Phil Rader AIA
                  last edited by

                  Jesse

                  have a look at Rick's script flight path. It may just be the thing you are looking for:

                  favicon

                  (www.smustard.com)

                  http://www.philrader.com

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

                    Thanks a lot Phil, Although i may try to write a flight path script myself. I am very interested in completing my study of the Ruby API, and things are coming along faster every day!
                    I love this program!

                    Always sleep with a loaded gun under your pillow!

                    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