How to change color of several layers at once

Excellent!

On the positive side, it appears to do what one would expect. It no longer makes all layers visible like it did before.

It is a little disconcerting to watch layers disappear from the Layers panel but when it completes, they do reappear.

1 Like

In the previous versions of SU (when the trays was separated) I could do it to collapse/open the layer tray, but the collapse is no longer accessible via Ruby. :frowning_face: So it is what it is.

1 Like

I was just playing. This is a cool way to create a partial X-ray view without having to edit the materials. I did that for just steel parts in this model.

It would be nice to be able to choose Color by Tag for only a few tags and not all of them.

1 Like

I see now you are using SU2020 – at least referring to Tag’s and not confused that “Untagged” Tag still shown as “Layer0” in selection window… :blush: This should be adapted too >> Todo list!

You can select only a few tags/layers (as much as you want) already… Or you want to apply different colors and different opacity for same tags/layers?
Can you explain more, please!

1 Like

No. I could manage with the translation. :wink:

Actually what I was wishing for is the ability to show some tags/layers by color and others not. In my model of the key, I have the text labels on the bakelite base painted white. With color by tag, the white isn’t displayed. I’m not really thinking that this needs to be added to your extension, though. If I really wanted to make that happen, I know how to do it with Color by Tag.

do neither of these work any more?

  Sketchup.send_action('showLayerPanel:')  ## toggle Layers ## now tags
# or, but not both at once...
  Sketchup.send_action('toggleInspectors:')  ## toggle all Dialogs

john

Nope. :frowning_face: Only open it, but will not collapse… :frowning_face:

I think I get you now. So you probably would like to get something like separately select Color by tags, like:
image

Yes. That sort of thing could work. For my use, at least, it wouldn’t be a thing I would use all that often. Well, I didn’t think I’d use the Alpha setting for Color by Tag but I see some real possibilities with it.

1 Like

Well. DisplayColorByLayer is a RenderingOptions key.
The RenderingOptions class contains method to extract the rendering information for a model. The majority of the rendering information returned exists in the Styles dialog.

So, Currently can not be assigned to Tags…But I see a potential too! :crossed_fingers:t4:

1 Like

A component is actually a little SketchUp Model inside the Main Model, so it would be nice to apply different styles to them.

Hmmmm … Styles by Component. Very interesting. :thinking:

1 Like

Dezmo_layers_color_at_once_beta3.rbz (73.0 KB)

  • Fixed bug when Dashes wrongly set to “Default”, when opacity changed and no new Dash were selected.
  • Layer names are sorted now. (However not “natural” sorting…)
  • Toolbar icon has been changed. (Looks like a tags.)

Inputbox>>>HTML dialog, … and some more features will come slowly…

3 Likes

This is awesome, thank you. You just saved me a lot of tedious work.

I noticed one thing, not sure if it was mentioned earlier …
I opened the extension, hit ok for each screen of tags, keeping them all at ‘1’.
I want everything white, so I set all the values to ‘255’ (I didn’t touch the dashes option)
It did it’s thing and worked exactly as hoped.

Except that it removed all my tags from their tag folders. The folders are there, just empty, and the tags are all there, just not in their folders.

Thanks again.

Oh, Yes. The tag folder was added to SU and to the Ruby API after the plugin released. Therefore this can’t handle the folders…
Currently I cant promise if and when can I revise… :blush:

Ah … I was thinking that was the case.

Thank you again for making this – very appreciated .

Thank you so much for this! ~700 tags to give 16 different colours. You have saved hours of my life.

1 Like

Thank you for this! I just downloaded the last .rbz from this thread and tried to run it on Pro2021 on a MAC. I tried to set all the layers to color zero (trying to replicate Matt Donley’s section cut trick). Is there a way to do this?

If you tried, how you did it and what result you got?
What the “color zero” means? Did you put 0 s instead of Do not change! s to all Red, Green, Blue, Alpha fields in a corresponding box?

I did not checked what this trick does…


Note: Be aware the snippet is made for SU2019 and SU2020, so it will not handle the Tag Folder structure properly if you change the opacity. If you leave the “Do not change!” at the Alpha, it should be okay.
In any case it is beta version, use your own risk. Currently I did not planned to update.

1 Like

Yup, that is what I tried. (zeros for Red, green, blue and alpha) but no go. All good, I was just having fun trying it out. thanks for your response!