Can you sample a material in one file and use it in another on Windows?

On a mac I can use the paint bucket dropper and sample a texture in one skp file and use it in another.

But on windows the materials window seems linked to the skp file, so you can’t take the sampled colour with you.

Is there an easy way round this?

Many thanks for any guidance!

Simon

Select a face with a material > Ctrl+C, change to the other file and Edit > Paste in place.

In this mode, you transfer the material even if it is only a color or has texture.

There is a second eyedropper in the edit section of materials that will sample a pixel from anywhere on the screen.

1 Like

Thanks both - I do need to sample the texture, not just a pixel. Eg for wood grain. And I’d like the texture name picked up as well - as with the dropper.

I was hoping to find a way of doing this without copying and pasting faces as I’m creating quite an extensive collection of textures that my colleagues can select from and browse through with their clients. The copying and pasting option doesn’t look very slick if you are doing in multiple times with multiple textures.

I’m really trying to create a library of textures that all my colleagues can access, that I can keep up to date, and that requires no set up on my colleagues computers. That sounds like a big ask, but on a mac the dropper tool actually makes this easy (with the help of a file shared via dropbox). It is frustrating that on a windows a similar thing can’t work!

Why don’t you just save the textures into a local collection. You can do that easily enough with the secondary pane in the Materials panel open and set to the local collection folder. Then just drag and drop materials from the In Model collection to the local collection.
Screenshot%20-%2010_4_2019%20%2C%204_30_25%20AM

1 Like

Thanks Dave

That’s what I do for myself, but I’m trying to create a system for everyone to use.

We’ve got over 80 colours, 30 different wood finishes, and about 20 leathers and fabrics. And they get regularly changed. I can’t rely on my colleagues to keep their collections all updated - which is clearly important as otherwise they might sell things we no longer offer. Its easily done in the heat of the moment when you are working on the model with a client!

They can do the same thing.

Put one or two people in charge of keeping the materials collections up to date. They can add to or remove from the collections as needed. Put the collections folders in a common location that everyone has access to.

every computer could have a small SU ruby script that checks your server for the ‘current version’ of the folder, and install it automatically…

# first you need to add a txt file to the collection folder with "VERSION = 1.0.1" as content...
#  you would use your folder name
installed_version = Sketchup.find_support_file("version.txt", "Materials/My Textures/") rescue 'missing'
i_number = IO.readlines(version)[0][-6..-1].to_s
#  you would use your server path
update_version = File.expand_path( "~/Documents/Materials/My Textures/", "version.txt")
u_number = IO.readlines(update_version)[0][-6..-1].to_s rescue 'missing'
if installed_version == update_version
  UI.messagebox("Materials are current")
else
  msg = 'Installing new version '
  msg <<  u_number
  UI.messagebox("#{msg}")
  # a second method would check both folders and update the files en-mass  or individually...
  # :update_all()
end

this script will run if pasted into Ruby Console, as a proof of concept…
john

Thank you for this script John - much appreciated. I’ve barely dipped my toe into ruby scripting so I’m not quite up to adapting this to my purpose yet, but it sounds like the way forward.

So can i use a dropbox folder as a server path?

should be able to…

try that much by adding a folder with this in it… .version.txt (16 Bytes)

and drop a copy in …/DropBox/Materials/<your folder name>/version.txt
and a second into …/SketchUp/Materials/<your folder name>/version.txt

alter the paths and run the script, if that works, i.e. reports both there…

change the version number in the DB folder version.txt and see if it reports the difference…

I or someone else can come up with the other bits needed for a simple extension…

john

Thank you John - I’ve just sent you a message!
Simon