Batch Material Editor

9 votes
Version: 
1.8.1
Date Updated: 
11/25/2019
Author Name: 
Nik

This script allows you batch edit multiple materials and bitmaps.

Additional Info: 

CHANGE LOG:
###################### v1.8.1
- New. VrayLightMtl support.
- Fix. VrayMtl integer properties names and number limits.

###################### v1.8
- Fix. Corona Layered Material layers didn't work.
- Fix. CoronaMtl mediaMode added.

###################### v1.7.9
- Fix. It was a bad idea to fill list with compatible shaders only. Now list contains all supported shaders if renderer is installed.
- Fix. Error when last operation was "Clear map slot" and checkbox was enabled.

###################### v1.7.8
- New. Script will use shaders and maps that compatible with current renderer. For example VRayHDRI even in Corona.
- Fix. Renderer identification system is removed. All related errors should be fixed.
- Fix. Mode radiobuttons last state was broken.

###################### v1.7.7
- New. Last used settings now saved in .ini file and works between 3dsMax sessions.
- Fix. Exclude by reflect ior FStorm didn't work.

###################### v1.7.6
- Fix. Default X position now 200px instead of 1500px, for people who have small resolution screen.
- Fix. Error when current renderer is not supported.

###################### v1.7.5
- New. Partly VRayHDRI map support.

###################### v1.7.4
- New. FStorm material and bitmaps support.
- New. Shaders list will contain only shaders available in current render engine.
- Changed. Small changes in Exclude rollout.
- Changed. ms file is removed. You can comment first line of script to use it like .ms
- Changed. Script is now called "Batch Material Editor" without "Corona".
- Changed. Script is now only on ScriptSpot.
- Changed. Macro Category was changed to "Nik Scripts".

###################### v1.7.2
- Fix. Maps mode didn't work.

###################### v1.7.1
- Changed. GO button disabling behaviour.
- Changed. UI disabling behaviour.
- Fix. Clear map slot.
- Fix. Previous mode.

###################### v1.7
- New. Medit selection material mode (Read Help)
- New. Medit selection map mode (Read Help)
- New. Help on forum and Help button in UI
- New. Message string for errors and summary info
- New. GO button will be disabled when properties selection is invalid
- New. Dialog will save Position, Mode and Filter in current 3dsMax session
- Changed. Ignore materials renamed to Exclude materials
- Changed. New intuitive UI in Exclude materials
- Changed. Bitmaps UI is not locked by default
- Changed. Bitmaps switches automatically enabled when property is modified
- Changed. Now randomized value can't be more or less than valid value

###################### v1.6
- New. Randomization of any float and color values.
- New. Size, offset, angle parameters for Bitmaps and CoronaBitmaps.
- New. Clear all maps in selected parameters (map slots). You can undo that

###################### v1.5
- New. Ignore materials by some properties. Works with CoronaMtl and VrayMtl.

###################### v1.4
- New. Properties now sorted by class and name. Class is visible in list.
- New. You can filter them via filter class presets buttons or/and by name.
- New. Now you can select multiple properties IF all of them share similar output values.
- New. Bitmap and Coronabitmap properties.
- Changed. Code optimisation.

###################### v1.35
- Changed. "All materials" and "Selected materials" buttons that starts changing property will be disabled when list is empty (if search is invalid).
- Fix. Error caused by invalid search.
- Changed. Code optimisation.

###################### v1.3
- New. Adaptive dialog height.
- Fix. Some bugs.
- Changed. Code optimisation.

###################### before 1.3 changelog is lost

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
NiK684's picture

MapChannel is there

I don't quite understand. Map Channel is implemented for bitmaps.

I'm not familiar with this workflow. Why do you need to swap Channel from one slots to another? Why you can't just assign some Channel do reflect, ior etc.?

You see, it would be a feature for very specific task because Diffuse slot can contain different maps with different Channels, as well as other map slots. So in Diffuse slot I could get Channels 1,2,4,6 (in some Composite map) and in Specular I could get 2 and 7. What needs to be swapped with what?

Darran's picture

map slot swapping?

for render to texture, it would be nice to batch swap maps from channel to channel. Mostly I need this for making atlas map page with PBR materials, and only the diffuse channel does a un-modified transfer from one uvw channel to another. If I could batch swap different channels, say specular level or normal, or metalness (IOR) map slots, with diffuse map slot it could solve a lot of problems and save a lot of time. Texture bakers are more for movie stuff or high to low poly stuff than texture atlas'ing stuff, this would help make render to texture useful for texture atlas creation in max.

NiK684's picture

Done

"Only request right now is to also add the VRay Light Material."
Easy.

vfxmonster's picture

Thank You Jesus!

Had to write a review because this script works so well. Currently we're working in a massive city scene with elements coming in from all sorts of sources. We decided to globally move to using the Vray Camera Exposure but now had 1 section of the city that required 480 materials to have their "compensate camera exposure" turned on and the Self Illum multipler reduced. Would have taken a full day to do it manually, with the script it was done in seconds. Thank you for saving me from a day of tedious button clicking.

Only request right now is to also add the VRay Light Material.

Thank you again

Digiwip's picture

TYVM NIK

TYVM NIK you just saved me ! i feel like a noob discovering these kind of functions :)
I guess you can change anything like the specular level and all parameters ... its Wonderfull Thx again !

NiK684's picture

(getclassinstances

(getclassinstances standard).ambient = black
(getclassinstances standard).diffuse = black
(getclassinstances standard).specular = black

These 3 commands will change properties of ALL Standard materials in scene. I suppose it's easiest method for you.

You can also use MacroRedorder (in listener [F11]) to find properties that you want.
Enable recorder, change some property, get property name and disable recorder.

Digiwip's picture

Hey nik ! thx for the answer,

Hey nik ! thx for the answer, In fact i have a huge geographic site divide in 2000 squares, each one is textured and have a default max standard material. My problem is they all have ambient and specular and i want to put it to black. i was wondering if i could convert all to vray mat and go back to see if it could erase these properties.
I'm looking for a solution with scripts but at this moment i didnt found any solution ...
TY

NiK684's picture

There is no Standart mtl in

There is no Standart mtl in this version but I can help you if you tell me what properties you need to change and where are these materials (on objects, in mtl library etc.)

Digiwip's picture

Change 2000 mats

Thx for your work dear NIK !
sorry to ask but i have this problematic on a project :
I need to change 2000 mats to remove specular and change reflection on a standard max mat ... Do you think that theres a way to go through that using your great script ?
Best regards

NiK684's picture

Link is fixed

Link is fixed

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.