# Copying texture from one component to another

**URL:** <https://forums.sketchup.com/t/copying-texture-from-one-component-to-another/211258>\
**Category:** SketchUp\
**Created:** [October 21, 2022, 9:30am UTC](https://forums.sketchup.com/t/copying-texture-from-one-component-to-another/211258 "2022-10-21T09:30:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![karolis](https://avatars.discourse-cdn.com/v4/letter/k/d2c977/32.png) [@karolis](https://forums.sketchup.com/u/karolis)\
**Post date:** [October 21, 2022, 9:30am UTC](https://forums.sketchup.com/t/copying-texture-from-one-component-to-another/211258/1 "2022-10-21T09:30:39Z")

</div>

Hello,

Basic user going pro version over here. Working on Mac SU pro 2022

Can someone please guide me in how to copy texture from one component to another.

Say you have one or two sheets of veneer or a slabs of natural stone, each with a unique pattern (TEXTURE say slab of 1600x1100mm). You have drawn a cube (500x500x500) with all faces mitred 45 degrees and you want to position them on this sheet of veneer and find the best way to match the pattern, veins.

What I would do is have copies of all component of cube faces laid out on the sheet (the one 1600x1100) and would copy the positioned part of texture to the components so that my component copies in a cube formation would reflect the final design.

So, how do I transfer that part of texture to the components (without damaging the original texture “sheet”)?

I have seen it done on a Windows version of SU but cannot recreate it and don’t know if any extensions were involved.

Any guidance, references would be much appreciated.

Sincerely

Karolis

---

<div class="post-metadata">

**Author:** ![ene\_su](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/ene_su/32/103091_2.png) [@ene\_su](https://forums.sketchup.com/u/ene_su)\
**Post date:** [October 21, 2022, 9:57am UTC](https://forums.sketchup.com/t/copying-texture-from-one-component-to-another/211258/2 "2022-10-21T09:57:39Z")

</div>

Replacing a material without losing the texture positioning (aka UV mapping) can be a little tricky in SketchUp. Paint Bucket tool itself resets then texture positioning tool when painting a face.

I myself typically script this in the Ruby console, but I think there are plugins for doing it too. Someone else could please fill me in on that.

My method is to first select the face I want to get a material from, and then run this snippet in the Ruby console:

```ruby
material = Sketchup.active_model.selection.first.material

```

Then I’d select the faces I want to apply the material to, and run this snippet in the Ruby console:

```ruby
Sketchup.active_model.selection.each do |face|
  next unless face.is_a?(Sketchup::Face)
  face.material = material
end

```

---

<div class="post-metadata">

**Author:** ![RTCool](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/rtcool/32/181048_2.png) [@RTCool](https://forums.sketchup.com/u/RTCool)\
**Post date:** [October 21, 2022, 2:24pm UTC](https://forums.sketchup.com/t/copying-texture-from-one-component-to-another/211258/3 "2022-10-21T14:24:22Z")

</div>

I’m not sure if this will exactly do what you’re looking for, but you can try it. I’ve found Material Replacer to be a miracle tool for some tasks like this.  
[http://sketchucation.com/forums/viewtopic.php?p=224035#p224035](http://sketchucation.com/forums/viewtopic.php?p=224035#p224035)
