Chaos Corona Forum
Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: 3dboomerang on 2020-02-08, 17:30:47
-
Hi,
I'm trying to generate a script from a macro recording in 3D Studio Max - for materials
We use a general base-setup for our greenery, for example translucency "0,25"
In the macro recording however, I'm getting the following:
sceneMaterials["forest_automat_34549BD0"][#_4____VP_Japanese_Sedge_Grass_Leaf_Front_04____CoronaMtl].levelTranslucency = 0.25
Is there a written definition to have this more "generalized" in the following sense:
sceneMaterials["SELECTED MATERIAL SLOT"].levelTranslucency = 0.25
I reckon this question might be better posted in the area forums, but I wanted to try it here as well, you never know :)
Grts!
-
meditMaterials[1].levelTranslucency = 0.25
-
But if you don't already have the material you need in a material slot, you can collect all the materials in an array, search for the material by name, then put it into a slot. Then you can do what ever you want with it.
allMats = #()
matToGet = "NAME_OF_MATERIAL"
for mat in scenematerials do
(
allMats = append allMats mat.name
)
selMat = findItem allMats matToGet
foundMat = scenematerials[selMat]
meditMaterials[1] = foundMat
-
Thanks a bunch! I checked into it and I realise I'm a long way from home here. Now the macro script recorder is giving me different input from yesterday when I try to record some lines. This will take forever.
If anyone is capable of writing a small script for compensation, please contact me. Reckon this will go faster and easier :)
We made a screen-capture of what we want to do. Goal is to have it in a one-click-button in the UI.
Warm regards!
-
Can't you use material batch editor? http://www.scriptspot.com/3ds-max/scripts/batch-material-editor
-
Not for what we have in mind no, we already checked
-
So again, if there is anyone with the ability to write scripts, we'd be more then happy to compensate?