• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

Getting an active page

Scheduled Pinned Locked Moved Developers' Forum
9 Posts 4 Posters 254 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.
  • F Offline
    fuzzybro
    last edited by 14 Nov 2013, 10:28

    There is no method like model.active_page and PagesObserver doesn't return a 'page' object on the onContentsModified(pages) call. So, is there a way to get the active (selected) page from the API?

    V.

    [OctaneRender for SketchUp Overview and Demo Version(http://sketchucation.com/click.php?url)]

    Latest updates, tutorials and artwork
    facebook.com/octane4sketchup

    1 Reply Last reply Reply Quote 0
    • J Offline
      jiminy-billy-bob
      last edited by 14 Nov 2013, 10:55

      http://www.sketchup.com/intl/en/developer/docs/ourdoc/pages.php#selected_page

      25% off Skatter for SketchUcation Premium Members

      1 Reply Last reply Reply Quote 0
      • T Offline
        tt_su
        last edited by 14 Nov 2013, 12:32

        Don't you just love the consistency of the API? πŸ‘Š

        1 Reply Last reply Reply Quote 0
        • J Offline
          jiminy-billy-bob
          last edited by 14 Nov 2013, 12:49

          Haha, yeah πŸ˜„

          25% off Skatter for SketchUcation Premium Members

          1 Reply Last reply Reply Quote 0
          • F Offline
            fuzzybro
            last edited by 14 Nov 2013, 15:48

            Hah, nice πŸ˜„
            Thank got this method is even exist πŸ˜„

            Thanks a lot!

            [OctaneRender for SketchUp Overview and Demo Version(http://sketchucation.com/click.php?url)]

            Latest updates, tutorials and artwork
            facebook.com/octane4sketchup

            1 Reply Last reply Reply Quote 0
            • D Offline
              Dan Rathbun
              last edited by 14 Nov 2013, 16:08

              @tt_su said:

              Don't you just love the consistency of the API? πŸ‘Š

              Actually.. thinking a bit. The naming is correct.

              Why? Because you often are animating (in transition,) between two scene pages. After the first frame, you still are nowhere near being "in" the selected (target) page.

              Someone might argue that, once animation begins, there really is no active_page. (Ie, you are somewhere in limbo between the previous page and the target page.)

              I'm not here much anymore.

              1 Reply Last reply Reply Quote 0
              • J Offline
                jiminy-billy-bob
                last edited by 14 Nov 2013, 16:40

                Dan, I think TT meant this :

                model.active_layer
                model.materials.current
                model.pages.selected_page

                So much for consistency

                25% off Skatter for SketchUcation Premium Members

                1 Reply Last reply Reply Quote 0
                • T Offline
                  tt_su
                  last edited by 14 Nov 2013, 16:54

                  @jiminy-billy-bob said:

                  model.active_layer
                  model.materials.current
                  model.pages.selected_page

                  Don't forget model.styles.selected_style πŸ˜’

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    Dan Rathbun
                    last edited by 14 Nov 2013, 17:50

                    I know what he meant.. my arg still stands.

                    Sometimes "active" is appropriate.. other times "selected" is more appropriate. Still other times "current" may seem more appropriate.

                    There is a difference between the terms. They are not direct synonyms.

                    I'm not here much anymore.

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

                    Advertisement