Smart material merger/renamer
Hi, guys, I was wondering if any of you script-wizards can help me out. We need to have a script that imports models in a specific way:
When importing 3ds MAX scene into another and when prompted for duplicate materials, we need the script to check if ALL of the parameters of the material in question are the same as the duplicate. If yes – merge/use scene materials, if not – auto rename.
Imagine a very large scene with millions of polygons, and hundreds of different materials and everything is ok for the moment. Now, I need to update that scene (numerous times) to accommodate for client’s wishes. I will have to distribute various parts of the scene to 10 different modelers for an update and then, once everyone’s job is done, bring them all back to one giant scene.
In order to keep the original materials in the final scene (to not accidentally overwrite them), everyone has to follow a very strict instruction on how to add new materials to his extracted small scene and how to modify existing materials – that is to always make a NEW NAME for the material, so that we can USE SCENE MATERIALS (when prompted for duplicates) when merging the whole thing back in the giant scene. The goal is to not use the AUTO RENAME DUPLICATE MATERIALS option, because of the loss of connection between materials that are the same in both scenes, those that were not modified. This is the imperative.
Problem is, sometimes, one or more modelers makes an unconscious mistake on his specific part of assignment - he changes a couple of material parameters on one or more materials in the scene AND keeps the SAME NAME of the material in question. This in turn makes a problem when we import his model in the giant file – his new or modified materials are overwritten by our old materials in the giant scene, since we used USE SCENE MATERIALS option (when prompted for duplicates).
This occurs more often than not and we are trying to find a workaround for this problem. This script would enable us to bypass human error and thus enhance our workflow. Name your price and time constrictions.
Thank you for your time.