Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Corona Goodies - User Contributions => Topic started by: Nik on 2016-08-21, 10:15:32

Title: Batch material edit
Post by: Nik on 2016-08-21, 10:15:32
(https://dl.dropboxusercontent.com/s/0hth0s4l21j8986/batchmedit1.7.png)
                                           
ScriptSpot link (http://www.scriptspot.com/3ds-max/scripts/batch-material-editor)
Macros category - "Nik Scripts"
Title: Re: Batch material edit
Post by: johan belmans on 2016-08-21, 14:55:23
Hi there

this is something I am looking for a long time.  I am happy :-)

I would like it to add the script as a shortcut to a toolbar.
In which category do I have to look for the script?
If there isn't one at the moment, I would suggest the "Cororna Renderer" category. As Deadclown placed his script under this category as well.

Regards

Johan
Title: Re: Batch material edit
Post by: Nik on 2016-08-21, 18:04:00
I wasn't sure that somebody will be interested in this script :)
There is no macro for now. I will make it today

UPD. I did that
Title: Re: Batch material edit
Post by: alexyork on 2016-08-22, 14:34:21
This looks great. Thank you! Will try it soon.
Title: Re: Batch material edit
Post by: Nik on 2016-08-22, 14:44:13
Wait, today I will upload new v1.3 with some bugfixes, adaptive dialog height and code optimisation.
UPD. v1.3 ready

Feature requests are welcome :)
Title: Re: Batch material edit
Post by: alexyork on 2016-08-22, 17:50:09
One feedback for you: could you please allow for 4-digit integer input. Currently 99 is max value.
Title: Re: Batch material edit
Post by: Nik on 2016-08-22, 17:57:56
Script finds valid range of values for each parameter. I described all of them in code.
If some integer parameter is limited by 99 then it's limited in UI of shader too. Or it's a bug and I need to fix it :)
For all undescribed parameters script will limit you by 999999999 :)

What exactly integer parameter are you talking about?
Title: Re: Batch material edit
Post by: alexyork on 2016-08-22, 18:02:34
Script finds valid range of values for each parameter. I described all of them in code.
If some integer parameter is limited by 99 then it's limited in UI of shader too. Or it's a bug and I need to fix it :)
For all undescribed parameters script will limit you by 999999999 :)

What exactly integer parameter are you talking about?

Trying to set Material GBufferID >99

The spinner allows me to go to 9999
Title: Re: Batch material edit
Post by: Nik on 2016-08-22, 18:04:17
Yes, this is my mistake, I fixed it.
Redownload please.
Title: Re: Batch material edit
Post by: alexyork on 2016-08-22, 18:05:26
Yes, this is my mistake, I fixed it.
Redownload please.

Awesome work mate! Great script... already helped me a tonne today doing loads of mat tweaks across a bunch of scenes. Thank you.
Title: Re: Batch material edit
Post by: johan belmans on 2016-08-22, 23:23:42
Hi,

just downloaded the new version and tested it. So far so good :-)

Would it be difficult to add the option the change values of a Standard Bitmap?
For example I have a Multi/Sub-Object with 10 different Corona materials and each material has a Standard Bitmap in the diffuse slot.
I would like to change all the RGB Levels in the Output Slot of the Bitmaps from 1.0 to 0.9.

Title: Re: Batch material edit
Post by: Nik on 2016-08-23, 08:41:06
Actually maps get things more complicated. But I'm interested in this feature and it think I see a good way to realize it.

UPD.
Well, I tried and I failed :) Maps could be nested in other types of maps. Code doesn't support maps at this moment. UI must be remaked too.
So now I can't promise that this feature will be implemented.
Title: Re: Batch material edit
Post by: johan belmans on 2016-08-23, 10:41:11
OK no problem
Thanks for the effort!
Title: Re: Batch material edit
Post by: antanas on 2016-08-23, 18:39:00
 Hi and thanks for such a useful tool - previously for such tasks I used Modifier Modifier Zorb http://www.scriptspot.com/3ds-max/scripts/modifier-modifier-zorb - it surely has lots of features and even some randomization functions but is a major pain in youknowhere to use it as it is so goddamn slow to update selections and do any operations with or at least so on heavier scenes - yours on the contrary is lightning fast and gets the job done too.

 There's a couple of features I miss which would be good if you could implement in your script :

Standard bitmap filtering amount
Standard bitmap filtering type
Corona bitmap filtering amount
Corona bitmap filtering type

 Those alone could save quite a lot of time for sure

Not present in zorb or anywhere else (with some exception which I will explain below) and probably harder to implement but surely most useful ones
 
Adding some sort of intelligent modes\settings\constrictions for setting levelDiffuse value - namely:

 - ignore materials with overall diffuse color brightness lower than some user set threshold - that would be tremendously useful for ignoring some metal materials with a dark or black diffuse present in the scene and setting all others to say 0.8 as well as ignoring all materials which were set up right in the first place (say level 1.0 but grey diffuse etc.) for more albedo trouble free rendering - I did ask Martin (DeadClown) for such a script and he did a sort of it quite a while ago, gave it to me and some other users, but because he didn't want newbie users to misuse that (as there are some possibilities to do so for sure) he didn't share it with the public - probably you could ask him how he did that or maybe he will even let you integrate his script or part of it into yours

 - ignore materials whith diffuse level\strength controlled by the user set threshold - would again let script to ignore already well set up materials albeit in a different manner than the one above

 - ignore materials with refraction level\strength controlled by the user set threshold - self explanatory )
     
 - ignore materials with reflection level\strength controlled by the user set threshold - self explanatory )
 
 Hope those are possible to do as I think such options could really benefit every Corona user our there and save lots of time dealing with, for example, some initially properly set up corona scenes to which, at some point, some simply converted by CM/LC and unchecked due to a creative/deadline rush models were added (especially when those were converted from some obscure material setups containing models) - well, you know how that might go when those are not checked in time and it's too late to go correcting them one by one ))
Title: Re: Batch material edit
Post by: Nik on 2016-08-23, 18:51:04
Wow, that's what I call feature request! )
I understood all of these and will try to implement as well as bitmaps parameters. Its complicated but doable
Title: Re: Batch material edit
Post by: Christa Noel on 2016-08-24, 03:59:39
Nice idea nik684, thanx :D
Title: Re: Batch material edit
Post by: Nik on 2016-08-24, 19:22:43
v1.35

- In 1.3 script wasn't optimized for parsing thousands of objects or materials. Not it's MUCH faster.
I tested it on scene where I have 8000 objects, 625 CoronaMtls, 167 Multimaterials. Processing time of changing one property of all materials - 100-300 milliseconds.
3dsMax needs to redraw viewports, and this takes 1-2 seconds, but script itself is pretty fast. Processing time will be printed in Listener.

- IMPORTANT. Fixed error caused by invalid search.

- "All materials" and "Selected materials" buttons that starts changing property will be disabled when list is empty (if search is invalid) so you can't do anything useless anymore :)


And kinda roadmap:

v1.4 (soon will be finished)
- all bitmap and coronabitmap properties will be editable
- select and change more than 1 property, if all of them in one class (float for example)

v1.5
- ignore materials by some parameters:
   - by average diffuse color (based on colorDiffuse, not on maps inside Diffuse slot)
   - by Diffuse level value
   - by Refract and Reflect values
Title: Re: Batch material edit
Post by: johan belmans on 2016-08-24, 21:06:46
nice!
Title: Re: Batch material edit
Post by: antanas on 2016-08-25, 20:09:52
Nice indeed, glad to see my ramblings were not in vain ))
 About - ignore materials by some parameters:- by average diffuse color (based on colorDiffuse, not on maps inside Diffuse slot) - yeah, my bad, forgot to specify\suggest that this should only work on Diffuse color as even I (being totally nonprogrammer type) can understand, what, even if it could be done by analyzing maps or even worse, some combinations of maps done through coronaAo\mixes\composites\etc. it would take ages for a script to do it's work, so sorry about that somewhat unspecific\erratic way of expressing my thoughts )
Title: Re: Batch material edit
Post by: astudio on 2016-08-26, 02:26:48
"Select objects by MaterialID" button would be very useful as for me...

Look at this http://www.scriptspot.com/forums/3ds-max/general-scripting/select-multiple-objects-by-material-id#comment-19340
Title: Re: Batch material edit
Post by: Nik on 2016-08-26, 10:21:27
I'm afraid this feature is irrelevant to batch material editing, so I can't add it to this UI.

Anyway Miauu has wrote it, right? :) He has more script skill than me.
Title: Re: Batch material edit
Post by: Nik on 2016-08-27, 23:48:35
Well, it seems I have wrote something good :)

v1.4

- Properties now sorted by class and name. Class is visible in list

- You can filter them via filter class presets buttons or/and by name

- Now you can select multiple properties IF all of them share similar output values

- Bitmap and Coronabitmap properties.
Not all properties were added to UI cause I'm not sure somebody will batch edit them.
When you change some property it will be enabled automatically (you can disable it if you don't want to change it) and when you're ready click GO and...
All bitmaps in all selected materials in all selected slots will change all enabled properties. This can take a long time in big scenes. Maybe even 1 or 2 seconds! :)

- I suppose script again could be faster than before because I rewrote all of it

Actually I didn't test this version too much, so if you'll find some erorrs - post it here immidiately.

Enjoy
Title: Re: Batch material edit
Post by: Nik on 2016-08-28, 18:28:03
v1.5 is ready

- Ignore materials by some properties. Works with CoronaMtl and VrayMtl
- VrayMtl is tested without Corona installed
Title: Re: Batch material edit
Post by: antanas on 2016-08-29, 15:38:28
Well, great job ! It already helped me a lot when dealing with some multitexture material filtering setups I needed to do today - even that seemingly simple feature can be quite a huge time saver in some cases - thanks for adding that too. Later I will test ignore materials by properties and will report on how they fare - it seems I've got just the right scene for testing that )) 
Title: Re: Batch material edit
Post by: Nik on 2016-08-29, 15:49:38
Ignored materials - materials that matches all enabled criteria in list, not one of them.
"criterion 1 and criterion 2" but not "criterion 1 or criterion 2"

I.e. if you'll enable Diffuse avg and Reflect Ior criteria, then materials with diffuse avg value more/less than something AND reflect ior more/less than something will be ignored. But if material have diffuse value in valid range then it wont be ignored.

I'm not sure I can explain it better :)
Just try this feature
Title: Re: Batch material edit
Post by: Nik on 2016-10-01, 23:24:28
Posted 1.6 with some nice new features
Title: Re: Batch material edit
Post by: Dionysios.TS on 2016-10-01, 23:39:14
Fantastic stuff, well done!!!

Dionysios -
Title: Re: Batch material edit
Post by: johan belmans on 2016-10-02, 12:07:51
It is getting better and better. Keep up the good work!
Title: Re: Batch material edit
Post by: Nik on 2016-10-02, 15:03:05
Angle W bug fixed.
Version is the same. Please redownload.

I'm sorry but for now CoronaLayered materials are not supported in "Selected objects" mode.
I'm working on next version where I will fix that and add "Medit Selection" mode for Compact and Slate material editors.

UPD.
Materials selection from Slate is nearly impossible. Thx to Autodesk.
Maybe I'll add Compact medit slot selection for those people who need edit multiple bitmaps inside specific multimap.
CoronaLayeredMtl could be added for editing bitmaps in masks. I don't see other usable properties in LayeredMtl.
Title: Re: Batch material edit
Post by: Nik on 2016-10-05, 12:07:38
I decided to remove ChangeLog on top, so this message is just for history :)

v1.6:
- Added. Randomization of any float and color values.
- Added. Size, offset, angle parameters for Bitmaps and CoronaBitmaps.
- Added. Clear all maps in selected parameters (map slots). You can undo that
Title: Re: Batch material edit
Post by: Nik on 2016-10-05, 12:07:49
I know, I told you that Slate selection is nearly impossible. Well, just nearly :) I implemented that with small restrictions.

v1.7
- Added. Medit selection material mode (Read Help)
- Added. Medit selection map mode (Read Help)
- Added. Help on forum and Help button in UI
- Added. Message string for errors and summary info
- Added. GO button will be disabled when properties selection is invalid
- Added. Dialog will save Position, Mode and Filter in current 3dsMax session
- Modified. Ignore materials renamed to Exclude materials
- Modified. New intuitive UI in Exclude materials
- Modified. Bitmaps UI is not locked by default
- Modified. Bitmaps switches automatically enabled when property is modified
- Modified. Now randomized value can't be more or less than valid value
Title: Re: Batch material edit
Post by: johan belmans on 2016-10-12, 19:18:27
Hi there

will it be possible to implement all the CoronaNormal parameters in your script?
Title: Re: Batch material edit
Post by: Nik on 2016-10-12, 19:26:24
Hard to say. For now it's a Material editor, not Maps editor.
Bitmaps are important part of materials so I implemented their properties, but implementaion of all properties of all maps needs new complicated UI.

Why do you need that? For some batch procedures I write couple of strings, do the job and even don't save them. If you'll describe your task maybe I can write some code.

Or you can use Soulburn Scripts and choose Parameters Manager.
Then:
- Select objects with normalmaps
- Go to Params manager. Select "Maps in sel objects", then click "Refresh" if no Maps were found.
- Choose parameters and set them.

It's a bit buggy but universal.
Title: Re: Batch material edit
Post by: johan belmans on 2016-10-12, 19:41:41
Hi, yes this is on map base and not on material base. So I understand why you are not planning to do this.

But if it is not that difficult to write some lines of code I will be quit happy.
It is a batch job that I have to do:

I need to change the "strenght multiplier" in all the CoronaNormal maps to "5" and "check" the  "Flip Green" checkbox.
The mesh consist out of a CoronaLayered Material with several CoronaMaterials and I need to change all the CoronaNormal maps inside the Bump slot of the CoronaMaterials.
Hope this is clear?

If you have a Paypal donate page, I will make a donation.


Title: Re: Batch material edit
Post by: Nik on 2016-10-12, 20:02:59
Code: [Select]
for map in (getClassInstances CoronaNormal) do (
map.multiplier = 5
map.flipgreen = on
)
This will parse ALL normalmaps in scene.

You own me 700 dollars :)
I'm joking of course
Title: Re: Batch material edit
Post by: johan belmans on 2016-10-12, 21:35:29
Code: [Select]
for map in (getClassInstances CoronaNormal) do (
map.multiplier = 5
map.flipgreen = on
)
This will parse ALL normalmaps in scene.

You own me 700 dollars :)
I'm joking of course

Gosh, this is great. Many thanks
Title: Re: Batch material edit
Post by: Nik on 2016-10-25, 12:47:50
1.7.1

These bugs are fixed:
- Clear map slot
- UI disabling behaviour
- GO button disabling behaviour
- Previous mode
Title: Re: Batch material edit
Post by: LuckyFox on 2016-11-17, 15:31:32
Thank you for this very useful script!
Title: Re: Batch material edit
Post by: Nik on 2017-02-06, 16:27:11
I'm surprised nobody didn't notice that batch editing of maps were broken in 1.7.1
I found it myself today and urgently fixed it. Version 1.7.2 uploaded

1.7.2
Bugfixes:
- Maps mode didn't work at all
Title: Re: Batch material edit
Post by: antanas on 2017-04-19, 19:11:31
Hi there, maybe I'm a blind idiot and just simply cannot find it but I don't see any of CoronaAo parameters exposed in Batch material edit which might be quite handy when dealing with some monstrous materials such as this one http://c2n.me/3JGknsH - in case you are curious what this particular material does it's this https://www.flickr.com/photos/119850875@N05/30823829206/in/datetaken-public/ old, a little mossy, crumbly, leaky, semipolished by constant walking on and generally nasty looking concrete material I've been trying to do some time ago )) Anyway maybe I just don't see those parameters exposed but I don't hence I write this request. On top of that it would be nice to have same batch control capabilities for CoronaRoundEdges and for CoronaDistance as well - the latter being not too necessary but why not - could save some time when dealing with some assets made using different system units etc. And thanks again for such a time saver which Batch material edit is. 
Title: Re: Batch material edit
Post by: Nik on 2017-04-19, 19:36:33
1.7.4

- FStorm material and bitmaps support
- Small changes in Exclude rollout
- Shaders list will contain only shaders available in current render engine

- .ms file is removed. You can always replace first line of script to one symbol "(" if you need .ms file
- Script is now called "Batch Material Editor" without "Corona"
- Script is now only on ScriptSpot for my ease
- Macro Category was changed to "Nik Scripts"

I'm sorry, but you need to delete old macro from "C:\Users\***\AppData\Local\Autodesk\3dsMax\2016 - 64bit\ENU\usermacros" and install new one.
I need this script to be independent from Corona so I changed category and moved script from CoronaForum to ScriptSpot.

I removed Help text as well, because I'm not sure if somebody even need it. I have a big image with tips, maybe it's enough. If not - I will write help on ScriptSpot.
Title: Re: Batch material edit
Post by: Nik on 2017-04-19, 20:07:01
Quote
I don't see any of CoronaAo parameters

As I mentioned before this script is Material editor, not Maps editor. At least for now. It can't help in all possible situations.
I can't promise that script will support all these maps in future.

There is at least one free script for your case - Soulburn ParameterManager. It can edit any property of any map or material but UI is complicated and there are some bugs.
Title: Re: Batch material edit
Post by: antanas on 2017-04-19, 21:11:00
Yeah know that one and as well as "hellish" mod mod Zorb but yours is light-years ahead in terms of user-friendliness and speed (which you probably know)) but thanks for suggestion anyway )
Title: Re: Batch material edit
Post by: Dippndots on 2017-04-20, 17:25:49
I get a Macroscript Error Exception when I click the BatchMat button. "--Runtime error: array index must be positive number, got: 0"

Nik Scripts-BatchMedit.mcr, line 54: selectedMtlClass = classof MtlClasses[nsBatEdSavedShader]

Any ideas?
Title: Re: Batch material edit
Post by: Nik on 2017-04-20, 17:30:11
I've made a dirty hotfix but it should work. Redownload please
Title: Re: Batch material edit
Post by: Dippndots on 2017-04-20, 17:53:42
I get the same error, different line of code though.

NS_BatchMtlEditor_1.7.4.mcr    Line 767: selectedMtlClass = classof MtlClasses[ddlMtlClass.selection]
Title: Re: Batch material edit
Post by: Nik on 2017-04-20, 17:56:10
Which render engines do you have installed? Vray, Corona, Fstorm. From this list only
Title: Re: Batch material edit
Post by: Dippndots on 2017-04-20, 18:08:19
Just Vray and Corona,  I noticed that all my compact material slots are standard materials, is that the cause?
Title: Re: Batch material edit
Post by: Nik on 2017-04-20, 18:10:57
No, I think it's because of your Corona version. Can you open Listener (F11) and write there
Code: [Select]
classof renderers.current
And post result
Title: Re: Batch material edit
Post by: Dippndots on 2017-04-20, 18:16:00
Corona_1_5__hotfix_2
Title: Re: Batch material edit
Post by: Nik on 2017-04-20, 18:19:54
Yea, render class was changed after 1.5. I will fix it today.
Fixed.

And one more thing. Can you switch to Vray and do the same "classof renderers.current"? And tell me Vray version as well.
Title: Re: Batch material edit
Post by: Dippndots on 2017-04-21, 17:01:03
Hey, sorry, didn't see your edit, it's: V_Ray_Adv_3_20_03.

It is working just fine now though, thanks dude!
Title: Re: Batch material edit
Post by: Nik on 2017-04-21, 20:13:47
So you're okay with latest version of script? Does it work?
Title: Re: Batch material edit
Post by: Dippndots on 2017-04-21, 20:20:26
yes, I don't get the error anymore, did you change anything? All I did was switch renderers around
Title: Re: Batch material edit
Post by: Nik on 2017-04-21, 20:39:56
Of course I changed :) it was only my fault. New feature (show compatible mats only) was implemented a litte wrong.
Title: Re: Batch material edit
Post by: Tanakov on 2017-05-22, 15:54:39
Hey, I get the:

-- Syntax error: at ), expected <factor>
--  In line: )

3ds max 2017 + Corona 1.6

Can you suggest how can I fix this?
Title: Re: Batch material edit
Post by: Nik on 2017-05-22, 16:01:05
Hey, I get the:

-- Syntax error: at ), expected <factor>
--  In line: )

3ds max 2017 + Corona 1.6

Can you suggest how can I fix this?

I sent you PM. Can you give me string number and please try to redownload 1.7.4 version because I have failed one day and made changes right in Dropbox, so somebody could download WIP code :D
Title: Re: Batch material edit
Post by: DannyG on 2017-06-27, 16:10:35
damn this is awesome, big time saver. Thank you sir !
Title: Re: Batch material edit
Post by: Nik on 2017-06-27, 16:20:10
damn this is awesome, big time saver. Thank you sir !
You're welcome :)
Title: Re: Batch material edit
Post by: Jahman on 2017-06-27, 20:47:54
It took me some time to figure out why I got no rollout visible on script execution.
Before I checked it's predefined position which is [1500, 120]. (I'm on a pretty old laptop with [1366,768] max resolution)
I'd change that value to something like
Code: [Select]
sysInfo.DesktopSize / 2.0
And something bad happens at line 56 when I try to run it with a fresh scene.
Code: [Select]
>> MAXScript MacroScript Error Exception:
-- Runtime error: array index must be positive number, got: 0 <<
selectedMtlClass = classof MtlClasses[nsBatEdSavedShader]

Hope it'll help you make it better
Title: Re: Batch material edit
Post by: Nik on 2017-06-27, 20:50:06
Good idea, thanks. I will do that.
Ah, actually not so good because DesktopSize summarizes all monitors sizes. So I will just decrease default x.pos to something like 200. I hope noone have monitor less than 200px :D
Title: Re: Batch material edit
Post by: Nik on 2017-06-27, 21:36:30
v1.7.5
- Added. VRayHDRI map partly support.

v1.7.6
- Fixed. Default X position now 200px instead of 1500px, for people who have small resolution screen.
- Fixed. Error when current renderer is not supported.
Title: Re: Batch material edit
Post by: Nik on 2017-06-30, 10:52:55
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.
Title: Re: Batch material edit
Post by: Nik on 2017-06-30, 16:16:38
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.
Title: Re: Batch material edit
Post by: Nik on 2017-07-03, 12:21:28
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.

P.S.  How to make it good? Make it bad and then revert changes :)
Title: Re: Batch material edit
Post by: snakebox on 2017-09-06, 03:17:58
How did I only just stumble across this! this is awesome!!

thank you so much for sharing this
Title: Re: Batch material edit
Post by: NicolasC on 2018-04-17, 14:18:03
Hello,

Just discovering this one, great !! thank you, Nik :)
Title: Re: Batch material edit
Post by: PROH on 2018-07-16, 17:14:22
Hi Nik. Thank you so much for this script. I was wondering if you could build in a material-rename function, similar to 3dsMax's rename objects tool, but for materials instead?

I've been looking for a script that could do this, but haven't found anything useful so far.

Thanks again
Title: Re: Batch material edit
Post by: romullus on 2018-08-09, 11:49:33
Hi Nik, what a wonderful script this is! It's a shame i discovered it only now. A question from the new user - is it possible to edit CoronaNormal map attributes? It seems i can't find it on my own.
Title: Re: Batch material edit
Post by: mahorela on 2019-06-13, 05:27:14
Hi Nik

Great script.

It would be awesome if you could batch add a corona color correct to all diffuse channels in the object or multi map (or other channels such as reflection, translucency etc). This would work in well with Corona's new color correct "take settings from map" function.

Cheers
Title: Re: Batch material edit
Post by: Nik on 2019-07-13, 19:48:45
Sorrry for a late reply.
I'm busy at my job and writing another script so Batch Medit 2.0 maybe someday will be implemented, but not soon for sure.

"material-rename function"
- Soulburn scripts has such feature in renamer.

"is it possible to edit CoronaNormal map attributes?"
"add a corona color correct to all diffuse channels"
 - Unfortunately no. Script needs some changes to support all maps. Now it's just a material editor, not map editor.
Title: Re: Batch material edit
Post by: Niko3D on 2019-08-07, 18:35:04
HI,

I'm new user...it seems an useful script!But I don't understand where  can I download it? I found the link (in the website download URL) with the script "written"...but how can I use the script in Max?
Title: Re: Batch material edit
Post by: Nik on 2019-08-07, 18:46:56
Sorry. I fixed download link, so file should download instead of opening in browser.
This is a macro, so you need to run it and it will be installed to 3dsmax. Then you should find Batch Medit in NikScripts category and drag it to toolbar or menu.
Title: Re: Batch material edit
Post by: Niko3D on 2019-08-07, 18:54:04
Hi!Maybe it's me...but it keep opening in the browser...
Maybe I'm doing something wrong...It's here right?

Title: Re: Batch material edit
Post by: Nik on 2019-08-07, 18:55:46
I changed link right before previous message. Refresh scriptspot page
Title: Re: Batch material edit
Post by: Niko3D on 2019-08-07, 19:02:23
Oh yeah...thank you, very kind.;)
Title: Re: Batch material edit
Post by: dfcorona on 2019-09-15, 06:00:52
I'm using 3dsmax 2020 and trying to get your script to run, I run script and load it and nothing happens.  Looks like an awesome script, does it not work with 3dsmax 2020?
Title: Re: Batch material edit
Post by: Nik on 2019-09-15, 09:20:47
This is a macro, it installs to category Nik Scripts when you run it.
Then you should go to Customize UI and check this category to add button/hotkey/menu
Title: Re: Batch material edit
Post by: dfcorona on 2019-09-15, 17:07:05
This is a macro, it installs to category Nik Scripts when you run it.
Then you should go to Customize UI and check this category to add button/hotkey/menu
Okay great, got it! Can't wait to try it, thank you.
Title: Re: Batch material edit
Post by: alexyork on 2019-11-05, 17:20:42
Just a quick shout-out for this epic script!
Title: Re: Batch material edit
Post by: adriano.rbk on 2021-08-09, 17:13:38
Hi Nik,

Do you have any intentions to update the script to work with Corona 7 and the new CoronaPhysicalMtl?
Title: Re: Batch material edit
Post by: alexyork on 2021-08-09, 17:28:25
Hi Nik,

Do you have any intentions to update the script to work with Corona 7 and the new CoronaPhysicalMtl?

+1

Best script ever. Can't wait for this to be updated!
Title: Re: Batch material edit
Post by: romullus on 2021-08-09, 20:34:02
As much as i'd want the script to be updated for the new material, but it's unlikely to happen - AFAIK Nik doesn't use Corona anymore.
Title: Re: Batch material edit
Post by: LionelC on 2021-08-10, 04:17:23
Is someone would be able to do it maybe :) ?
(with Nick's authorization of course)
Title: Re: Batch material edit
Post by: alexyork on 2021-08-10, 10:09:51
I wonder if anyone at Chaos Czech would be willing to take this on as an official part of Corona? It's a hugely beneficial script!
Title: Re: Batch material edit
Post by: Nik on 2021-08-13, 19:27:56
Hmm. I didn't realise how popular this script is.
It was written long time ago and I don't want to edit that ugly noob code.

Instead, I plan to write v2.0. I will create a system that will add any new classes automatically without any updates from my side. I suppose something similar was implemented in Zorb but for some reason people prefer my script (IDK why).

BTW, feature requests are welcome
Title: Re: Batch material edit
Post by: alexyork on 2021-08-14, 12:42:41
Amazing news Nik! As for why I personally prefer your script over Zorb, it's just much simpler to look at and use, as an artist. Zorb is a huge sprawling thing, great for other things for sure, but for making quick edits to batches of maps/materials your script is 10/10.
Title: Re: Batch material edit
Post by: maru on 2021-08-16, 15:53:47
We have this logged as a feature request for Corona.

(Report ID=CRMAX-540)
Title: Re: Batch material edit
Post by: Nik on 2021-09-25, 20:11:49
I have 2 news about BatchMedit, good and bad.
Bad - I have no time to develop v2 in the near future.
Good - I added CoronaPhysicalMtl to the old disgusting v1 so at least the new shader is now supported in v1.9.
It can be downloaded on the scriptspot.
Title: Re: Batch material edit
Post by: romullus on 2021-09-25, 20:53:08
Ugly code or not, this tool is invaluable time saver. Thank you very much!
Title: Re: Batch material edit
Post by: arqrenderz on 2021-09-26, 04:11:43
Thanks Nik! just started using it like a month ago, it a super nice tool for that ugly bad models and its shaders!
Title: Re: Batch material edit
Post by: alexyork on 2021-09-27, 09:48:22
Thanks Nik, you're a legend.
Title: Re: Batch material edit
Post by: NicolasC on 2021-09-27, 10:08:28
Good - I added CoronaPhysicalMtl to the old disgusting v1 so at least the new shader is now supported in v1.9.
It can be downloaded on the scriptspot.

Thanks A LOT, Nik :)
Title: Re: Batch material edit
Post by: adriano.rbk on 2021-09-29, 17:03:45
I have 2 news about BatchMedit, good and bad.
Bad - I have no time to develop v2 in the near future.
Good - I added CoronaPhysicalMtl to the old disgusting v1 so at least the new shader is now supported in v1.9.
It can be downloaded on the scriptspot.

Thank you! You are the best! S2
Title: Re: Batch material edit
Post by: brr on 2022-08-05, 21:44:19
I have 2 news about BatchMedit, good and bad.
Bad - I have no time to develop v2 in the near future.
Good - I added CoronaPhysicalMtl to the old disgusting v1 so at least the new shader is now supported in v1.9.
It can be downloaded on the scriptspot.

Hello Nik,

First, I want to thank you for your script. It helps a lot to quick correct come basic parameters for old vray shaders for vray itself or before vray to corona conversion.
As you told, you do not have the time for developing v2 in the near future. But maybe sometime it will be possible again…

If so, may I ask you for a feature, which I believe will make your script even better.

Situation: Let's say I have an old pre-PBR scene in vray. Basically, as starting point I make bunch actions like : set BRDF to GGX+glossy Fresnel, then enable Fresnel, then set IOR to 1.5, then link refraction&reflection IOR, then reflection to white, then disable self-illumination for GI, than refraction to black and so on. Right now, we need to do all this actions separately.
It will be really great to have the possibility to save the actions in presets and then use the saved presets.

I hope you will find the idea useful.
Thanks a lot, again!
Title: Re: Batch material edit
Post by: Nik on 2022-08-05, 22:04:04
Thanks for good idea, I like it.
Actually v2 is already in lazy development but still needs a lot of time. Presets are in "todo" list as well.
Title: Re: Batch material edit
Post by: brr on 2022-08-07, 13:01:44
Thanks for the info, quick reply and your effort, Nik !
Title: Re: Batch material edit
Post by: Alex Abarca on 2022-09-01, 04:54:48
@nik With this tool can I add a CoronaRaySwitch color 190,190,190 on 500 individual materials?

It's for a photogrammetry model of a city.