# check if the parameter is inside a specific folder.#this code doesnt worktmp=['info','Image Settings','Color Settings']forfolderintmp:iffolderinparm.containingFolders():print("excluded : "+str(parm.name()))continue# this code worksif'Export Presets'inparm.containingFolders():continue
for some reason as soon as i loop through a list of folder names this doesnt work. Any ideas?
this worked! where exclude_folders is just a string parm with a list of folder names, comma separated. Like tmp list on the previous post.
forparminparms:skip_parameter=False# Check if the parameter is inside a specific folder. This is in case I want the parms of the HDA itselfforfolderinexclude_folders:containing_folders=parm.containingFolders()iffolderincontaining_folders:# Exclude parameterskip_parameter=Trueifskip_parameter:continue
I dont know why the previous didnt work though. The parm to be excluded was correctly caught in the if statement and printed out but the continue statement was not skipping those parms.