Shave And A Haircut Installation

Contents


Installing Shave And A Haircut On Linux

Before Installation

Shave And A Haircut for Linux comes in a RedHat Package Manager (RPM) file, with a name ending in .rpm. E.g:

shaveHaircut_Maya2008_0-5.0-44.i686.rpm
shaveHaircut_Maya2008_0_64-5.0-44.x86_64.rpm

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. '2008_0' for 32-bit Maya 2008, or '2008_0_64' for 64-bit Maya 2008). For the remainder of this document we will assume that you are installing Shave And A Haircut for 32-bit Maya 2008. 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.

Installing Shave And A Haircut

To install Shave And A Haircut, use the rpm command as follows:

rpm -U shaveHaircut_Maya2008_0-5.0-44.i686.rpm

Installing Mental Ray Standalone Support

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:

/usr/autodesk/maya2008/mentalray/lib/shaveMRShader.so

and copy the following file to the include subdirectory of your standalone Mental Ray installation:

/usr/autodesk/maya2008/mentalray/include/shaveMRShader.mi

Loading The Plugin

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:

/usr/autodesk/maya/2008/modules/JoeAlter/plug-ins/

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.

Uninstalling Shave And A Haircut

To uninstall Shave And A Haircut, make yourself the superuser and use the rpm command as follows:

rpm -e shaveHaircut_Maya2008_0

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.

Remote Installation

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.

Relocating Files

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.

Base Plugin And Scripts (required)

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:

/usr/autodesk/maya/2008/modules/shaveHaircut.mod

By default, the module file will point to the JoeAlter/shaveHaircut tree within that same module directory:

/usr/autodesk/maya/2008/modules/JoeAlter/shaveHaircut

Beneath that directory lie four subdirectories, containing the base plug-ins, scripts, icons and Shave API sample files:

/usr/autodesk/maya/2008/modules/JoeAlter/shaveHaircut/plug-ins
/usr/autodesk/maya/2008/modules/JoeAlter/shaveHaircut/scripts
/usr/autodesk/maya/2008/modules/JoeAlter/shaveHaircut/icons
/usr/autodesk/maya/2008/modules/JoeAlter/shaveHaircut/samples

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.

Base Runtime Library (required)

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:

/usr/autodesk/maya2008/lib/libShave.so

You may relocate this library to any directory in the user's LD_LIBRARY_PATH

Icons (recommended)

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:

/usr/autodesk/maya2008/icons

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.

Presets (recommended)

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 2008 the default location of the script file for Shave's grass preset would be:

/usr/autodesk/maya2008/presets/attrPresets/shaveHair/grass.mel

When searching for these built-in presets Shave And A Haircut looks in the following directories, in the order listed, from top to bottom:

The syntax ${NAME} refers to the expansion of the environment variabled named NAME. Note that ${MAYA_PRESET_PATH} may expand to a list of directories in which case each is checked in turn.

Mental Ray Shaders (optional)

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 2008, the files would be located as follows:

/usr/autodesk/maya2008/mentalray/include/shaveMRShader.mi
/usr/autodesk/maya2008/mentalray/lib/shaveMRShader.so
/usr/autodesk/maya2008/mentalray/maya.rayrc

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:

/usr/autodesk/maya2008/icons/render_shaveMRHairComp.xpm
/usr/autodesk/maya2008/icons/render_shaveMRHairGeom.xpm
/usr/autodesk/maya2008/icons/render_shaveMRHairGeomDRA.xpm
/usr/autodesk/maya2008/icons/render_shaveMRHairIllum.xpm
/usr/autodesk/maya2008/icons/render_shaveMRHairShadows.xpm
/usr/autodesk/maya2008/icons/render_shaveMRRenderComp.xpm
/usr/autodesk/maya2008/icons/render_shaveMRVertexIllum.xpm

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.

RenderMan Shaders (optional)

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:

/usr/autodesk/maya/2008/modules/JoeAlter/shaveHaircut/plug-ins/prman/lib/shaders/Shave.slo

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.

Shave API Plugins (optional)

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:

/usr/autodesk/maya2008/lib/libShaveAPI.so

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.

Shave API Development (optional)

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:

/usr/autodesk/maya2008/include/maya/shaveAPI.h

Shave And A Haircut does not itself use this header file, so you may freely relocate it to any directory.


Installing Shave And A Haircut On OSX

Before Installation

Shave And A Haircut for OSX comes as a zipped OSX installation bundle, with a name ending in .pkg.zip. E.g:

shaveHaircut_Maya2008_0.pkg.zip

Make sure that the Maya version given in the filename (e.g. '2008_0') matches the version of Maya for which you are installing Shave And A Haircut (e.g. '2008'). For the remainder of this document we will assume that you are installing Shave And A Haircut for Maya 2008. 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.

Installing Shave And A Haircut

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 .mpkg bundle. 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:

cd Desktop
unzip shaveHaircut_Maya2008_0.pkg.zip

However you get there, you should eventually end up with a bundle ending in .mpkg. Unlike the .zip file, the bundle will also contain the version of Shave in its name (e.g. shaveHaircut_Maya2008_0-5.0v44.mpkg). Again, depending upon your settings, your browser may automatically launch the OSX installer. If not, then double-click on the bundle to launch the installer.

The installer will first display a welcome window. Click on the Continue button.

The next window will give you an opportunity to change where Shave will be installed. To install to a non-default volume, such as a network drive, click the Change Install Location button.

To change where individual components of Shave are installed, click the Customize button. You will be presented with a window listing each of Shave's three components: Maya Support Files, Plugin Files and API Samples. You can choose not to install a given component by toggling off its checkbox, however note that Shave requires the first two components for proper operation. By clicking on the folder icon beside each component you can change the directory where that component will be installed. In choosing an alternate location for a component, keep the following in mind:

Once you're ready to continue with the installation, click on the Install button. The Installer will prompt you for your password, or that of System Administrator. After supplying that, it will proceed to install Shave And A Haircut. When it is done, click the Close button.

Installing Mental Ray Standalone Support

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:

/Applications/Autodesk/maya2008/Maya.app/Contents/mentalray/lib/shaveMRShader.so

Also copy the following file to the include subdirectory of your standalone Mental Ray installation:

/Applications/Autodesk/maya2008/Maya.app/Contents/mentalray/include/shaveMRShader.mi

If during installation you chose to install the "Maya Support Files" component of Shave And A Haircut to a non-default location then you must adjust the pathnames shown above accordingly.

Loading The Plugin

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. If you installed the "Maya Support Files" component of Shave And A Haircut in its default location then its plugin will be in a section bearing a name something like this:

/Users/Shared/Autodesk/maya/2008/plug-ins

If you installed the component elsewhere then the path in the header will differ correspondingly.

Beneath that heading you should see an entry for shaveNode.bundle 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.

Uninstalling Shave And A Haircut

Unfortunately, OSX's Installer does not support uninstalling packages, so you must remove the files by hand.

If you look in your system's /Library/Receipts directory you should see a bundle for each of Shave's three components. E.g:

shave_Maya2008-mayaFiles.pkg
shave_Maya2008-pluginFiles.pkg
shave_Maya2008-sampleFiles.pkg

In the Finder each of these bundles will appear as a single file and, depending upon your settings, the .pkg extension may not be visible. From the command line each bundle will appear as a directory.

Within each package there is a Contents directory containing a file called Archive.bom. This contains a list of all the files which were installed. You can display the list using the lsbom command. E.g:

lsbom /Library/Receipts/shave_Maya2008-mayaFiles.pkg/Contents/Archive.bom

All of the files will be listed relative to the directory in which the component was installed.

Within the Contents directory there is another file named Info.plist. This is an XML text file containing key/value pairs. Find the line which contains the IFPkgRelocatedPath key and beneath that will be a line giving the path to the directory where the component was installed. E.g:

<key>IFPkgRelocatedPath</key>
<string>./Applications/Autodesk/maya2008/</string>

With these two pieces of information you should be able to locate and delete all of the files.

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.

Remote Installation

If you downloaded Shave And A Haircut as a zip file, you will first have to unzip it. That will give you a bundle with a name ending in ".mpkg". E.g:

shaveHaircut_Maya2008_0-5.0v44.mpkg

In Finder the bundle will appear as a single file but from the command line you will see that it is in fact a directory.

The installer command can 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.

To install Shave And A Haircut in its default location you would use a command something like this:

/usr/sbin/installer -pkg shaveHaircut_Maya2008_0-5.0v44.mpkg -target /

The -pkg flag specifies the location of the of the package to be installed and the -target flag specifies the disk volume where Maya is installed, which is usually just the system root ('/').

If you want to install one or more of Shave's components in a non-default location then you will have to install each of the components separately. To do this you must first move into the Contents/Packages directory inside the bundle. In there you will see a separate bundle for each of Shave's three components. E.g:

shaveHaircut_Maya2008-mayaFiles.pkg
shaveHaircut_Maya2008-pluginFiles.pkg
shaveHaircut_Maya2008-sampleFiles.pkg

The installer command can be used to install each component separately. In doing so you must use the -target flag to provide the full path for the component. For example, let's say that you have Maya 2008 installed in /Volumes/Shared/Maya/2008. You will have to provide that path when installing the 'mayaFiles' component:

/usr/sbin/installer -pkg shaveHaircut_Maya2008-mayaFiles.pkg -target /Volumes/Shared/Maya/2008

When choosing an alternate location for a component, keep the following in mind:

Even if you wish for a component to be installed in its default location, you will still have to provide the appropriate path. E.g:

/usr/sbin/installer -pkg shaveHaircut_Maya2008-pluginFiles.pkg -target /Users/Shared/Autodesk/maya/2008
/usr/sbin/installer -pkg shaveHaircut_Maya2008-sampleFiles.pkg -target /Users/Shared/JoeAlter/shaveHaircut/maya2008

Relocating The Plugin Files Component

The Plugin Files component contains three subdirectories: icons, plug-ins and scripts. For proper operation of Shave the icons directory must be in Maya's XBMLANGPATH, the plug-ins directory must be in Maya's MAYA_PLUG_IN_PATH and the scripts directory must be in Maya's MAYA_SCRIPT_PATH.

By default the Plugin Files component is installed into Maya's shared directory (e.g. /Users/Autodesk/maya/2008) because its subdirectories are already included in the appropriate environment variables. If you decide to install the component elsewhere then you must ensure that Maya will know about the new locations of those three subdirectories. There are two ways of doing this.

The simplest approach is to add each of the subdirectories to its corresponding environment variable, for example by placing appropriate assignments into each user's Maya.env file.

A more robust approach is to create a module file. This is a text file containing a single line of text with the following format:

+ shaveHaircut [shaveVersion] [componentPath]

Replace [shaveVersion] with the version of shave your are installeing and replace [componentPath] with the full path to where you have installed the Plugin Files component. For example, if you are installing the Plugin Files component of Shave 5.0v44 into /Library/MayaPlugins then the module file would contain this:

+ shaveHaircut 5.0 /Library/MayaPlugins

Place this file in Maya's modules directory (e.g. /Applications/Autodesk/maya/2008/Maya.app/Contents/modules). Maya will automatically add the subdirectories of the path specified in the module file to the correct environment variables.

Relocating Presets

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 2008 the default location of the script file for Shave's grass preset would be:

/Applications/Autodesk/maya2008/Maya.app/Contents/presets/attrPresets/shaveHair/grass.mel

When searching for these built-in presets Shave And A Haircut looks in the following directories, in the order listed, from top to bottom:

The syntax ${NAME} refers to the expansion of the environment variabled named NAME. Note that ${MAYA_PRESET_PATH} may expand to a list of directories in which case each is checked in turn.


Installing Shave And A Haircut On Windows

Before Installation

Shave And A Haircut for Windows comes as an executable installer with a filename something like this:

shave-5.0v44-Release-Maya2008.exe
shave-5.0v44-Release-Maya2008x64.exe

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. '2008' for 32-bit Maya 2008 or '2008x64' for 64-bit Maya 2008). For the remainder of this document we will assume that you are installing Shave And A Haircut for 32-bit Maya 2008. 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.

Installing Shave And A Haircut

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.

Installing Mental Ray Standalone Support

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:

C:\Program Files\Autodesk\maya2008\mentalray\lib\shaveMRShader.dll

and copy the following file to the include subdirectory of your standalone Mental Ray installation:

C:\Program Files\Autodesk\maya2008\mentalray\include\shaveMRShader.mi

Installing RenderMan Shaders

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:

C:\Program Files\JoeAlter\shaveHaircut\maya2008\plug-ins\prman\lib\shaders\Shave.slo

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:

C:\Program Files\Pixar\RenderMan-Studio-maya8.5

Then you will need to copy Shave.slo into this folder:

C:\Program Files\Pixar\RenderMan-Studio-maya8.5\rmantree\lib\shaders

Loading The Plugin

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:

C:/Program Files/JoeAlter/shaveHaircut/maya2008/plug-ins

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.

Uninstalling Shave And A Haircut

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.

Remote Installation

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:

shave-5.0v44-Release-Maya2008.exe /s /r

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\Autodesk\Maya2008). 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=' syntax. E.g:

shave-5.0v44-Release-Maya2008.exe /s /r /var:MayaLocation="D:\Apps\Autodesk\Maya2008"

Relocating Files

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.

Base Plugin And Scripts (required)

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:

C:\Program Files\Autodesk\Maya2008\modules\shaveHaircut.mod

By default, the module file will point to the JoeAlter\shaveHaircut\maya2008 folder, located in your system's Program Files folder:

C:\Program Files\JoeAlter\shaveHaircut\maya2008

Within that folder lie four sub-folders, containing plug-ins, scripts, icons and Shave API sample files:

C:\Program Files\JoeAlter\shaveHaircut\maya2008\plug-ins
C:\Program Files\JoeAlter\shaveHaircut\maya2008\scripts
C:\Program Files\JoeAlter\shaveHaircut\maya2008\samples

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.

Base Runtime Library (required)

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:

C:\Program Files\Autodesk\Maya2008\bin\libShave.dll

You may relocate this library to any folder in the user's PATH

Icons (recommended)

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:

C:\Program Files\Autodesk\Maya2008\icons

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.

Presets (required)

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 2008 the default location of the script file for Shave's grass preset would be:

C:\Program Files\Autodesk\Maya2008\presets\attrPresets\shaveHair\grass.mel

When searching for these built-in presets Shave And A Haircut looks in the following directories, in the order listed, from top to bottom:

The syntax ${NAME} refers to the expansion of the environment variabled named NAME. Note that ${MAYA_PRESET_PATH} may expand to a list of directories in which case each is checked in turn.

Mental Ray Shaders (optional)

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 2008, the files would be located as follows:

C:\Program Files\Autodesk\Maya2008\mentalray\include\shaveMRShader.mi
C:\Program Files\Autodesk\Maya2008\mentalray\lib\shaveMRShader.dll
C:\Program Files\Autodesk\Maya2008\mentalray\maya.rayrc

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.

RenderMan Shaders (optional)

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:

C:\Program Files\JoeAlter\shaveHaircut\maya2008\plug-ins\prman\lib\shaders\Shave.slo

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:

C:\Program Files\Pixar\RenderMan-Studio-maya8.5

Then you will need to copy Shave.slo into this folder:

C:\Program Files\Pixar\RenderMan-Studio-maya8.5\rmantree\lib\shaders

Shave API Plugins (optional)

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:

C:\Program Files\Autodesk\Maya2008\bin\libShaveAPI.dll

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.

Shave API Development (optional)

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:

C:\Program Files\Autodesk\Maya2008\include\maya\shaveAPI.h

Shave And A Haircut does not itself use this header file, so you may freely relocate it to any folder.


Maya Environment Variables

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:

getenv MAYA_PLUG_IN_PATH

Maya will display a single line containing all of the directories that Maya will search for, in this case, plug-ins.