Shave And A Haircut for Linux comes in a RedHat Package Manager (RPM) file, with a name ending in .rpm. E.g:
The first is the version for 32-bit Maya, the second is the version for 64-bit Maya.
Make sure that the Maya version given in the filename matches the version of Maya for which you are installing Shave And A Haircut (e.g. '8_0' for 32-bit Maya 8.0, or '8_0_64' for 64-bit Maya 8.0). For the remainder of this document we will assume that you are installing Shave And A Haircut for 32-bit Maya 8.0. If not, please remember to adjust the version numbers in any filenames or commands presented here to match your version of Maya.
If any users on the system are currently running Maya, have them exit until the installation is complete.
To install Shave And A Haircut, use the rpm command as follows:
Maya allows scenes to be exported as .mi files which can then be rendered using a standalone Mental Ray renderer.
To have Shave And A Haircut support this workflow, copy the following file to the lib subdirectory of your standalone Mental Ray installation:
and copy the following file to the include subdirectory of your standalone Mental Ray installation:
To use Shave And A Haircut from within Maya, bring up Maya's Plug-in Manager, which can be found on the Maya menubar under Window : Settings/Preferences : Plug-in Manager.
The Plug-in Manager will display its plugins in several sections. Shave And A Haircut will have its own section, bearing a name something like this:
Beneath that heading you should see an entry for the shaveNode.so file with two checkboxes to the right of it, marked loaded and auto load.
To load Shave And A Haircut, check the loaded box. To have Shave And A Haircut automatically load whenever you start up Maya, also check the auto load box.
To uninstall Shave And A Haircut, make yourself the superuser and use the rpm command as follows:
Note that if, during installation, you copied files by hand as described in Installing Mental Ray Standalone Support, then you will have to remove those files by hand.
The rpm tool used to install Shave And A Haircut is a command line tool with no user interaction required. As such it is well suited to remote and unattended installation. Simply copy Shave And A Haircut's .rpm file to the remote system, or to a network drive visible to the remote system, then use the rsh command to run rpm on the remote system.
For most users the standard locations used by Shave for its components will be sufficient. However, some users with special needs may need to relocate some or all of Shave's components to different locations on their computer's disks, or on a network.
This section lists the various categories of files included in the Shave And A Haircut installation, their default locations, and how to go about relocating them to different directories.
On Linux Shave And A Haircut is shipped as a Maya module. This means that there is a module definition file which points to a special directory tree containing most of the files required by Shave And A Haircut. Unfortunately, Maya does not yet support the modularization of runtime libraries, presets, Mental Ray for Maya shaders or shader icons, so those elements of the plugin must be dealt with separately.
The module definition file for Shave And A Haircut is named shaveHaircut.mod and is located in Maya's module directory. For example:
By default, the module file will point to the JoeAlter/shaveHaircut tree within that same module directory:
Beneath that directory lie four subdirectories, containing the base plug-ins, scripts, icons and Shave API sample files:
All except the sample files are required for the proper operation of Shave And A Haircut.
The easiest way to relocate these files is to move the entire sub-tree, as a unit, and modify the path in the shaveHaircut.mod file to point to the new location.
The shaveHaircut.mod file itself may be relocated to any directory in the user's MAYA_MODULE_PATH.
Alternatively, the files in the plug-ins subdirectory may be moved to any directory which is in the user's MAYA_PLUG_IN_PATH, the files in the scripts subdirectory to any directory in the user's MAYA_SCRIPT_PATH, and the files in the icons subdirectory to any directory in the user's XBMLANGPATH. The files in the samples subdirectory can go wherever you like.
Shave And A Haircut installs a library named libShave.so to which it must have access at runtime. By default this file is placed in Maya's lib directory along with Maya's own runtime libraries. E.g:
You may relocate this library to any directory in the user's LD_LIBRARY_PATH
Some versions of Maya do not allow render node and button icons to be stored within the module tree, so Shave And A Haircut installs them into Maya's own icons directory. E.g:
Icon files whose names begin with either shave or render_shave are part of the Shave And A Haircut plugin.
If these files are not present Maya will print warnings and buttons on the Shave shelf will be displayed with a blank icon, as will any Shave-specific buttons on the Hypershade and Create Render Node windows. Other than that, both Shave And A Haircut and Maya will still function properly.
In Maya 6.5 these files must remain in Maya's own icons directory. In Maya 7.0 and later they can be relocated to any directory in the user's XBMLANGPATH.
Shave And A Haircut includes a number of preset files which can be used to quickly create hair with certain predefined looks, such as blond, grass, scruffy, etc. Each preset consists of a MEL script file and an XPM image file containing a sample swatch.
These presets are intended to be available to all users on the system and are normally stored with the rest of Maya's system-wide presets in a directory relative to Maya's installation directory. So for Maya 8.0 the default location of the script file for Shave's grass preset would be:
Shave And A Haircut can be made to look for its preset files in a different directory by defining either the SHAVE_COMMON_PRESET_PATH environment variable or the SHAVE_LOCATION environment variable.
If SHAVE_COMMON_PRESET_PATH is defined then Shave will search for its preset files in that directory. For example, if your Maya.env file contained the following definition:
then Shave And A Haircut would look for the grass preset in:
If the directory does not exist or is empty, Shave And A Haircut will look no further and will assume that presets are unavailable.
If SHAVE_COMMON_PRESET_PATH is not defined, but SHAVE_LOCATION is, then Shave will treat it as the top of a directory tree having the same structure as MAYA_LOCATION and try to locate its preset files relative to that. For example, if your Maya.env file contained the following definition:
then Shave And A Haircut would look for the grass preset in:
If the directory does not exist or is empty, Shave will go on to search the normal MAYA_LOCATION directory tree.
Shave And A Haircut's support for Mental Ray for Maya involves three files: a shader definition file called shaveMRShader.mi, a shader library file called shaveMRShader.so, and the Mental Ray for Maya startup file which is called maya.rayrc. These files are installed within the mentalray hierarchy beneath Maya's own installation directory. For Maya 8.0, the files would be located as follows:
The first two files are installed by Shave And A Haircut. The third is installed by Maya and modified by the Shave And A Haircut installer. They are only required if you wish to use Mental Ray for Maya to render scenes containing hair generated by Shave And A Haircut.
The locations of these files are mandated by Maya and, to the best of our knowledge, they cannot be relocated elsewhere except by moving all of Maya.
Shave And A Haircut also installs icons for its Mental Ray shaders into Maya's own icons directory. E.g:
If these files are not present, the corresponding shaders will be displayed with blank icons in the Hypershade and Create Render Node windows. Also, the first time one of those windows is opened, Maya will display warning messages for each missing icon. Other than that, both Shave And A Haircut and Maya will function properly whether or not the files are present.
In Maya 6.5 these files must remain in Maya's own icons directory. In Maya 7.0 and later they can be relocated to any directory in the user's XBMLANGPATH.
Shave has a single RenderMan shader called Shave.slo which is installed into the plug-ins/prman/lib/shaders directory in the Shave installation tree. For example:
By default Shave looks for this shader relative to the location of its plugin file, shaveNode.so, which normally sits in the plug-ins directory of the path given above. So if you move shaveNode.so to a different directory then you should move the prman directory there as well.
Alternatively, you can move the Shave.slo file itself into the lib/shaders subdirectory of any directory in the user's RMSTREE.
Third-party plugins developed using the Shave And A Haircut API will require the presence of the libShaveAPI.so runtime library, which by default can be found in Maya's own lib directory. E.g:
If you are using third-party plugins built with the Shave And A Haircut API and need to relocate this file, the directory to which you relocate it must be in the user's LD_LIBRARY_PATH.
Note that Shave And A Haircut does not itself use this file.
Developers wishing to create their own plugins which use the Shave And A Haircut API will need access to the libShaveAPI.so runtime library described in the previous section, as well as its associated header file, shaveAPI.h. By default this header file is located within Maya's own include directory. E.g:
Shave And A Haircut does not itself use this header file, so you may freely relocate it to any directory.
Shave And A Haircut for OSX comes as a zipped OSX Package Manager bundle, with a name ending in .pkg.zip. E.g:
Make sure that the Maya version given in the filename (e.g. '8_0') matches the version of Maya for which you are installing Shave And A Haircut (e.g. '8.0). For the remainder of this document we will assume that you are installing Shave And A Haircut for Maya 8.0. If not, please remember to adjust the Maya version numbers in any filenames or commands presented here to match your version of Maya.
If any users on the system are currently running Maya, have them exit until the installation is complete.
If you are upgrading from an earlier version of Shave And A Haircut, just follow the same instructions as if you were installing for the first time.
If you downloaded Shave And A Haircut using your web browser, depending upon its configuration it may have automatically expanded the .zip file into a .pkg file. If not, then try double-clicking on the .zip file to see if that will expand it. If that doesn't work either, then open up a Terminal window, use the cd command to change to whatever directory you downloaded the .zip file to, then use the unzip command to expand it. For example, if you downloaded the .zip file to your desktop, then you would do something like this:
However you get there, you should eventually end up with a file ending in .pkg. Unlike the .zip file, this file will also contain the version of Shave in its name (e.g. shaveHaircut_Maya8_0-4.4v12.pkg). Again, depending upon your settings, your browser may automatically launch the OSX installer. If not, then double-click on the file to launch the installer.
The Installer will first ask you for your passphrase, or that of System Administrator. After supplying that, you will be presented with the Welcome screen. Click on the Continue button.
The next window will prompt you to select on which disk to put the plugin. Click on the same disk as contains your Maya software, then click on the Continue button.
The next window will have a button labelled either Install or Upgrade. Click on that button. OSX will then install Shave And A Haircut. When it is done, click on the Close button.
Maya allows scenes to be exported as .mi files which can then be rendered using a standalone Mental Ray renderer.
To have Shave And A Haircut support this workflow, you must copy the following file to the lib subdirectory of your standalone Mental Ray installation:
Also copy the following file to the include subdirectory of your standalone Mental Ray installation:
To use Shave And A Haircut from within Maya, bring up Maya's Plug-in Manager, which can be found on the Maya menubar under Window : Settings/Preferences : Plug-in Manager.
The Plug-in Manager will display its plugins in several sections. Shave And A Haircut will be in a section bearing a name something like this:
Beneath that heading you should see an entry for the shaveNode.lib file with two checkboxes to the right of it, marked loaded and auto load.
To load Shave And A Haircut, check the loaded box. To have Shave And A Haircut automatically load whenever you start up Maya, also check the auto load box.
Unfortunately, OSX's Installer does not support uninstalling packages, so you must remove the files by hand. See the section on Relocating Files for a list of the files installed by Shave And A Haircut.
Note that if, during installation, you copied files by hand as described in Installing Mental Ray Standalone Support, then you will have to remove those files as well.
If you downloaded Shave And A Haircut as a zip file, you will first have to unzip it to get the package contained inside.
The Installer command can then be used to do command line installations of the package without invoking a graphical user interface. As such it is well suited for use in remote and unattended installations. Note that you must have root privileges to use this command.
The -pkg flag is used to specify the location of the of the package to be installed and the -target flag is used to specify the disk volume where Maya is installed, usually just the system root ('/'). For example:
For most users the standard locations used by Shave for its components will be sufficient. However, some users with special needs may need to relocate some or all of Shave's components to different locations on their computer's disks, or on a network.
This section lists the various categories of files included in the Shave And A Haircut installation, their default locations, and how to go about relocating them to different directories.
The following plugin files are installed into /Users/Shared/Alias/maya/8.0/plug-ins:
For Maya 6.5 and 7.0 instead of shaveNode.bundle there is shaveNode.lib.
These files are required for the proper operation of Shave And A Haircut. You may relocate them to any directory in the user's MAYA_PLUG_IN_PATH. However, note that the two files must be kept together in the same directory.
Shave's MEL scripts are installed into /Users/Shared/Alias/maya/8.0/scripts. This is a shared directory which may contain scripts from other plugins as well. Those whose filenames begin with either shave or AEshave are part of Shave And A Haircut and are required for its proper operation. You may relocate them to any directory in the user's MAYA_SCRIPT_PATH.
Shave's icon files are installed into /Users/Shared/Alias/maya/8.0/icons. This is a shared directory which may contain icons from other plugins as well. Those whose filenames begin with either shave or render_shave are part of Shave And A Haircut.
If these files are not present Maya will print warnings and buttons on the Shave shelf will be displayed with a blank icon, as will any Shave-specific buttons on the Hypershade and Create Render Node windows. Other than that, both Shave And A Haircut and Maya will still function properly.
The icon files may be relocated to any directory in the user's XBMLANGPATH.
Shave And A Haircut includes a number of preset files which can be used to quickly create hair with certain predefined looks, such as blond, grass, scruffy, etc. Each preset consists of a MEL script file and an XPM image file containing a sample swatch.
These presets are intended to be available to all users on the system and are normally stored with the rest of Maya's system-wide presets in the Contents hierarchy of Maya's installation directory. So for Maya 8.0 the default location of the script file for Shave's grass preset would be:
Shave And A Haircut can be made to look for its preset files in a different directory by defining either the SHAVE_COMMON_PRESET_PATH environment variable or the SHAVE_LOCATION environment variable.
If SHAVE_COMMON_PRESET_PATH is defined then Shave will search for its preset files in that directory. For example, if your Maya.env file contained the following definition:
then Shave And A Haircut would look for the grass preset in:
If the directory does not exist or is empty, Shave And A Haircut will look no further and will assume that presets are unavailable.
If SHAVE_COMMON_PRESET_PATH is not defined, but SHAVE_LOCATION is, then Shave will treat it as the top of a directory tree having the same structure as Maya's Contents hierarchy and try to locate its preset files relative to that. For example, if your Maya.env file contained the following definition:
then Shave And A Haircut would look for the grass preset in:
If the directory does not exist or is empty, Shave will go on to search the normal MAYA_LOCATION directory tree.
Shave And A Haircut's support for Mental Ray for Maya involves three files: a shader definition file called shaveMRShader.mi, a shader library file called shaveMRShader.so, and the Mental Ray for Maya startup file which is called maya.rayrc. These files are installed within the mentalray hierarchy beneath Maya's own installation directory. For Maya 8.0, the files would be located as follows:
The first two files are installed by Shave And A Haircut. The third is installed by Maya and modified by the Shave And A Haircut installer. They are only required if you wish to use Mental Ray for Maya to render scenes containing hair generated by Shave And A Haircut.
The locations of these files are mandated by Maya and, to the best of our knowledge, they cannot be relocated elsewhere except by moving all of Maya.
Shave has a single RenderMan shader called Shave.slo which is installed into the prman/lib/shaders directory within Maya's shared plug-ins directory. For example:
By default Shave looks for this shader relative to the location of its plugin file, shaveNode.bundle (or shaveNode.lib if you're using Maya 7.0) which normally sits in the plug-ins directory of the path given above. So if you move shaveNode.bundle to a different directory then you should move the prman directory there as well.
Alternatively, you can move the Shave.slo file itself into the lib/shaders subdirectory of any directory in the user's RMSTREE.
Shave And A Haircut for Windows comes as an executable installer with a filename something like this:
The first is the version for 32-bit Maya, the second is the version for 64-bit Maya.
Make sure that the Maya version given in the filename matches the version of Maya for which you are installing Shave And A Haircut (.e.g. '8.0' for 32-bit Maya 8.0 or '8.0x64' for 64-bit Maya 8.0). For the remainder of this document we will assume that you are installing Shave And A Haircut for 32-bit Maya 8.0. If not, please remember to adjust the version numbers in any filenames or commands presented here to match your version of Maya.
If any users on the system are currently running Maya, have them exit until the installation is complete.
To install Shave And A Haircut, run the executable by double-clicking on its filename. This will launch the Shave And A Haircut installation wizard which will guide you through the remainder of the installation process.
Maya allows scenes to be exported as .mi files which can then be rendered using a standalone Mental Ray renderer. To make use of Shave And A Haircut in those standalone renders, copy the following file to the lib subdirectory of your standalone Mental Ray installation:
and copy the following file to the include subdirectory of your standalone Mental Ray installation:
Shave has a single RenderMan shader called Shave.slo which is installed into the plug-ins/prman/lib/shaders folder within the JoeAlter tree. For example:
The current beta versions of RenderMan Studio and RenderMan for Maya do not allow shaders to be located anywhere except in their own rmantree\lib\shaders folder. For example, if you have RenderMan Studio installed in:
Then you will need to copy Shave.slo into this folder:
If you are installing a trial version of Shave And A Haircut, no license is required. Otherwise, your copy of Shave And A Haircut must be licensed before it can be used.
Shave And A Haircut provides two different types of licenses: node-locked and floating. A node-locked license is restricted to a single, specific computer while a floating license can be used on any computer connected to your local network. The next two sections describe how to set up each of these types of licenses.
To use Shave And A Haircut from within Maya, bring up Maya's Plug-in Manager, which can be found on the Maya menubar under Window : Settings/Preferences : Plug-in Manager.
The Plug-in Manager will display its plugins in several sections. Shave And A Haircut will have its own section, bearing a name something like this:
Beneath that heading you should see an entry for the shaveNode.mll file with two checkboxes to the right of it, marked loaded and auto load.
To load Shave And A Haircut, check the loaded box. To have Shave And A Haircut automatically load whenever you start up Maya, also check the auto load box.
To uninstall Shave And A Haircut, run the Add/Remove Programs utility, usually found on the Windows Control Panel. Click on the entry for Shave And A Haircut For Maya then click on the Change/Remove button which appears. This will launch an uninstaller wizard, which will guide you through the remainder of the installation.
Note that if, during installation, you copied files by hand as described in Installing Mental Ray Standalone Support, then you will have to remove those files by hand.
The installer executable provides a "silent" mode of operation which performs a default installation without using a graphical interface and without requiring any user input. As such it is well suited for use in remote and unattended installations.
To access the silent mode, run the executable from the command line and append the /s flag. You'll also want to use the /r flag to tell it not to prompt you about file conflicts but to just go ahead and replace any existing files with those from the installer. E.g:
Some System Administrators install Maya simply by copying its files from another system. This results in an installation for which there are no entries in the Windows Registry. The installer can handle this so long as Maya has been installed in its standard location (e.g. C:\Program Files\Alias\Maya8.0). However, if there are no registry entries and Maya has been installed in a non-standard location, then the installation will fail.
If you run into this problem, you will have to explictly give the path to the
Maya installation directory on the command line, using the
'/var:MayaLocation=
For most users the standard locations used by Shave for its components will
be sufficient. However, users with special needs may need to relocate some or
all of Shave's components to different locations on their computer's disks, or
on a network.
This section lists the various categories of files included in the Shave And
A Haircut installation, their default locations, and how to go about relocating
them to different folders.
On Windows Shave And A Haircut is shipped as a Maya module. This means that
there is a module definition file which points to a special folder containing
most of the files required by Shave And A Haircut. Unfortunately, Maya does not
yet support the modularization of runtime libraries, presets, Mental Ray for
Maya shaders, or shader icons, so those elements of the plugin must be dealt
with separately.
The module definition file for Shave And A Haircut is named
shaveHaircut.mod and is located in Maya's module folder for the specific
version of Maya for which it was installed. For example:
By default, the module file will point to the
JoeAlter\shaveHaircut\maya8.0 folder, located in your system's Program
Files folder:
Within that folder lie four sub-folders, containing plug-ins, scripts, icons
and Shave API sample files:
All except the sample files are required for the proper operation of Shave
And A Haircut.
The easiest way to relocate these files is to move the entire sub-tree, as a
unit, and modify the path in the shaveHaircut.mod file to point to the
new location.
The shaveHaircut.mod file itself may be relocated to any folder in the
user's MAYA_MODULE_PATH.
Alternatively, the files in the plug-ins sub-folder may be moved to
any folder which is in the user's MAYA_PLUG_IN_PATH,
the files in the scripts sub-folder to any folder in the user's MAYA_SCRIPT_PATH,
and the files in the icons sub-folder to any folder in the user's XBMLANGPATH.
The files in the samples sub-folder can go wherever you like.
Shave And A Haircut installs a library named libShave.dll to which it
must have access at runtime. By default this file is placed in Maya's bin
folder along with Maya's own runtime libraries. E.g:
You may relocate this library to any folder in the user's PATH
Some versions of Maya do not allow icons to be stored within the module tree,
so Shave And A Haircut installs its icons into Maya's own icons folder.
E.g:
Any files whose names begin with shave or render_shave are part
of the Shave And A Haircut plugin.
If these files are not present Maya will print warnings and buttons on the
Shave shelf will be displayed with a blank icon, as will any Shave-specific
buttons on the Hypershade and Create Render Node windows. Other than that, both
Shave And A Haircut and Maya will still function properly.
In Maya 6.5 these files must remain in Maya's own icons directory. In
Maya 7.0 and later they can be relocated to any directory in the user's XBMLANGPATH.
Shave And A Haircut includes a number of preset files which can be used to
quickly create hair with certain predefined looks, such as blond, grass,
scruffy, etc. Each preset consists of a MEL script file and an XPM image file
containing a sample swatch.
These presets are intended to be available to all users on the system and are
normally stored with the rest of Maya's system-wide presets in a folder relative
to Maya's installation directory. So for Maya 8.0 the default location of the
script file for Shave's grass preset would be:
Shave And A Haircut can be made to look for its preset files in a different
folder by defining either the SHAVE_COMMON_PRESET_PATH environment
variable or the SHAVE_LOCATION environment variable.
If SHAVE_COMMON_PRESET_PATH is defined then Shave will search for its
preset files in that folder. For example, if your Maya.env file contained
the following definition:
then Shave And A Haircut would look for the grass preset in:
If the folder does not exist or is empty, Shave And A Haircut will look no
further and will assume that presets are unavailable.
If SHAVE_COMMON_PRESET_PATH is not defined, but SHAVE_LOCATION
is, then Shave will treat it as the top of a folder tree having the same
structure as MAYA_LOCATION and try to locate its preset files relative to
that. For example, if your Maya.env file contained the following
definition:
then Shave And A Haircut would look for the grass preset in:
If the folder does not exist or is empty, Shave will go on to search the
normal MAYA_LOCATION
folder tree.
Shave And A Haircut's support for Mental Ray for Maya involves three files: a
shader definition file called shaveMRShader.mi, a shader library file
called shaveMRShader.dll, and the Mental Ray for Maya startup file which
is called maya.rayrc. These files are installed within the
mentalray hierarchy beneath Maya's own installation folder. For Maya 8.0,
the files would be located as follows:
The first two files are installed by Shave And A Haircut. The third is
installed by Maya and modified by the Shave And A Haircut installer. They are
only required if you wish to use Mental Ray for Maya to render scenes containing
hair generated by Shave And A Haircut.
The locations of these files are mandated by Maya and, to the best of our
knowledge, cannot be relocated elsewhere except by moving all of Maya.
Shave has a single RenderMan shader called Shave.slo which is
installed into the plug-ins/prman/lib/shaders folder within the JoeAlter
tree. For example:
The current beta versions of RenderMan Studio and RenderMan for Maya do not
allow shaders to be located anywhere except in their own
rmantree\lib\shaders folder. For example, if you have RenderMan Studio
installed in:
Then you will need to copy Shave.slo into this folder:
Third-party plugins developed using the Shave And A Haircut API will require
the presence of the libShaveAPI.dll runtime library, which by default can
be found in Maya's own bin folder. E.g:
If you are using third-party plugins built with the Shave And A Haircut API
and need to relocate this file, the folder to which you relocate it must be in
the user's PATH.
Note that Shave And A Haircut does not itself use this file.
Developers wishing to create their own plugins which use the Shave And A
Haircut API will need access to the libShaveAPI.dll runtime library
described in the previous section, as well as its associated header file,
shaveAPI.h. By default this file is located within Maya's own
include folder. E.g:
Shave And A Haircut does not itself use this header file, so you may freely
relocate it to any folder.
If you don't know which directories are pointed to by a given Maya
environment variable, such as MAYA_PLUG_IN_PATH, then start up Maya and
in the Script Editor window and use the getenv command on the variable
name. E.g:
Maya will display a single line containing all of the directories that Maya
will search for, in this case, plug-ins. Relocating Files
Base Plugin And Scripts (required)
C:\Program Files\JoeAlter\shaveHaircut\maya8.0\scripts
C:\Program Files\JoeAlter\shaveHaircut\maya8.0\samples Base Runtime Library (required)
Icons (recommended)
Presets (required)
Mental Ray Shaders (optional)
C:\Program Files\Alias\Maya8.0\mentalray\lib\shaveMRShader.dll
C:\Program Files\Alias\Maya8.0\mentalray\maya.rayrc RenderMan Shaders (optional)
Shave API Plugins (optional)
Shave API Development (optional)
Maya Environment Variables