Turning on/off many render effects with certain name prefix

Hello Scriptspoters,

i have pretty long list of different render effects and occasionally i have to turn on/off some of them. The problem in Effects dialog (Max 2012) is that it's impossible to turn on/off many render effects at once, but 1 by 1 which is tiring. I have all of these render effects correctly named on the list.

Can you please help me wiht the script that will quickly turn on or turn off render effects with certain prefix in their name? For example, i have render effects with "P_" prefix, and it would be perfect if i could turn just them ON with a click of a toolbar button, and turn just them OFF with shift + click on the same button. I don't need any UI.

Thank you so much for your help on this repetitive, manual work...
Igor

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jahman's picture

.

try to make macro out of it

(
state = not keyboard.ShiftPressed
 
for i=1 to numEffects do
(
	eff = getEffect i
	if matchpattern eff.name pattern:"P_*" ignorecase:true do setActive eff state
 
)
)
igamaximus's picture

Works perfectly !

That's it mate, works perfectly !
Thank you so much for your help, and this is not the 1st time you're helping me with these "small" tools that bring big productivity boosts.

If i can help back with some general CG knowledge or service, i would really love to help back. Please contact me on [email protected] if you need anything of it.

Thanks again, i really apreciate it...
Igor

jahman's picture

.

:) glad it helped

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.