@dillow said:
I do not have the skm collections. I do have old Sketchup files with materials in them but I thought it'd be just easier to download the jpgs (mostly from manufacturer tileable images). But converting hundreds of jpgs to skis isn't fun.
Here is a version of the method I use to load materials into a model.
module DILLOW
def self.materials_from_file
@mod = Sketchup.active_model
@textures_from_file = []; @images = []; @image_path ||= File.dirname(__FILE__)+"/*.*"
@image_path = UI.openpanel("Texture Files",@image_path)
unless @image_path==nil
image_folder = File.dirname(@image_path.gsub('\\','/'));
@images = Dir[image_folder+"/*.{jpg,png,tif,bmp,gif,tga,epx}"]
@images.each{|i| @textures_from_file<<File.basename(i,'.*')};
if @textures_from_file[0]
@textures_from_file.each_with_index{|name,i|
unless @mod.materials[name]
mat = @mod.materials.add(name)
mat.texture = @images[i]
end
}
end
end
end
end
DILLOW.materials_from_file
Copy and paste into Ruby Console and press Enter to execute. Select any image file and click Open.