[Plugin] Turn Off Layer in All Scenes

[Plugin] Turn Off Layer in All Scenes

Postby oregon_cowboy » Thu Nov 17, 2016 8:55 pm

Hi All - I've been writing small, simple SketchUp plugins for several years for my own use and finally got the courage to share. So forgive me if I am breaking protocol on the best way to submit plugins to this site (please let me know how to do it correctly in the future).

I am starting with sharing this very simple plugin that turns off a selected layer in all scenes. I have seen a several requests in the past of turning off newly created layers in all scenes but hadn't found a direct way to do it (if I missed something, I apologize). There are some great plugins that allow work arounds including Layer Manager and Auto-Invisible Layer. But these are a bit different/more complex than what I wanted/needed. So I created my own simple plugin and am now sharing it here.

Without further ado....

# Name : Turn Layer OFF In All Scenes (TOLIAS)
# Description : Turns selected layer off in all scenes
# Usage : Select a layer in the standard layer window (selected, with the dot filled in).
# Activate plugin via Extensions >> TOLIAS. Confirm the layer you are turning off
# and press okay. Layer will be turned off in all existing scenes.

Its been tested extensively in SketchUp 2015, 2016, and 2017. But please feel free to let me know if you find any bugs.

Thanks.
5

oregon_cowboy 
 

Re: [Plugin] Turn Off Layer in All Scenes

Postby 0nomat0 » Fri May 31, 2019 4:09 pm

Excellent idea -- thank you! Seems to be working in SU 2019, although I haven't tested extensively.

Also, thanks for sharing the raw RB file, which is nicely commented. I'm looking at it trying to figure out how to make a version that turns ON a layer in all scenes (maybe I could just cut/paste-in-place the layer's contents). I'm quite new to Ruby, and this looks like a nice script to play with.

Users, note that you must set the target Layer as active -- not just highlight it. Also, using undo doesn't undo the TOLIAS operation -- I suppose because it only undoes the Layers operations, one per undo, without updating each scene again. This is typical SketchUp behavior -- undo doesn't undo Scene updates, unfortunately.
1

0nomat0 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Extensions & Applications Discussions

Who is online

Users browsing this forum: dennismugu7 and 2 guests

Visit our sponsors: