1
$\begingroup$

So, basically I have linked a group of meshes. The geometry needs to be linked in case I want to update the imported architecture model later, and keep all my new materials setting and attribution. (I model in Sketchup, render everything on blender.)

And then, all I want to do is to replace the materials of the linked meshes with new materials, but I can't do that?

I just want to have access to the greyed out drop down material menu in the material propreties panel, then replace this linked material with another one in the entire scene, but I can't? Why? It's just a replacement of the material, I'm not altering any data!

The only way I found is by changing the material in question from data to object.

But this solution requires me to change this for EVERY object one at the time and the "icing on the cake", it transform the material to single user so when I link a scene with 300 meshes, and some materials that have 120+ users, I'm just screwed...

What am I supposed to do?

$\endgroup$
  • $\begingroup$ not sure to understand: do you mean you have imported a object as a linked object? in that case you can change the material in the original file. Maybe what you rather need is linked duplications? $\endgroup$ – moonboots Jul 9 '18 at 15:17
  • $\begingroup$ Cycles Render or Blender Render ? $\endgroup$ – atomicbezierslinger Jul 9 '18 at 15:22
  • $\begingroup$ moonboots, no because if someone else decide to change the model , i have to delete it and re-import it , so all the work on materials are then gone $\endgroup$ – DB3D Jul 9 '18 at 17:26
  • $\begingroup$ atomicbezierslinge cycles $\endgroup$ – DB3D Jul 9 '18 at 17:26
  • $\begingroup$ Do you know how to create a group? If not search here at BSE or other place for 5 minute tutorial. $\endgroup$ – atomicbezierslinger Jul 9 '18 at 22:09
0
$\begingroup$

Changes via Script in Blender Render and Cycles [data to object]

Many of the changes can be done by Python Script.

You can make a selection of the objects a create a group. The selection can be done manually by clicking on the 3D View . Perhaps by spelling of name if that happens to be your case.

import bpy

#tested in blender render and cycles render lightly
def data_object_mat(groupname):
    for x in bpy.data.groups[groupname].objects:
        print(x.name)
        o = bpy.data.objects[x.name]
        m = o.material_slots[0].material
        o.material_slots[0].link = 'OBJECT'
        o.material_slots[0].material = m

#create a group with the name below in quotes or change the name
data_object_mat("MatGroup")


# this script does zero error checking and expects specific data to exist
# backup your file, create a discardable copy, use at your own risk
# you are responsible for any damages

The above script is still being tested. It is a starting point after you have created a group with the name in quotes. The Script iterates through the group and is intended to perform the desired actions.

Consider use only on a discardable copy of your file. Standard disclaimer. Backup your files every hour and use Scripts at your own risk. Scripts are put in the text editor window and executed. This is not a tutorial on any topic, because at the moment I do not have time. You may choose further research.

enter image description here

The image above shows the Run Script button and a group.

You may need to change your search to ... Python Script to [data to object] material. You may also look at Material addons in the User Preferences. Please improve my search suggestion.

If time is of the essence, for the above you may choose to do it manually.

Multiple Materials to One Material

copy linked materials nodes to local material

I saw something I believe here at BSE an question which brought up a material matching in the form of a Script. I believe it reduces multiple matching materials into one material. That script may be on the [Related column] on this same BSE page,

copy linked materials nodes to local nodes.

enter image description here

Above image shows some material addons. I have not researched these. The documentation button seems to link to non existant files.

$\endgroup$
  • $\begingroup$ @DorianBorremans ... Your comment above is incorrect and should be removed $\endgroup$ – atomicbezierslinger Jul 9 '18 at 23:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.