pymel.mayautils.recurseMayaScriptPath

recurseMayaScriptPath(roots=[], verbose=False, excludeRegex=None, errors='warn', prepend=False)

Given a path or list of paths, recurses through directories appending to the MAYA_SCRIPT_PATH environment variable any found directories containing mel scripts.

The root directories, if given, are always added to the MAYA_SCRIPT_PATH, even if they don’t contain any mel scripts.

Parameters:
roots : str or list of str

a single path or list of paths to recurse. if left to its default, will use the current MAYA_SCRIPT_PATH values

verobse : bool

verbose on or off

excludeRegex : str

string to be compiled to a regular expression of paths to skip. This regex only needs to match the folder name