5

How do I copy from one object to other selected object only the "diffuse colour"?

Or any other material property to other multiple selected objects materials?

Why "Copy To selected" is greyed out in right click menu?

Copy diffuse colour from B to all objects in the column A

enter image description here


Note 1: i know to the manual or long process of hovering over th colour and copying it "Ctr+C". And then select target object go to material and hover on colour and paste "Ctrl+V"

Note 2: I don't intend to copy complete or all material properties

ashwin
  • 1,739
  • 2
  • 21
  • 46

2 Answers2

5

I think a small python script is the only way. This script only works for Blender Render.

import bpy

active_obj = bpy.context.object
active_obj_material = active_obj.active_material

for obj in bpy.context.selected_objects:
    if obj != active_obj:
        obj.active_material.diffuse_color = active_obj_material.diffuse_color

I use active_material so that objects with more than one material will use the material that is selected in the list, rather than forcing slot1 to always be used.

sambler
  • 55,387
  • 3
  • 59
  • 192
0

There is a possible work around with the node editor if you wanna avoid python. You can 'ctrl c' a color node from object 1, select object 2 and then 'ctrl v' to drop it into object 2's material node editor:

1.

Node editor of object 1, with colour (red) I'd like to copy - 'ctrl+c' with relevant node selected

2.

Node editor of object 2 with wrong colour (orange)

3.

Paste 'ctrl+v' to drop in the node with desired colour node. Use the eye dropper tool at this stage if you'd like a different property node to have the red colour.