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

    [SOLVED]accessing scene transitions

    Scheduled Pinned Locked Moved Developers' Forum
    8 Posts 4 Posters 580 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.
    • P Offline
      Pout
      last edited by Pout

      In view menu-->Animation-->Settings it is possible to enable/disable scene transistions.
      Can this function be accessed by ruby?

      Thx!

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

        Sketchup.active_model.options.keys.each {|key| p key; Sketchup.active_model.options[key].each {|k,v| puts "> #{k} - #{v}"} }

        This returns all the model options you have access to:

        ` "PageOptions"

        ShowTransition - false
        TransitionTime - 2.0
        "SlideshowOptions"
        LoopSlideshow - true
        SlideTime - 1.0
        "NamedOptions"
        "UnitsOptions"
        LengthPrecision - 0
        LengthFormat - 0
        LengthUnit - 2
        LengthSnapEnabled - false
        LengthSnapLength - 0.0393700787401575
        AnglePrecision - 1
        AngleSnapEnabled - true
        SnapAngle - 15.0
        SuppressUnitsDisplay - false
        ForceInchDisplay - false
        "PrintOptions"
        PrintWidth - 7.0
        PrintHeight - 5.0
        ComputeSizeFromScale - false
        SizeInPrint - 1.0
        SizeInModel - 3.225830078125
        VectorMode - false
        FitToPage - true
        NumberOfPages - 1
        LineWeight - 0.5
        PixelsPerInch - 150.0
        SectionSlice - false
        ModelExtents - false
        PrintQuality - 3
        ScaleAdjustment - 1.0
        QualityAdjustment - 0.5`

        So you want: Sketchup.active_model.options['PageOptions']['TransitionTime']

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

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

          @pout said:

          For those interested can be set with:
          Sketchup.active_model.options[0][0]='false' or 'true'

          That is not a reliable way to set the options. Use the string keys. The numeric index differ from version to version.

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

          1 Reply Last reply Reply Quote 0
          • P Offline
            Pout
            last edited by

            thx again, I edited my text.

            1 Reply Last reply Reply Quote 0
            • P Offline
              Pout
              last edited by

              huuray for ThomThom!
              thx!

              For those interested can be set with:
              Sketchup.active_model.options[0][0]='false' or 'true'

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

                'false' won't work as it'll evaluate to true.
                Only false and nil evaluate to false.

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

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

                  @pout said:

                  Sketchup.active_model.options[0][0]='false' or 'true'

                  And 'true' and 'false' are Strings, and although they may work, the proper values are boolean true and false.

                  Sketchup.active_model.options["PageOptions"]["ShowTransition"] = true

                  (Fixed options key name from TransitionTime to ShowTransition)

                  Hi

                  1 Reply Last reply Reply Quote 0
                  • AdamBA Offline
                    AdamB
                    last edited by

                    Is it a known bug that

                    Sketchup.active_model.options["SlideshowOptions"]["LoopSlideshow"]

                    appears to be totally ignored by SketchUp?

                    I've checked back to SU6 and it is read/writable but the animation still loops if its set to false

                    Developer of LightUp Click for website

                    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