Author Topic: Batch material edit  (Read 57622 times)

2016-10-05, 12:07:49
Reply #30

Nik

  • Active Users
  • **
  • Posts: 162
    • View Profile
    • HQ Details
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
« Last Edit: 2016-10-05, 15:20:17 by nik684 »

2016-10-12, 19:18:27
Reply #31

johan belmans

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 737
    • View Profile
    • belly.be
Hi there

will it be possible to implement all the CoronaNormal parameters in your script?

2016-10-12, 19:26:24
Reply #32

Nik

  • Active Users
  • **
  • Posts: 162
    • View Profile
    • HQ Details
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.
« Last Edit: 2016-10-12, 19:34:22 by nik684 »

2016-10-12, 19:41:41
Reply #33

johan belmans

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 737
    • View Profile
    • belly.be
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.



2016-10-12, 20:02:59
Reply #34

Nik

  • Active Users
  • **
  • Posts: 162
    • View Profile
    • HQ Details
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

2016-10-12, 21:35:29
Reply #35

johan belmans

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 737
    • View Profile
    • belly.be
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

2016-10-25, 12:47:50
Reply #36

Nik

  • Active Users
  • **
  • Posts: 162
    • View Profile
    • HQ Details
1.7.1

These bugs are fixed:
- Clear map slot
- UI disabling behaviour
- GO button disabling behaviour
- Previous mode

2016-11-17, 15:31:32
Reply #37

LuckyFox

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 112
    • View Profile
    • Behance
Thank you for this very useful script!

2017-02-06, 16:27:11
Reply #38

Nik

  • Active Users
  • **
  • Posts: 162
    • View Profile
    • HQ Details
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

2017-04-19, 19:11:31
Reply #39

antanas

  • Active Users
  • **
  • Posts: 272
  • Hmm ...
    • View Profile
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. 

2017-04-19, 19:36:33
Reply #40

Nik

  • Active Users
  • **
  • Posts: 162
    • View Profile
    • HQ Details
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.

2017-04-19, 20:07:01
Reply #41

Nik

  • Active Users
  • **
  • Posts: 162
    • View Profile
    • HQ Details
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.

2017-04-19, 21:11:00
Reply #42

antanas

  • Active Users
  • **
  • Posts: 272
  • Hmm ...
    • View Profile
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 )

2017-04-20, 17:25:49
Reply #43

Dippndots

  • Active Users
  • **
  • Posts: 294
  • Alex Fagan Co-Founder at The Faction
    • View Profile
    • The Faction
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?

2017-04-20, 17:30:11
Reply #44

Nik

  • Active Users
  • **
  • Posts: 162
    • View Profile
    • HQ Details
I've made a dirty hotfix but it should work. Redownload please