Quantcast
Channel: StudioSysAdmins Message Board
Viewing all articles
Browse latest Browse all 3749

Maya - Workspace.mel - how do you set custom folders?

$
0
0
Maya - Workspace.mel - how do you set custom folders?
posted by Todd Smith on Sept. 18, 2014, 3:55 p.m. (1 day ago)
Hey Guys,

We are currently trying to manipulate the custom folders available in the Maya File Open dialog (lower left hand corner of the window).

Usually we would do this with a custom workspace.mel file, for example:

workspace -fr "scene" "scenes/3d";

Would set a folder pointing to the scenes/3d folder under whatever we've set the $MAYA_PROJECT env var.

Now in
 

It states

// The following example shows how to set multiple paths into a fileRule value
workspace -fileRule 'newMultiPathFileRuleName' '/h/userName/maya/projects/default;newFileRuleValue';
and 

-fileRule(-fr)string stringcreatequery
Set the default location for a file. The first parameter is the fileRule name(scenes, images, etc) and the second is the location. When queried, it returns a list of strings. The elements of the returned list alternate between fileRule names and the corresponding location. There is typically one file rule for each available translator. Environment variables are supported. You can set multiple path for the file rule by separating them with semicolons (;) on Windows and colons(:) on MacOSX and Linux. Note that whitespace at the beginning and end of each item in the separated sequence is significant and will be included as part of the path name (which is not usually desired unless the pathname does actually start or end with spaces). A valid filerule name cannot contain multiple byte characters.

So ideally, we should be able to set multiple file paths for the "scenes" fileRuleName by using "scenes/3d/anim:scenes/3d/model" or more precisely:

workspace -fr "scene" "scenes/3d/anim:scenes/3d/model"

Using this "should" do something, preferably populate that custom folder bar in the lower left hand corner with two directories.  Alas it does not, in fact it does nothing, throws no errors and is generally useless.

So, the question is how do we add project relative paths to the file open dialog?

Additionally it looks like there are only certain fileRuleNames that will populate this area, those being the default names (scenes, assets, images, sourceimages, renderData, clips, sound, scripts, data, movies, autosave), but it would be great if either the multi file path worked because we actually store maya files in very specific directories and want to make those available.

Is anyone out there populating this window using workspace.mel to populate this in a sensible way or are you doing it some other way (ie. overriding the np_get* files with your custom scripts folder)

Thanks,


Todd Smith
Head of Information Technology

soho vfx 
99 Atlantic Ave. Suite 303, Toronto, Ontario M6K 3J8

Thread Tags:
  discuss-at-studiosysadmins 

0 Responses   0 Plus One's   0 Comments  
 
Hey Guys,

We are currently trying to manipulate the custom folders available in the Maya File Open dialog (lower left hand corner of the window).

Usually we would do this with a custom workspace.mel file, for example:

workspace -fr "scene" "scenes/3d";

Would set a folder pointing to the scenes/3d folder under whatever we've set the $MAYA_PROJECT env var.

Now in
 

It states

// The following example shows how to set multiple paths into a fileRule value
workspace -fileRule 'newMultiPathFileRuleName' '/h/userName/maya/projects/default;newFileRuleValue';
and 

-fileRule(-fr)string stringcreatequery
Set the default location for a file. The first parameter is the fileRule name(scenes, images, etc) and the second is the location. When queried, it returns a list of strings. The elements of the returned list alternate between fileRule names and the corresponding location. There is typically one file rule for each available translator. Environment variables are supported. You can set multiple path for the file rule by separating them with semicolons (;) on Windows and colons(:) on MacOSX and Linux. Note that whitespace at the beginning and end of each item in the separated sequence is significant and will be included as part of the path name (which is not usually desired unless the pathname does actually start or end with spaces). A valid filerule name cannot contain multiple byte characters.

So ideally, we should be able to set multiple file paths for the "scenes" fileRuleName by using "scenes/3d/anim:scenes/3d/model" or more precisely:

workspace -fr "scene" "scenes/3d/anim:scenes/3d/model"

Using this "should" do something, preferably populate that custom folder bar in the lower left hand corner with two directories.  Alas it does not, in fact it does nothing, throws no errors and is generally useless.

So, the question is how do we add project relative paths to the file open dialog?

Additionally it looks like there are only certain fileRuleNames that will populate this area, those being the default names (scenes, assets, images, sourceimages, renderData, clips, sound, scripts, data, movies, autosave), but it would be great if either the multi file path worked because we actually store maya files in very specific directories and want to make those available.

Is anyone out there populating this window using workspace.mel to populate this in a sensible way or are you doing it some other way (ie. overriding the np_get* files with your custom scripts folder)

Thanks,


Todd Smith
Head of Information Technology

soho vfx 
99 Atlantic Ave. Suite 303, Toronto, Ontario M6K 3J8


Viewing all articles
Browse latest Browse all 3749

Trending Articles