ScriptSpot

Forum topic · Scripts Wanted

Turning on/off many render effects with certain name prefix

By igamaximus · 2018-07-12

Description

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 (6)

It works!

MyGalaxy · 2019-08-30

Oh no, this is my mistake! Everything works great!

Does not work

MyGalaxy · 2019-08-30

I can’t understand, it doesn’t work for me at MAX 2017 at all. What is the reason might be, help? Really need this script.

.

jahman · 2019-08-30

perhaps none of your effects have the correct name prefix?

.

jahman · 2018-07-12

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

)
)

Works perfectly !

igamaximus · 2018-07-12

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 animavision@gmail.com if you need anything of it.

Thanks again, i really apreciate it...
Igor

.

jahman · 2018-07-12

:) glad it helped