Simple Material Replacement

by olanders.se in Addons


Simple Material Replacement

Simple Material Replacement* Addon stores and reuse material names on obejcts. Once set it is simple to write back materials to objects that already are in the material data base. 

Also in the PRO version there are features for selecting items that have already been set, simple selection of "special obejcts" with the ability to quickly import the item to the current blend file. There is also the option to select items that can be hidden or deleted (will provide faster rendering if these items are deleted or moved to another layer).
*Works for cycles and is also tested with Octande render for Blender, works with Yafaray addon for Blender also.
Note: This addon does not create materials, it saves and write back the material names on objects. Also it only saves one material name for each object. 


Note: Now also the PRO version is available for Blender 2.8, 2.9 and 3.0. 

Background

3D objects in visualized constructions are often created from 3D Cad. These 3D objects usually consist of copies of a number of basic details used to build a machine or construction. When exporting and importing from 3D cad to the visualization environment, duplicates of in-depth details are created, such as screws, nuts, plates, and more. This is done because a single detail in the 3D cadden can be represented by the same detail but that it is located in several different places. In the visualization programs, the same detail must be created for each location where it is actually located. This creates an incredible amount of 3D objects / details.

Placing the right material in the visualization program on all of these items / details is a time-consuming job. Some details can also be removed, which will not be shown in the image.


With the help of the 3D visualizer Blender and my own written addon, I have automated this process. This addon reads the name of each imported object / detail in Blender and sets the correct material next to a previously created database. There is also an option to highlight the details that can be deleted to speed up the rendering time in the program.

Main features

  • Saves objects material names in Material Data Base
  • Replace material on objects with information from Material Data Base
  • Easy to add materials from other blend file
  • Will set material to "Not Found" if the material is not in Material Data Base
  • Write over material in the Material Data Base with new/other material
  • Check and remove duplicated material

PRO version also include

  • Select material that already exists in the Material Data Base
  • Be able to make special objects in another file, do selections base on that information and also easy import selected object to current blend file (it also place the imported object to selected obejct)
  • Make a second database where information can be stored about obejcts that can be removed or deleted. 
  • List material used by obejcts in the blend file
  • Depending on the name of the imported files it is possible to change what should be the parameters that tells what parts are the same. Default is still "." (Included in the updated version 1.1.00)


Update 2019-03-09

  • New function to in the addon. Now it also have got a function for batch import 3D files. You can import different 3D files, like .obj. .fbx and .stl and the output will be one new .blend file for each input file. It also makes a group in each .blend file if you want to link or append it to some other .blend file.


Update 2020-02-02

  • Added the function to scale imported object, only i version 2.8x

Update 2021-01-24

  • Now it is possible to set the different settings in preferences.

Who is it for?

This addon makes it quick and easy to set material on many items, once it has been set one time before. Works very well when many obejcts from 3D cad files are imported over and over again. Me myslef has saved days of working time with the help of this addon. Mainly the addon is for those who use Blender to make 3D renders from 3D Cad or architecture.

Don't know if this addon is for you, please send me a message.

How to use

Start with a new blend file and set up all materials that is used. Make sure that they are saved inside the blend file by making them "Save this data block even if it has no users". This is done by pressing "F" for each material.

Open up our blend file to set material to objects. For the first run set the name and the folder for the materialdata base file in the addon. Also set the path to where the blender file is that contains all the material that is going to be used. 

Next import our obejct to the blend file or if they already exist skip this stage. Then import the material with "Add Material from base file". Set the materials to the objects. When done select the obejcts and press "Add material to file". 

Start a new file (set the correct path to material data base file and material base file) import objects to this file. Press "Add Material from base file"  and then select parts to add material to press "Write mtrl to parts". All objects that are not yet found in the Material Data Base file will get the material "Not Found". Select these objects and move to a new layer. Then set material to the objects that not yet are set and add them to the Material Data base. 

Objects name and about material

The name that is used for each object are based on that only the first part of the name is used. This means that cube cube.001 cube.002 cube.003 and so on will all be treated as "cube" in the Material Data Base. The effect is that only "Cube" are stored with some kind of material for example "Red". All objects with name cube will have there material set to "Red" when material is applied to these obejcts.
Note: the name that is used is everthing until the dot in the objects name.
Note2: Since version 1.1.00 it is possible to set the parameter as you like. The default is still "." This is only in the PRO version.

When dealing with materials the hole name is used. But it is good to make sure that all material is in the format: red, green, blue and so on and not red.001 red.002. To remove all these duplicates just press "Remove Dupl. Mtrl" . Material that are used and where it can found duplicates will be removed. So when using and making materials make sure they all do not have the name with .XXX at the end.





Choose a product version:

Sales 30+
Customer Ratings 2
Average Rating
Published almost 7 years ago
Blender Version 4.0, 3.6, 3.5, 3.4, 3.3, 3.2, 3.1, 3.0, 2.93, 2.92, 2.91, 2.9, 2.83, 2.82, 2.81, 2.8, 2.7x, 2.79, 2.78, 2.77, 2.6x
License GPL
Have questions before purchasing?

Contact the Creator with your questions right now.

Login to Message