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

    [Plugin] Camera Stats

    Scheduled Pinned Locked Moved Plugins
    36 Posts 20 Posters 39.3k Views 20 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.
    • W Offline
      wwwyoose
      last edited by

      Hi

      I try this nice plugin but I dont get i work to export the camera position ...
      or I do some wrong

      some help who to...😄

      Best Achim

      1 Reply Last reply Reply Quote 0
      • romboutR Offline
        rombout
        last edited by

        @martinrinehart said:

        @jim said:

        Need to open it modal on the Mac to make it stay on top.

        Thanks, Jim.

        I changed it to "show_modal" but it turned the friendly little guy into a huge pain. Almost useless. Certainly no fun.

        Mac users: edit the code. It's ...Plugins/camera_stats/camera_stats.rb. Change the line at the bottom that now reads "wd.show()" to "wd.show_modal()". Is that better?

        ii got this error

        @unknownuser said:

        Error: #<SyntaxError: /Library/Application Support/Google SketchUp 6/SketchUp/Plugins/camera_stats/camera_stats.rb:104: parse error, unexpected tIDENTIFIER, expecting kEND
        target = make_arr( val )wd.show
        ^>
        /Library/Application Support/Google SketchUp 6/SketchUp/Plugins/camera_stats_menu.rb:10:in load' /Library/Application Support/Google SketchUp 6/SketchUp/Plugins/camera_stats_menu.rb:10 /Library/Application Support/Google SketchUp 6/SketchUp/Plugins/camera_stats_menu.rb:10:in call'
        /Library/Application Support/Google SketchUp 6/SketchUp/Plugins/camera_stats_menu.rb:10

        im working on mac su 6
        before that line change it dint do any thing either

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          Looks like target = make_arr( val )wd.show should be
          target = make_arr( val ) wd.show

          Thomas Thomassen — SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • TIGT Offline
            TIG Moderator
            last edited by

            There's a whole chunk of code lines between the two...
            Did you do the edit in a plain-text editor like Notepad.exe ? [or MAC equivalent - perhaps BBedit??]
            If you used a wordprocessor then it's added formating and messed up.
            Start again with a new file download... 😕

            TIG

            1 Reply Last reply Reply Quote 0
            • M Offline
              manamana
              last edited by

              This has been very useful - Thank you.

              what do the three values of the "up" field represent?

              1 Reply Last reply Reply Quote 0
              • TIGT Offline
                TIG Moderator
                last edited by

                @manamana said:

                This has been very useful - Thank you.

                what do the three values of the "up" field represent?

                The camera's 'up' is a vector [x,y,z]

                TIG

                1 Reply Last reply Reply Quote 0
                • L Offline
                  luismoreno
                  last edited by

                  This is a good plugin but it appears to work in inches only.
                  I've positioning a cámera at 2.00 meters height and Camera_Stats reports 78.74 units to Z eye and target coordinates.
                  It's possible ad all of the other units options (feet, milimeters, centimeters and meters) to plugin?
                  I don't know how to do due to my poor knowledge to ruby.
                  Thanks in advance.

                  1 Reply Last reply Reply Quote 0
                  • TIGT Offline
                    TIG Moderator
                    last edited by

                    @luismoreno said:

                    This is a good plugin but it appears to work in inches only.
                    I've positioning a cámera at 2.00 meters height and Camera_Stats reports 78.74 units to Z eye and target coordinates.
                    It's possible ad all of the other units options (feet, milimeters, centimeters and meters) to plugin?
                    I don't know how to do due to my poor knowledge to ruby.
                    Thanks in advance.
                    Eye and Target are Point3d x/y/z values in base-units [inches], Up and Direction are Vector3d x/y/z values.
                    To make them into say 'mm' edit the main .rb file in the subfolder using Notepad.exe or a similar plain-text editor...
                    Find the line that includes the text:
                    ... $cam.eye().x() ...
                    there are x/y/z versions for each of the 4 'types' of $cam methods... between lines #29 and #44 - 12 in all to change...
                    Add to each as follows:
                    ... $cam.eye().x()**.to_m** ...
                    etc
                    The additional ' .to_m' converts the passed value from inches into 'm'
                    There are other converters too - ' .to_mm', ' .to_cm', ' .to_ft' etc ...
                    So now at least you can convert your report to your desired units...

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • L Offline
                      luismoreno
                      last edited by

                      Thanks, TIG.
                      It appears running correctly.
                      You are a champion.

                      1 Reply Last reply Reply Quote 0
                      • C Offline
                        cartersmith943
                        last edited by

                        Thanks very much for the great plugin. I'm hoping to use it to show different variations of a product all next to each other within the same model. I'm trying to set a camera position in scene 1 to show product alt 1, slide the camera position along the x-axis for scene 2 to show the same view of alt 2, slide again for scene 3, etc.

                        After making the changes in the script suggested to luismoreno the camera position is shown in millimeters, but when I enter a new x value, the camera position moves much more than I specified and all the values change not just the x value. I know nothing about writing script so I'm sure there's something I'm doing wrong ^^.

                        Thanks in advance for any suggestions!

                        1 Reply Last reply Reply Quote 0
                        • C Offline
                          cartersmith943
                          last edited by

                          Should have included this in my original question....After checking some more, it looks like the plugin is giving the camera location information in millimeters after changing the ruby script as TIG suggested. However, if you try to input new coordinates based on millimeters, the plugin calculates them as if they are inches. That would explain why entering an x value of 5000 and pressing Send Data gives a camera position with an x value of 127000. 5000 inches = 127000 mm. When I changed the models units to work in inches the plugin was great.

                          Unfortunately anything beyond "find x and change it to y" gets out of my ruby script writing ability. This is a really valuable plugin and any suggestions on making it possible for those of us working in the metric system to use it would be much appreciated.

                          Again, thanks very much in advance.

                          1 Reply Last reply Reply Quote 0
                          • greenskpG Offline
                            greenskp
                            last edited by

                            I'm sorry for ressuciting this topic but if i orbit my view with Ctrl pressed i get rotation in my camera. It's possible have this information?
                            For example, create this same position and rotation in others 3d applications.

                            Thank you in anticipation

                            1 Reply Last reply Reply Quote 0
                            • josephkim626J Offline
                              josephkim626
                              last edited by

                              @tig said:

                              @luismoreno said:

                              This is a good plugin but it appears to work in inches only.
                              I've positioning a cámera at 2.00 meters height and Camera_Stats reports 78.74 units to Z eye and target coordinates.
                              It's possible ad all of the other units options (feet, milimeters, centimeters and meters) to plugin?
                              I don't know how to do due to my poor knowledge to ruby.
                              Thanks in advance.
                              Eye and Target are Point3d x/y/z values in base-units [inches], Up and Direction are Vector3d x/y/z values.
                              To make them into say 'mm' edit the main .rb file in the subfolder using Notepad.exe or a similar plain-text editor...
                              Find the line that includes the text:
                              ... $cam.eye().x() ...
                              there are x/y/z versions for each of the 4 'types' of $cam methods... between lines #29 and #44 - 12 in all to change...
                              Add to each as follows:
                              ... $cam.eye().x()**.to_m** ...
                              etc
                              The additional ' .to_m' converts the passed value from inches into 'm'
                              There are other converters too - ' .to_mm', ' .to_cm', ' .to_ft' etc ...
                              So now at least you can convert your report to your desired units...

                              This is great TIG, it worked for my model as well.

                              Although, I noticed there are something strange going on when I try to send the data in mm?
                              I suppose, it is a lot more complicated. so I ended up just converting my mm values into inches.
                              But, if there is any simpler solution, please let me know.

                              Thanks in advance.

                              1 Reply Last reply Reply Quote 0
                              • S Offline
                                skdeish
                                last edited by

                                Hoping to revive this thread yet again.

                                Does anyone know how to change the Focal Length rather than the Field of view? I can't figure out why that line is greyed out. I'd like to match to a Rhino camera and can only get Focal length from Rhino.

                                1 Reply Last reply Reply Quote 0
                                • mthsM Offline
                                  mths
                                  last edited by

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

                                  Advertisement