Material positioning using the default material



Something that just has come to my attention is that SketchUp, contrary to popular belief, actually does support having a texture positioning (aka UV mapping) set for a face that does not have any texture applied. This can be useful inside groups or components to make the texture positioning apply when painted from its outside (see image).

This is a quite obscure behavior though since applying the default material using the Paint Bucket Tool also purges the texture positioning. The trick to change the material while maintaining the texture positioning is to use the ruby API.

To achieve this do the following:

  1. Position the texture as usual (I’m not covering that here)
  2. Select all faces you want to apply the default material to
  3. Open the ruby console (Window > Ruby Console) and run “Sketchup.active_model.selection.each { |e| e.material = nil if e.respond_to?(:material); e.back_material = nil if e.respond_to?(:back_material) }” (without quotes).

If these faces exist within a group or component, and you don’t paint them again using the paint Bucket Tool, the texture positioning should be maintained when painting the group/component as a whole.

Example model download: