ScriptSpot home

Forum topic · Scripts Wanted

"Clear Materials from Selected" command? (Is this right?)

By kinggambit · 2017-12-05

Downloads
Description

Embarrassingly enough, I've tried for the past couple days to write a simple script for this but I've realized I'm hopelessly bad at maxscript. Shouldn't this work if I ran it?

macroScript ClearMaterialSelected

category:"# Scripts"

toolTip:"Clear Material"

(

 $. mat = null

)

 

 

Comments (3)
miauu

.


(
	if selection.count != 0 do selection.material = undefined
)
Reply to miauu
Vojtech Cada

You don't even need the if test if using selection. I think the original problem might be confusing what scripts vs macroscripts do, macro will do 'nothing' when run as a script, it will only register an action that can be called from global search, assigned hotkey or UI item