How to apply materials by Tag?

As @dezmo said, Outliner is you friend. It helps you to avoid entering in each component recursively.
I think you have a model that comes form IFC file, the structure is IfcProject, IfcSite, IfcBuilding, IfcBuildingStorey 1,2,3… and inside the last levels you have walls, windows, doors…
With Outliner you can select instances without entering in their components.

1 Like

Plan B then I would take 5 minutes to apply an unique color (low opacity) to all of the glass panels.

Then, if you want to change, you only need to change the specifics of your material, all the faces painted with it will change.

I call it foreshadowing. I’ve use this method a few times, I work alone, and after 15 years on SU I’m very good at planing ahead.
These days I mostly use the colour trick (changing the material changes it everywhere), and it had the amazing benefit of working with other’s people work. I just need to take 2 min to apply my colours instead of theirs when I import, and it is on.

Sure, it requires a bit of work at the start, but regardless of the method (color, tags…) if as you say you import elements from different people on different softwares, you’ll probably need this bit of work.

If you feel limited by the native tools, extensions are there, I’m thinking of Paint Thru by Fredo6, but there are probably other extension creators who felt limited by the tool like you do.
edit : @mihai.s seems to have found exactly what you’re looking for.

——

Softwares are like languages, you can’t expect french grammar to work like Finn grammar, the same way you can’t expect SU to work exactly like rhino or autocad. You have to adapt your way of working every time you change software.

I didn’t have the same design approach in archicad, SU or vectorworks, the same way I don’t have the same cognitive process in french, english and german.

Finding the right extensions… for ‘how to apply materials by tag’.
If someone need a more detailed explanation of the two methods provided to help learn and understand, write a comment into this thread.

@ShynnSup you have repeatedly called Sketchup Non Professional, even cumbersome and prehistoric, why do you continue to waste your time and ours with it.
Why don’t you go and use one of your professional tools, or actually spend the time learning how this steam driven hobby tool actually works.

2 Likes

@Box You decide what to do with your time, don’t try to hold me accountable for that.
In the real world, some people just don’t have the luxury of using the software they personally prefer. Simple as that.

1 Like

But they do have the option to actually learn how to use the one they have to use.

1 Like

Isn’t sketchup praised for being easy? Full of contradictions I see. I know how to use this little toy.

You have proved in this thread that you don’t.

You are mistaken, Me wanting the software to work x why does not mean I don’t know how it works.

The whole point of this thread was to keep proving how bad this software is. Provide a simple problem and see if someone can come up with a solution, which no one did. There is nothing to be learn here.

Unfortunately the forum guidelines make it impossible to reply. Or continue in the thread.

Can you provide feedback on what you didn’t like about the two methods of applying material by tag provided (with Paint tool and with V-Ray extension)?

3 Likes

the software isn’t bad. Again, pardon my metaphor, it would be like calling french a bad language just because you can’t grasp its grammar rules, despite millions of people having little to no issue with it.

We’ve provided you with solutions, workaround, best practices, we’ve explained the logic behind the software, several way of doing things in a good manner, including solution for objects with multiple origins and an extension that apparently answers the specific problem you have.

  • Apply a material one of the "geometry " in a question. The Tag assigned to this geometry will be used to find other geometries to which assigned a same Tag.

  • Select only this geometry on were the desired material applied.

  • Open Ruby console and copy paste the “quick & dirty” snippets below and hit Return (Enter).

  • A popup will come, and if you answer OK the material will be applied to other geometries which are in groups or components.
    (If the geometry a face, only the front face material will be considered and applied to front face.)

  • There will be a summary popup at the end.

You can undo it at once.

No warranties! Backup your modell before try! Use on your own risk!

matbytag

def materials_by_tag
  model = Sketchup.active_model
  defs = model.definitions
  selection = model.selection
  return if selection.empty? || !selection.single_object?
  sel1 = selection.first
  mat = sel1.material
  mat_name = mat ? mat.name : "Default (No material)"
  layer = sel1.layer
  text = "Apply material: #{mat_name} to all element in a model asssigned to Tag: #{layer.name}"
  result = UI.messagebox(text, MB_OKCANCEL)
  return unless result == IDOK
  count = 0
  model.start_operation(text,true)
  defs.each{|d|
    d.entities.each{|e|
      next unless e.respond_to?(:material)
      next unless e.respond_to?(:layer)
      next if e == sel1
      if e.layer == layer
        e.material = mat
        count += 1
      end
    }
  }
  model.commit_operation
  UI.messagebox("Material: #{mat_name} applied to #{count} drawinglelement.", MB_OK)
end
materials_by_tag

1 Like

Sure, thank you for providing those methods and taking the time to record the video. I am sure someone who visits this topic will find it useful.

Sadly I am using Enscape, and it is not up to me. Using V-Ray would disrupt an entire office’s workflow. (I am no fan of Enscape either though).

Second Method seems more of a general approach, but in the end it’s an alternative version of the Outliner isn’t it? You have 1 component which is glass across 3 windows. I don’t, each windows is a sole geometry. The problem is not so much having to enter the component and changing the material of a single window, it is having to do it for an entire masterplan.

People here think the glass is the only problem. What about slabs, walls, rails, louvers, roofs, etc? I just endless madness of clicking, on a model that is already pretty heavy and laggy.

V-Ray functionality should be native Sketchup. The key step, you didn’t have the need to select anything! Just change the material from the tags. Imagine changing material of things without having to select them! Mind blowing I know.

No.

No.
I used only groups and all different ones. So you can apply the second method for your case as well, with different components.

It will work with the other elements, like slabs, rails, etc… with minimum number of clicks. There is no need to open any group/component or nested groups/components.
Test and learn new possibilities to work efficiently in SketchUp.

It’s definitely the best way to go around it seems.

It is still funny to me people defend the software but then it is full of extensions that try to mimic basic functionalities such as ‘select all on active layer’ or ‘apply layer’. Both using the keyword ‘layer’. It’s honestly crazy. Lecturing me about workflows :rofl:

Anyways, will choose your solution so that people can go directly to it in the future. Thanks.

At the end, you learned something new about working in SketchUp that is useful to you and your colleagues.
You’re welcome!

I learnt there is an extension that almost makes applying materials per tag possible. I am not sure that is learning Sketchup.

All I can say here is wow! If there is any little bit of knowledge here you should take from this thread is how to properly use Tags in SU. All edges and faces should be untagged. Only groups and components should be tagged. Doing otherwise will lead to so many issues in visibility control.

SketchUp is not like “Industry Standard”. CAD programs and every day in my two decades of using this program I say thank you SU!

4 Likes

@Sonder don’t bother feeding the troll.

3 Likes