Apply A Color Pallet, Replacing Existing Materials

Continuing the discussion from Apply A Color Palatte to Replace Existing Materials:

DanRathbun, though you won’t share with TCD1317, will you share with the rest of us? Your solution doing this in console?

Duane, right now I’m a bit sore on this subject. So no, not at this time.

But, replacing materials is a very common workflow that has been discussed much in the forums over the years. A little time taken to search (likely over at SketchUcation) should reveal enough code snippets.

A few seconds search here brings up a previous post, (more than 2 years ago,) by myself on a similar subject, … in which I pointed readers to a free “Material Replacer” plugin by Thomas Thomassen.

Had we gotten past the “fleshing out phase” in the original thread (now locked,) I no doubt would have pointed the OP to this post, or just mimicked the advice I gave then.

However, Thomas’ plugin doesn’t do exactly what the OP asked about in the other thread,… it is more manual (ie, an eye dropper-like tool.) But it is a start.

[Q] Material Maintenance plugin - selecting various components but not the entire model - #4 by DanRathbun

Even using Thomas’ “Selection Toys” plugin, one can manually select all the rest of the objects that are painted with the selected object’s materiel, … and then manually choose a new material and “re-paint the entire selection”. Again, not totally automated, but a time (and money) saver none the less.


Thank you for the links.
I’m familiar with Thomthom’s Material Replacer, but what you elude to must be in the link you gave or found elsewhere.
I haven’t actually played with the Selection Toys plugin… so that intrigues me. I’ll go get it.

Thank you for the response, much appreciated. I’ll now go to the link provided.

the kwalkerman plugin does part of what I ‘think’ the ‘other’ poster needs and can possibly be extended to programatically switch materials…


1 Like

I’m not sure how Kwalkerman will help.
I believe that what the OP was searching for was an answer to an intriguing question, if I understood it correctly.

My solution to solve his problem would be manual by creating either a house group with same geometry, copy pasting the house in a separate file, changing all the materials, renaming as house two and then duplicate the process to have 8 identical homes but with different material options presented. Yes, it seems like allot of work, and heavy… but, that’s par for the course for me and it’s what I would expect. The other option would be to group all assets that would forego any changes, remaining identical in the neighborhood and make that selection a component, grouping all other assets that will be changed into a group, creating a layer for that group and then repeating the process with each new copy/paste in place as a new layer. But, this solves only half the issue and makes even more weight for each home that is pasted… with 8 layers that can be turned on or off within the house model. But, it doesn’t solve the issue of having 8 identical homes that are simply textured differently.

If I correctly understood the other person… the idea was to be able to have a single geometry in a house model group, but with the ability with a click of a mouse, to select a “layer” of material for that particular house. Now I can’t see how that would work as I have a “layer” mentality about this… which is why I’d resort to simply making 8 different models. But, IF THERE WAS A WAY… to do what I believe he was suggesting… then, that would be very cool.

if you have a model with zero materials, and a set of named groups than you can easily use ruby to assign materials to those groups…

you could also use the ‘DC’ trick of having the full material range for each group as small swatches on a hidden surface, then in ruby set ‘Wall to plaster_01’, ‘Floor to pine_06, Roof to roof_tiled’, etc… could be extremely quick as all materials are already in the model…

all the bits exists in different plugins, but without an example file from the OP it was impossible to advise on the next step…


1 Like


So, it is possible to have a copy/pasted or duplicate group (not sure that this can apply to components as they would change throughout the whole model) or component and click on one… select a palette of swatches and have that group be different than the identical house model next to it… with a click? I’m assuming that these swatches on geometry or hidden layers… So, how would one house model respond differently than duplicate next to it… if this is on layers?

Or am I completely missing the point you made? (that’s quite possible as I just confused myself even more)

Duane, do this:

  1. Open SketchUp, a new blank model.
  2. Go to the Components browser panel.
    a. Go to the “Components Sampler” collection.
    b. Choose “Car Sedan”, and place one in the model.
  3. Set render style to “Shaded with Textures”, Xray off
  4. Activate the Dynamic Components “InteractTool”.
  5. Click the skin of the car on top of the roof.
    (Not the doors as they’ll just swing open & closed.)

Note the swatches that appear. Choose the blue one.

No wait, the customer behind just said they want a red sedan.
Click again with the Interact cursor, and choose Red.

Your customer is happy,… print a copy for them. Generate a report, etc…

Now, imagine the component is the front door of a model home. The customer wants a red door.
If it’s a DC, click it and choose Red.

Imagine the roof is a DC,… click and choose the style and color of covering.

Imagine the outer walls are a DC. Click and choose color of paint.

Etc.,… etc.

Can you see it drastically reduces the number of model files you would have ?

There would still be some different files, for example when the roof structure changes (hip, mansard, etc.) Or when the type of wall treatment changes. (Ie, stucco, paint, siding, board & batten, brick, stone, etc.)

Window types would be another reason to have a separate file. (I don’t know if having a bunch of window layers with a bunch of different window brands or styles all in one file is a good idea. I mean yes it is doable. But the file is going to be huge.)

1 Like

Karen’s utility is very similar to Thomas’ “Select Active with Selected Material” command, in that it creates a selection set. Once done, you can choose another material and re-paint the entire selection set. (Karen’s just hides everything that is not in the new selection set.)

But this functionality is already built-into SketchUp (at least on the PC.)
All you need do, is go into the “In Model” materials collection, right-click one of the materials (that which you wish to change,) and choose “Select” from the context menu.
All those painted objects (in the current active context,) are selected.
Then choose another material and click upon the selection anywhere. (Any one of the selected objects.) They will all be re-painted.

1 Like

Not group. Component. DCs need the toplevel to be a component. But yes, the material application is applied to a component instance. So if you were modeling a residential development with each house the same, each house instance could have it’s own material setting, with a click.

1 Like


Thank you so much for taking the time. I so much appreciate this. Time to read through your comments with SU open and give these options a try. Good man! Again, thank you.

1 Like

Hi @duanekemp, I’m curious if you ever found a solution to this issue?

This post is so old, I had to read it twice to catch up and after doing so, can’t remember exactly what it was I was working on at the time. However, no matter what the project was, reading the responses in the thread were refreshing and I’m assuming that @DanRathbun 's comments were the answers I was looking for. I invite you to read the thread above for the solution if this is an issue you are dealing with.