Go to: Synopsis. Return value. Keywords. Flags. MEL examples.

Synopsis

colorManagementFileRules [-addRule string] [-colorSpace string] [-down string] [-evaluate string] [-extension string] [-listRules] [-load] [-moveUp string] [-pattern string] [-remove string] [-save]

colorManagementFileRules is NOT undoable, queryable, and editable.

This non-undoable action manages the list of rules that Maya uses to assign an initial input color space to dependency graph nodes that read in color information from a file. Rules are structured in a chain of responsibility, from highest priority rule to lowest priority rule, each rule matching a file path pattern and extension. If a rule matches a given file path, its color space is returned as the result of rules evaluation, and no further rule is considered. The lowest priority rule will always return a match. Rules can be added, removed, and changed in priority in the list. Each rule can have its file path pattern, extension, and color space changed. The rule list can be saved to user preferences, and loaded from user preferences.

Return value

None

In query mode, return type is based on queried flag.

Keywords

color, management

Flags

addRule, colorSpace, down, evaluate, extension, listRules, load, moveUp, pattern, remove, save
Long name (short name) Argument types Properties
-addRule(-add) string createedit
Add a rule with the argument name to the list of rules, as the highest-priority rule. If this flag is used, the pattern, extension, and colorSpace flags must be used as well, to specify the file rule pattern, extension, and color space, respectively.
-colorSpace(-cs) string createqueryedit
The input color space for the rule. If the rule matches a file path, this is the color space that is returned. This color space must match an existing color space in the input color space list.
-down(-dwn) string createedit
Move the rule with the argument name down one position towards lower priority.
-evaluate(-ev) string createedit
Evaluates the list of rules and returns the input color space name that corresponds to the argument file path.
-extension(-ext) string createqueryedit
The file extension for the rule, expressed as a glob pattern: for example, '*' matches all extensions. For more information about glob pattern syntax, see http://en.wikipedia.org/wiki/Glob_%28programming%29.
-listRules(-lsr) createedit
Returns an array of rule name strings, in order, from lowest-priority (rule 0) to highest-priority (last rule in array).
-load(-ld) createedit
Read the rules from Maya preferences. Any existing rules are cleared.
-moveUp(-up) string createedit
Move the rule with the argument name up one position towards higher priority.
-pattern(-pat) string createqueryedit
The file path pattern for the rule. This is the substring to match in the file path, expressed as a glob pattern: for example, '*' matches all files. For more information about glob pattern syntax, see http://en.wikipedia.org/wiki/Glob_%28programming%29.
-remove(-rm) string createedit
Remove the rule with the argument name from the list of rules.
-save(-sav) createedit
Save the rules to Maya preferences.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples

colorManagementFileRules -add "ruleName" -pattern "filePattern" -extension "extension" -colorSpace "colorSpace"
colorManagementFileRules -remove "ruleName"
colorManagementFileRules -up "ruleName"
colorManagementFileRules -down "ruleName"
colorManagementFileRules -edit -pattern "filePattern" "ruleName"
colorManagementFileRules -edit -extension "extension" "ruleName"
colorManagementFileRules -edit -colorSpace "colorSpace" "ruleName"
colorManagementFileRules -query -pattern "ruleName"
colorManagementFileRules -query -extension "ruleName"
colorManagementFileRules -query -colorSpace "ruleName"
colorManagementFileRules -save
colorManagementFileRules -load
// Return array of rule name strings.
colorManagementFileRules -listRules
// Return input space corresponding to file path.
colorManagementFileRules -evaluate filePath