sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Change zoom of all cameras at once

    Scheduled Pinned Locked Moved Plugins
    4 Posts 2 Posters 308 Views 2 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.
    • E Offline
      Ecuadorian
      last edited by

      Hi... Long time no post.

      I've been browsing the plugins index but I still can't find one that can change the zoom of all cameras in the model at once. For example, from 45 degrees to 60 degrees.

      The reason I want to automatize this process is that I have 6 files with around 90 cameras each. 😲

      -Miguel Lescano
      Subscribe to my house plans YouTube channel! (30K+ subs)

      1 Reply Last reply Reply Quote 0
      • Chris FullmerC Offline
        Chris Fullmer
        last edited by

        By camera, I assume you mean scenes with camera location saved in that scene, right? Bot some other type of camera data (from another plugin or something?).

        Run this line of code from the Ruby Console and it will adjust all cameras to a specified FOV. WARNING, there is no easy undo on this.

        m=Sketchup.active_model;v=m.active_view;m.pages.each{|e| cam=e.camera;cam.fov=60;v.camera=cam}

        That is all one line, just paste it and hit enter. It will reset all camera's to 60's, though it might trip and cancel on non-perspective cameras. I should go test that.

        In the line of code, it says fov=60. Change the 60 to whatever you want it to be. 60 was what you had given as an example, but you can put it at any FOV.

        Chris

        Lately you've been tan, suspicious for the winter.
        All my Plugins I've written

        1 Reply Last reply Reply Quote 0
        • Chris FullmerC Offline
          Chris Fullmer
          last edited by

          ok, it looks like it just gives a quick warning about non perspective cameras, but does not cancel. So it should work,

          Chris

          Lately you've been tan, suspicious for the winter.
          All my Plugins I've written

          1 Reply Last reply Reply Quote 0
          • E Offline
            Ecuadorian
            last edited by

            Thank you a lot, Chris. 😄 👍 Worked perfectly. All my cameras (actually, scenes as you pointed out) are perspective ones, so I received no warnings.

            No worries about not being able to undo... I save a new file version several times a day.

            -Miguel Lescano
            Subscribe to my house plans YouTube channel! (30K+ subs)

            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