Chaos Corona Forum
Chaos Corona for 3ds Max => [Max] Corona Goodies - User Contributions => Topic started by: Frood on 2022-10-25, 13:13:31
-
Since there is ChaosScatter with Edge Trimming support now, here is a macroscript to quickly add and remove the ChaosScatterEdgeTrimming map to and from materials. Select a material (or multiple materials) in SME and execute it. If any scene object is selected, the material(s) of all selected objects will get processed instead. Supported materials are Multimaterial, Standardmaterial, CoronaPhysicalMtl and CoronaLegacyMtl.
Assign this script to two different hotkeys, where one hotkey uses the "SHIFT" key as part of the key combination. If "SHIFT" is pressed while invoking the script, "Remove" mode is active.
Example:
Assign this script to "Alt+Ctrl+E" and to "ALT+Ctrl+SHIFT+E". If you then press "Alt+Ctrl+E", "Add" mode is active. If you press "ALT+Ctrl+SHIFT+E", ChaosScatterEdgeTrimming maps will be removed instead.
We will probably not need those EdgeMaps anymore using Corona v10, but until then...
Good Luck
Edit:
Changed description to match version 0.3, attached version 0.3:
Required hotkey modifier key changed from "ALT" to "SHIFT" to trigger remove mode. Restored node selection in SME after removing EdgeTrimming maps. Removed console spam.
Edit:
Attached version 0.4:
Fixed undefined active SME view after starting Max without having SME opened once
-
Thank you very much!
-
Thank you :)
I'm running the script without hotkeys, and it adds Edge Trimming map(s) without problems. But I can't get it to remove them again.
Is this possible without hotkeys?
Corona 9
Max 2020
-
I'm running the script without hotkeys
You mean as a toolbar icon? Then the only modifying key which would work is Shift (one reason why I prefer to hotkey it). Alt and Ctrl do not allow to run an icon. So you could change the line
if keyboard.altPressed then mode="Remove" else mode="Add"
in "on execute()" to
if keyboard.shiftPressed then mode="Remove" else mode="Add"
Then, a standard click on the icon would add the maps, and Shift+click on the icon would remove them. Hope it helps,
Good Luck
-
Thank you.
I use hotkeys instead. It works very well, and simplifies the use of edgetrim enormous.
Great script :)
-
Ok, nevertheless I changed the remove modifier key to shift, first post updated. This way add and remove is possible with both (icon/hotkey).
Good Luck
-
Very cool! Thank you. And yeah, we will focus not to have such burden for v10 anymore. :-)
-
Hmm.. still can't get the toolbar icon to "remove" (shift + click), so I'm just using hotkeys.
Edit: With v 0.4 everything works as expected. Thank You :)
-
Very cool! Thank you. And yeah, we will focus not to have such burden for v10 anymore. :-)
Any progress with this? :)
-
+1
It's bad enough that edge trimming was officially released with this clunky workflow, it would be even worse if we have to wait for proper implementation for several years.
-
To be fair, the script/plug-in that Frood shared above which automatically adds the trimming is VERY useful, fast and good.
So... there's that at least