dirmap
Golaem supports Maya dirmap feature. dirmap command allows to map a directory to another directory (when moving a scene from one directory to another or from an OS to a different one). Golaem dirmap implementation follows Maya implementation. When an existing scene is opened, every Golaem file path / directory will first be checked:
- if the file or the directory exists, nothing is changed for this file / directory
-
if the file or the directory does not exist, it tries to resolve it using each mapping rule specified to the dirmap command
- if a mapping rule results in an existing file or directory path, this resolved path replaces the source one
- if no mapping rule results in an existing file or directory path, nothing is changed for this file / directory
Each time a path is resolved, Golaem will output the following message:
// Warning: [GolaemCrowd]: Dirmap: File/Directory located at "C:/tests/crowdMan.gcha" has been successfully dirmapped to "N:/tests/crowdMan.gcha" in node entityTypeShape1 //
Note that dirmap happens only when the scene is being opened. Which means that if you want to use dirmap with the currently opened file, you will need to reload it in Maya for the dirmap process to happen. Then it's only required to save the Maya scene to commit those changes.
Tools
Enabling dirmap
The following MEL command can be used to enable dirmap:
dirmap -en true;
As soon as it is enabled, the Golaem Crowd dirmap process will be called each time a new scene is opened.
Adding a mapping rule
The following MEL command can be used to add a mapping rule. It is possible to add as many rules as wanted. The order in which the mapping rule are added may influence the way the file paths will be resolved:
dirmap -m "C:/" "N:/";
Disabling dirmap
The following MEL command can be used to disable dirmap:
dirmap -en false;
It is also possible to only disable Golaem Crowd dirmap process by defining the environment variable GLMCROWD_DIRMAP_ENABLE to 0 (for more information about Environment Variables, check here).
Others
More information about the Maya dirmap command can be found here.