Adding named textures to face

We can use Sketchup named colours like:
groupname.material = "Purple"
But I want to reference the standard textures like:
groupname.material = "Translucent Glass Sky Reflection"

there is no ‘shortcut’ for textures, you need to extract the path to the SU ‘Texture’, add it to the model.materials then assign it to your group…

john

A belated “Thank you” :slight_smile:

The code below is working, until I add the alpha line. Not sure what I am doing wrong

texture_path = Sketchup.find_support_file "clear_glass.jpg", "Plugins/Grand_Vista_Three_Season/"
materials=mod.materials
glass = materials.add "Clear Glass"
glass.texture = texture_path
glass.texture.size = 72
# glass.alpha = .5
sash_left_glass.material = glass
sash_left_glass.back_material = glass

try
glass.alpha = 0.5

I think you need the zero for floats…

john

1 Like

jeez… I forgot that
thx again