parmutils module

parmutils.addParmAndContainingFolders(ptg, parm_template, folder_labels_or_templates, folder_type=<sphinx.ext.autodoc.importer._MockObject object>)
parmutils.collectParms(nodes, parm_name)
parmutils.decodeConditional(cond)

Decodes the conditional string into a list of groups containing lists of conditions.

The conditions consist of a list in the form [parm, op, value]

For example, { x != 0 } { y > 1 z 3 } decodes to:

[
[
[‘x’, ‘!=’, ‘0’]

], [

[‘y’, ‘>’, ‘1’], [‘z’, ‘==’, ‘3’]

]

]

parmutils.encodeConditional(cond)
parmutils.getAllParmTemplates(group_or_folder)
parmutils.getContainingFolderLabels(parm_template_group, parm_name)
parmutils.getContainingFolders(parm_template_group, parm_name)
parmutils.getDeepestCommonFolder(folder_hierarchies)

Given a list of folder strings (slash separated folder labels), return the string of deepest common folders.

If the list is empty an empty string is returned.

parmutils.getFoldersFromString(folder_string)

Turns a list of slash separated folder labels into a list of FolderParmTemplates

parmutils.moveParameterToFolder(ptg, parm_name, in_folders, folder_type=<sphinx.ext.autodoc.importer._MockObject object>)

Move the parameter to the folders specified by in_folders. The parameter is always moved to the bottom of it’s folder.

folder_type sets the type of newly added folders.

parmutils.parmPrepend(nodes, parm_name, string)
parmutils.parmReplace(nodes, parm_name, old_string, new_string)
parmutils.parmSub(nodes, parm_name, pattern, new_string)
parmutils.printFolderHierarchy(ptg, level=0)
parmutils.replaceParm(ptg, indices, parm_template)

Replaces the parm at ‘indices’ with ‘parm_template’ and updates all containing folders

parmutils.selectLocalAttribAndCreateReferencesFromParms(parms)

Prompt to select a local attribute that is visible to the parameter’s node and create expressions on the specified parameters to reference the selected attribute.

parmutils.selectLocalVarAndCreateReferenceFromParm(parm)

Prompt to select a local variable that is visible to the parameter’s node and create an expression on the specified parameter to reference the selected component.

parmutils.selectSceneDataAndCreateParmReference(parm_or_parm_tuple)

Prompt to select node data and create a reference to the data from the given parameters by creating parameter expressions.

parmutils.setAllFolderTypes(ptg, folder_type)
parmutils.setParmTemplates(ptg, parm_templates)
parmutils.shiftParmIndices(ptg, current_indices, target_indices)

Shifts each folder in the hierarchy to the specified index within it’s parent folder.