Thanks fuzzybro for your explanation,
Here is a quick and "very" dirty workaround I apply to my models when lot of colorized textures exists.
If it could help others to wait for integrated fix into Octane.
Before :
After :
This ruby script export all colorized textures, reset materials and reload into SU.
Just save it as .rb file into your SU Plugins directory.
Warning: No warranty, no support. Use at your own risks. Save your files before.
Yours
Pascal
module OctaneFixColorizedTextures
def self.savecolorizedtextures()
model = Sketchup.active_model
materials = model.materials
temp_dir = Sketchup.temp_dir
puts "debug:temp_dir:"+temp_dir
tw=Sketchup.create_texture_writer
mats=[]
materials.each { |m|
if m.materialType==2
mats<<[m,m.texture.width,m.texture.height]
end
}
for i in 0...mats.length
g=model.entities.add_group
g.material=mats[i][0]
tw.load(g)
puts "debug:exporting"
tw.write(g,temp_dir+"/tempmat"+i.to_s+".jpg")
end
for i in 0...mats.length
m=mats[i][0]
m.color=nil
m.texture=nil
end
for i in 0...mats.length
m=mats[i][0]
w=mats[i][1]
h=mats[i][2]
m.texture=temp_dir+"/tempmat"+i.to_s+".jpg"
m.texture.size=[w,h]
end
end
end
UI.menu("Plugins").add_item("Octane:FixColorizedTextures"){OctaneFixColorizedTextures.savecolorizedtextures}