• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[Plugin] Add Layer [1.1.0]

Scheduled Pinned Locked Moved Plugins
58 Posts 23 Posters 12.7k Views
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
    Jim
    last edited by 9 Mar 2014, 16:43

    For discussion of Add Layer plugin.

    v 1.1.0 Apr 10, 2014

    • Added ability to modify layers.

    v 1.0.1 Mar 24, 2014

    • Bug fix release.

    Hi

    1 Reply Last reply Reply Quote 0
    • U Offline
      utiler
      last edited by 11 Mar 2014, 05:40

      @jim said:

      For discussion of Add Layer plugin.

      Instant gold, Jim! I don't know how many time I've been working on a complex model with multiple scenes and when I add a new layer for the scene I'm working on then have to go back through each and every scene to turn it off... this'll be a big time saver!!

      Am I right in saying its been a while since you've publishes a script???

      πŸ‘

      purpose/expression/purpose/....

      1 Reply Last reply Reply Quote 0
      • O Offline
        otb designworks
        last edited by 11 Mar 2014, 12:58

        Awesome! Any way to change the layer behavior after it has been created?

        For instance, if I make a layer and choose for it to be hidden for new scenes, but then I change my mind and want it visible for new scenes, is that possible to change?

        thanks!

        Cheers, Chuck

        OTB Designworks is on Youtube

        6 core nMP, 32 gig RAM, (2) D700 GPU's, dual monitors

        1 Reply Last reply Reply Quote 0
        • J Offline
          jiminy-billy-bob
          last edited by 11 Mar 2014, 13:11

          πŸ‘
          Maybe add an option to choose the color in SU2014?

          25% off Skatter for SketchUcation Premium Members

          1 Reply Last reply Reply Quote 0
          • D Offline
            db11
            last edited by 11 Mar 2014, 18:09

            @otb designworks said:

            Awesome! Any way to change the layer behavior after it has been created?

            For instance, if I make a layer and choose for it to be hidden for new scenes, but then I change my mind and want it visible for new scenes, is that possible to change?

            thanks!

            Not sure from within this plugin, but the VisMap plugin is invaluable for managing scene/layer visibility:

            [Plugin] VisMap 2 - Improved Layer/Scene Visibility Map by MartinRinehart
            http://sketchucation.com/forums/viewtopic.php?t=23029

            It populates a layer/scene matrix and allows you to see in one glance which layers are set to visible in what scenes -- and allows you to toggle visibility across all scenes / layers. Not sure if it's 2014 compatible as it was last updated in 2009.

            I'm using it in SU8 and it works perfectly.

            1 Reply Last reply Reply Quote 0
            • J Offline
              JQL
              last edited by 11 Mar 2014, 20:23

              Uhh... So many layers of information between you two J's...

              Jiminy, I know it seems I'm stalking you but what if your "new layer" icon would be able to launch this plugin if we choose it to on preferences?

              Actually both plugins look good together too...

              Would you guys mind?

              www.casca.pt
              Visit us on facebook!

              1 Reply Last reply Reply Quote 0
              • T Offline
                TECHDAVE02
                last edited by 11 Mar 2014, 20:40

                There add scenes layer that works / on only that scene or you can update it to work in other scenes works well for dimensions http://sketchucation.com/forums/viewtopic.php?f=10%26amp;t=36583

                http://sketchuptips.blogspot.ca/2007/08/add-hidden-layer.html

                1 Reply Last reply Reply Quote 0
                • J Offline
                  jiminy-billy-bob
                  last edited by 11 Mar 2014, 21:16

                  @jql said:

                  Uhh... So many layers of information between you two J's...

                  Jiminy, I know it seems I'm stalking you but what if your "new layer" icon would be able to launch this plugin if we choose it to on preferences?

                  Actually both plugins look good together too...

                  Would you guys mind?

                  Haha, you're reading my mind. I was thinking about something like this today: Maybe replace the buttons in the menu that pops up when you hold-down click on the add-layer button in Layers Panel, by one that opens Jim's plugin if it's installed.

                  http://i.imgur.com/yKpZ3ZY.png

                  Jim, would you be okay with this?

                  25% off Skatter for SketchUcation Premium Members

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    Jim
                    last edited by 11 Mar 2014, 21:44

                    @utiler said:

                    @jim said:

                    For discussion of Add Layer plugin.

                    Instant gold, Jim! I don't know how many time I've been working on a complex model with multiple scenes and when I add a new layer for the scene I'm working on then have to go back through each and every scene to turn it off... this'll be a big time saver!!

                    Am I right in saying its been a while since you've publishes a script???

                    πŸ‘

                    Thanks, utiler. This extension is really an upgrade to my old "add hidden layer" plugin from back in 2007. But instead of me deciding what layer behavior you need, you get to choose.

                    Much of the credit goes to Thomthom for his SketchUp UI code. The code for adding the layer is about 25 lines of code. The other 2500 lines are for the user interface. In the past, UI for extensions was a real barrier to their creations. Recently, this barrier has been falling.

                    It has been a number of years since I have released a plugin, although I have been hacking on a few of the SketchUp Community Extensions on GitHub.

                    And with the SketchUcation Plugin Store making so much easier for people to upgrade, I hope to continue upgrading some of my old plugins.

                    Hi

                    1 Reply Last reply Reply Quote 0
                    • J Offline
                      Jim
                      last edited by 11 Mar 2014, 22:23

                      @jiminy-billy-bob said:

                      Haha, you're reading my mind. I was thinking about something like this today: Maybe replace the buttons in the menu that pops up when you hold-down click on the add-layer button in Layers Panel, by one that opens Jim's plugin if it's installed.

                      http://i.imgur.com/yKpZ3ZY.png

                      Jim, would you be okay with this?

                      I don't mind, but I really think you should implement this in Layers Panel natively, rather than call my plugin. You should try to keep your interface consistent. Then, maybe add a separate LP sub-menu-item for "add a new layer" for people who who want to add a Layer without opening the main LP dialog.

                      I have Layers Panel installed, and know for a fact you would do a better job with the user interface than I can. πŸ˜„ Besides, you likely have most of the functions already in your code.

                      Hi

                      1 Reply Last reply Reply Quote 0
                      • J Offline
                        jiminy-billy-bob
                        last edited by 12 Mar 2014, 13:36

                        Something like this, then? (With credit to you, obviously!)

                        http://i.imgur.com/q5SdJiH.png

                        25% off Skatter for SketchUcation Premium Members

                        1 Reply Last reply Reply Quote 0
                        • tt_suT Offline
                          tt_su
                          last edited by 12 Mar 2014, 13:59

                          Note that in SU older than 2014 creating layers with the special flag might cause SU to trigger the Fix Model dialog. That warning is a bug - nothing was messed up, it was the validation code that was wrong. And the Fix Model dialog will reset the flag unfortunately.

                          1 Reply Last reply Reply Quote 0
                          • N Offline
                            Nortti
                            last edited by 12 Mar 2014, 16:18

                            Thank you for the 'Add Layer' plugin! This is a huge time saver. Although, when I select "Layer visible on selected scene only" it does not create a layer. Am I missing something? Still even without this feature it's a success.

                            Thanks for any help in getting this fully working.

                            Mac OSX 10.9.2 / SketchUp Pro 2013

                            1 Reply Last reply Reply Quote 0
                            • J Offline
                              Jim
                              last edited by 12 Mar 2014, 21:00

                              @nortti said:

                              Thank you for the 'Add Layer' plugin! This is a huge time saver. Although, when I select "Layer visible on selected scene only" it does not create a layer. Am I missing something? Still even without this feature it's a success.

                              Thanks for any help in getting this fully working.

                              Mac OSX 10.9.2 / SketchUp Pro 2013

                              You should get a dialog if you select this option an there are no Scenes in the model. If there are Scenes in the model, then please try to select this option while the Ruby Console window is open. Are there any errors shown?

                              Hi

                              1 Reply Last reply Reply Quote 0
                              • J Offline
                                jiminy-billy-bob
                                last edited by 12 Mar 2014, 21:49

                                @tt_su said:

                                Note that in SU older than 2014 creating layers with the special flag might cause SU to trigger the Fix Model dialog. That warning is a bug - nothing was messed up, it was the validation code that was wrong. And the Fix Model dialog will reset the flag unfortunately.

                                The only flag causing an issue is "LAYER_HIDDEN_BY_DEFAULT", isn't it?

                                25% off Skatter for SketchUcation Premium Members

                                1 Reply Last reply Reply Quote 0
                                • J Offline
                                  JQL
                                  last edited by 12 Mar 2014, 23:35

                                  @tt_su said:

                                  Note that in SU older than 2014 creating layers with the special flag might cause SU to trigger the Fix Model dialog. That warning is a bug - nothing was messed up, it was the validation code that was wrong. And the Fix Model dialog will reset the flag unfortunately.

                                  Ahhh! So that's why my models needed fixing everytime!...

                                  www.casca.pt
                                  Visit us on facebook!

                                  1 Reply Last reply Reply Quote 0
                                  • J Offline
                                    Jim
                                    last edited by 13 Mar 2014, 00:48

                                    @otb designworks said:

                                    Awesome! Any way to change the layer behavior after it has been created?

                                    For instance, if I make a layer and choose for it to be hidden for new scenes, but then I change my mind and want it visible for new scenes, is that possible to change?

                                    thanks!

                                    I could implement editing by using a Listbox instead of a Textbox...

                                    2014-03-12_201733.png

                                    But then I'd need a dialog for the new layer name...

                                    2014-03-12_202033.png

                                    Or perhaps not even have the add new layer option - just have the plugin be a layer behavior editor.

                                    ❓

                                    Hi

                                    1 Reply Last reply Reply Quote 0
                                    • J Offline
                                      Jim
                                      last edited by 13 Mar 2014, 00:51

                                      @techdave02 said:

                                      There add scenes layer that works / on only that scene or you can update it to work in other scenes works well for dimensions http://sketchucation.com/forums/viewtopic.php?f=10%26amp;t=36583

                                      http://sketchuptips.blogspot.ca/2007/08/add-hidden-layer.html

                                      The option to make the layer "visible on the selected scene only" should work, no?

                                      That's my blog you linked to - and this plugin is an update to the one you linked to.

                                      Hi

                                      1 Reply Last reply Reply Quote 0
                                      • K Offline
                                        ktkoh
                                        last edited by 24 Mar 2014, 19:36

                                        I downloaded this plugin from the SU Store for the purpose of learning the SKUI interface.
                                        However while testing I was not able to get the check box "Layer visible on selected Scene only" to create a new layer.

                                        Error; #<NameError; undefined local variable or method `txt_LayerName' for JF;;AddLayer;Module>
                                        C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/main.rb;155;in `add_layer'
                                        C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/main.rb;110;in `block in main'
                                        C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/SKUI/events.rb;82;in `call'
                                        C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/SKUI/events.rb;82;in `block in trigger_event'
                                        C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/SKUI/events.rb;78;in `each'
                                        C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/SKUI/events.rb;78;in `trigger_event'
                                        C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/SKUI/window.rb;357;in `event_control_callback'
                                        C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/SKUI/window.rb;311;in `callback_handler'
                                        C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/SKUI/window.rb;269;in `block in add_callback'
                                        C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/SKUI/window.rb;203;in `call'
                                        C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/SKUI/window.rb;203;in `show_modal'
                                        C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/SKUI/window.rb;203;in `show'
                                        C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/main.rb;145;in `main'
                                        C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/main.rb;185;in `block in <module;AddLayer>'
                                        -e;1;in `call'
                                        

                                        The other options worked as expected. Note: this also failed in 2013 with a slightly different error message.

                                        Keith

                                        1 Reply Last reply Reply Quote 0
                                        • J Offline
                                          Jim
                                          last edited by 24 Mar 2014, 20:07

                                          Keith - I am looking into this, but can not reproduce it in any version from 2008 thru 2014.

                                          Hi

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

                                          Advertisement