aboutsummaryrefslogtreecommitdiff
path: root/install/docs/Install.html
blob: c90d9fadf4d05ca2e3fb829f72c77e114fcde6ca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
<html>
<body>
<h1 align="center">Shave And A Haircut Installation</h1>
<p>
<b>Warning: This document is out of date. Use at your own risk.</b>
<p>
<h2>Contents</h2>
<ul>
<li><a href="#linux">Linux</a></li>
	<ul>
	<li><a href="#before-linux">Before Installation</a></li>
	<li><a href="#install-linux">Installing Shave And A Haircut</a></li>
	<li><a href="#load-linux">Loading The Plugin</a></li>
	<li><a href="#uninstall-linux">Uninstalling Shave And A Haircut</a></li>
	<li><a href="#remote-linux">Remote Installation</a></li>
	<li><a href="#relocate-linux">Relocating Files</a></li>
	</ul>
<li><a href="#osx">OSX</a></li>
	<ul>
	<li><a href="#before-osx">Before Installation</a></li>
	<li><a href="#install-osx">Installing Shave And A Haircut</a></li>
	<li><a href="#load-osx">Loading The Plugin</a></li>
	<li><a href="#uninstall-osx">Uninstalling Shave And A Haircut</a></li>
	<li><a href="#remote-osx">Remote Installation</a></li>
	<li><a href="#relocate-osx">Relocating Files</a></li>
	</ul>
<li><a href="#windows">Windows</a></li>
	<ul>
	<li><a href="#before-windows">Before Installation</a></li>
	<li><a href="#install-windows">Installing Shave And A Haircut</a></li>
	<li><a href="#load-windows">Loading The Plugin</a></li>
	<li><a href="#uninstall-windows">Uninstalling Shave And A Haircut</a></li>
	<li><a href="#remote-windows">Remote Installation</a></li>
	<li><a href="#relocate-windows">Relocating Files</a></li>
	</ul>
<li><a href="#mayaVars">Maya Environment Variables</a></li>
</ul>
<p>


<hr>
<p>
<h2 align="center"><a name="linux">Installing Shave And A Haircut On Linux</a></h2>

<p>
<h3><a name="before-linux">Before Installation</a></h3>
<p>
Shave And A Haircut for Linux comes in a RedHat Package Manager (RPM)
file, with a name ending in <i>.rpm</i>.  E.g:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    shaveHaircut_Maya2018_0_64-9.0-36.x86_64.rpm
</div>
<p>
That is the 9.0v36 version of Shave And A Haircut for Maya 2018.
<p>
Make sure that the Maya version given in the filename matches the version
of Maya for which you are installing Shave And A Haircut.
For the remainder of this document we will assume that you are
installing Shave And A Haircut for Maya 2018.  If not, please
remember to adjust the version numbers in any filenames or commands
presented here to match your version of Maya.
<p>
If any users on the system are currently running Maya, have them exit until
the installation is complete.

<p>
<h3><a name="install-linux">Installing Shave And A Haircut</a></h3>
<p>
Depending on how your Linux system is configured, use either the <i>rpm</i>
command or the <i>yum</i> command to install Shave And A Haircut. E.g:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    rpm -U shaveHaircut_Maya2018_0_64-9.0-36.x86_64.rpm
</div>
or:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    yum install shaveHaircut_Maya2018_0_64-9.0-36.x86_64.rpm
</div>
<p>
Note that you will need superuser privileges to run either of these commands.

<p>
<h3><a name="load-linux">Loading The Plugin</a></h3>
<p>
To use Shave And A Haircut from within Maya, bring up Maya's <i>Plug-in
Manager</i>, which can be found on the Maya menubar under <i>Window :
Settings/Preferences : Plug-in Manager</i>.
<p>
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:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    /usr/autodesk/maya/2018/modules/Epic&nbsp;Games/shaveHaircut/plug-ins/
</div>
<p>
Beneath that heading you should see an entry for the <i>shaveNode.so</i>
file with two checkboxes to the right of it, marked <i>loaded</i> and
<i>auto load</i>.
<p>
To load Shave And A Haircut, check the <i>loaded</i> box.  To have Shave
And A Haircut automatically load whenever you start up Maya, also check the
<i>auto load</i> box.

<p>
<h3><a name="uninstall-linux">Uninstalling Shave And A Haircut</a></h3>
<p>
To uninstall Shave And A Haircut, make yourself the superuser and use
either the <i>rpm</i> command or the <i>yum</i> command, whichever is
appropriate for your system. E.g:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    rpm -e shaveHaircut_Maya2018_0
</div>
or:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    yum erase shaveHaircut_Maya2018_0
</div>
<p>

<p>
<h3><a name="remote-linux">Remote Installation</a></h3>
<p>
The <i>rpm</i> and <i>yum</i> tools used to install Shave And A Haircut
are both command line tools which makes them well suited
to remote installation. Simply copy Shave And A Haircut's
<i>.rpm</i> file to the remote system, or to a network drive visible to the
remote system, then use the <i>rsh</i> command to run <i>rpm</i> or <i>yum</i>
on the remote system.
<p>
The <i>yum</i> command will by default prompt the user for confirmation
before performing the install. To avoid this, use the <i>-y</i> flag. E.g:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    rsh otherhost yum install -y shaveHaircut_Maya2018_0_64-9.0-36.x86_64.rpm
</div>

<p>
<h3><a name="relocate-linux">Relocating Files</a></h3>
<p>
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.
<p>
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.


<h4>Base Plugin And Scripts (required)</h4>
<p>
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, or shader icons, so those
elements of the plugin must be dealt with separately.
<p>
The module definition file for Shave And A Haircut is named
<i>shaveHaircut.mod</i> and is located in Maya's module directory.
For example:
<div style="margin-left:2em;font-family:monospace;font-size:large">
  /usr/autodesk/maya/2018/modules/shaveHaircut.mod
</div>
<p>
By default, the module file will point to the <i>Epic&nbsp;Games/shaveHaircut</i>
tree within that same module directory:
<div style="margin-left:2em;font-family:monospace;font-size:large">
  /usr/autodesk/maya/2018/modules/Epic&nbsp;Games/shaveHaircut
</div>
<p>
Beneath that directory lie four subdirectories, containing the base
plug-ins, scripts, icons and Shave API sample files:
<div style="margin-left:2em;font-family:monospace;font-size:large">
  /usr/autodesk/maya/2018/modules/Epic&nbsp;Games/shaveHaircut/plug-ins
  <br>
  /usr/autodesk/maya/2018/modules/Epic&nbsp;Games/shaveHaircut/scripts
  <br>
  /usr/autodesk/maya/2018/modules/Epic&nbsp;Games/shaveHaircut/icons
  <br>
  /usr/autodesk/maya/2018/modules/Epic&nbsp;Games/shaveHaircut/samples
</div>
<p>
All except the sample files are required for the proper operation of Shave
And A Haircut.
<p>
The easiest way to relocate these files is to move the entire sub-tree, as
a unit, and modify the path in the <i>shaveHaircut.mod</i> file to point to
the new location.
<p>
The <i>shaveHaircut.mod</i> file itself may be relocated to any directory
in the user's <a href="#mayaVars">MAYA_MODULE_PATH</a>.
<p>
Alternatively, the files in the <i>plug-ins</i> subdirectory may be moved
to any directory which is in the user's <a
href="#mayaVars">MAYA_PLUG_IN_PATH</a>, the files in the <i>scripts</i>
subdirectory to any directory in the user's <a
href="#mayaVars">MAYA_SCRIPT_PATH</a>, and the files in the <i>icons</i>
subdirectory to any directory in the user's <a
href="#mayaVars">XBMLANGPATH</a>.  The files in the <i>samples</i>
subdirectory can go wherever you like.


<h4>Base Runtime Library (required)</h4>
<p>
Shave And A Haircut installs a library named <i>libShave.so</i> to
which it must have access at runtime.  By default this file is placed in
Maya's <i>lib</i> directory along with Maya's own runtime libraries.  E.g:
<div style="margin-left:2em;font-family:monospace;font-size:large">
  /usr/autodesk/maya2018/lib/libShave.so
</div>
<p>
You may relocate this library to any directory in the user's
<a href="#mayaVars">LD_LIBRARY_PATH</a>
<p>


<h4>Icons (recommended)</h4>
<p>
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 <i>icons</i> directory. E.g:
<div style="margin-left:2em;font-family:monospace;font-size:large">
	/usr/autodesk/maya2018/icons
</div>
<p>
Icon files whose names begin with either <i>shave</i> or <i>render_shave</i>
are part of the Shave And A Haircut plugin.
<p>
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.
<p>
These files can be relocated to any directory in the user's
<a href="#mayaVars">XBMLANGPATH</a>.
<p>


<h4>Presets (recommended)</h4>
<p>
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.
<p>
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 2018
the default location of the script file for Shave's <i>grass</i> preset
would be:
<div style="margin-left:2em;font-family:monospace;font-size:large">
	/usr/autodesk/maya2018/presets/attrPresets/shaveHair/grass.mel
</div>
<p>
When searching for these built-in presets Shave And A Haircut looks in the
following directories, in the order listed, from top to bottom:
<p>
<ul>
<li>${SHAVE_COMMON_PRESET_PATH}</li>
<li>${SHAVE_LOCATION}/presets/attrPresets/shaveHair</li>
<li>${MAYA_PRESET_PATH}/attrPresets/shaveHair</li>
<li>${MAYA_LOCATION}/presets/attrPresets/shaveHair</li>
</ul>
<p>
The syntax <i>${NAME}</i> refers to the expansion of the environment
variabled named <i>NAME</i>. Note that <i>${MAYA_PRESET_PATH}</i> may
expand to a list of directories in which case each is checked in turn.
<p>


<h4>RenderMan Shaders (optional)</h4>
<p>
Shave provides both Reyes and RIS shaders for currently supported versions
of RenderMan Studio. These are all located in the <i>plug-ins/prman</i> tree
in the Shave installation tree. For example:
<div style="margin-left:2em;font-family:monospace;font-size:large">
  /usr/autodesk/maya/2018/modules/Epic&nbsp;Games/shaveHaircut/plug-ins/prman
</div>
<p>
Shave looks for this directory relative to the location of its
plugin file, <i>shaveNode.so</i>, which normally sits in the
<i>plug-ins</i> directory of the path given above. So if you move
<i>shaveNode.so</i> to a different directory then you must move the
<i>prman</i> tree there as well.


<h4>Shave API Plugins (optional)</h4>
<p>
Third-party plugins developed using the Shave And A Haircut API will
require the presence of the <i>libShaveAPI.so</i> runtime library, which by
default can be found in Maya's own <i>lib</i> directory.  E.g:
<div style="margin-left:2em;font-family:monospace;font-size:large">
  /usr/autodesk/maya2018/lib/libShaveAPI.so
</div>
<p>
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 <a href="#mayaVars">LD_LIBRARY_PATH</a>.
<p>
Note that Shave And A Haircut does not itself use this file.
<p>


<h4>Shave API Development (optional)</h4>
<p>
Developers wishing to create their own plugins which use the Shave And A
Haircut API will need access to the <i>libShaveAPI.so</i> runtime library
described in the previous section, as well as the associated header files,
<i>shaveAPI.h</i> and <i>shaveItHair.h</i>.  By default these files are located
within Maya's own <i>include</i> directory.  E.g:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    /usr/autodesk/maya2018/include/maya/shaveAPI.h
	<br>
    /usr/autodesk/maya2018/include/maya/shaveItHair.h
</div>
<p>
Shave And A Haircut does not itself use this header file, so you may
freely relocate it to any directory.


<hr>
<p>
<h2 align="center"><a name="osx">Installing Shave And A Haircut On OSX</a></h2>

<p>
<h3><a name="before-osx">Before Installation</a></h3>
<p>
Shave And A Haircut for OSX comes as a zipped OSX installation bundle,
with a name ending in <i>.pkg.zip</i>.  E.g:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    shaveHaircut_Maya2018_0.pkg.zip
</div>
<p>
Make sure that the Maya version given in the filename (e.g. '2018_0') matches
the version of Maya for which you are installing Shave And A Haircut (e.g.
'2018').  For the remainder of this document we will assume that you are
installing Shave And A Haircut for Maya 2018.  If not, please remember to
adjust the Maya version numbers in any filenames or commands presented here
to match your version of Maya.
<p>
If any users on the system are currently running Maya, have them exit until
the installation is complete.
<p>
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.

<p>
<h3><a name="install-osx">Installing Shave And A Haircut</a></h3>
<p>
If you downloaded Shave And A Haircut using your web browser, depending
upon its configuration it may have automatically expanded the <i>.zip</i>
file into a <i>.mpkg</i> bundle.  If not, then try double-clicking on the
<i>.zip</i> file to see if that will expand it.  If that doesn't work
either, then open up a Terminal window, use the <i>cd</i> command to change
to whatever directory you downloaded the <i>.zip</i> file to, then use the
<i>unzip</i> command to expand it.  For example, if you downloaded the
<i>.zip</i> file to your desktop, then you would do something like this:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    cd Desktop
	<br>
	unzip shaveHaircut_Maya2018_0.pkg.zip
</div>
<p>
However you get there, you should eventually end up with a bundle ending in
<i>.mpkg</i>.  Unlike the <i>.zip</i> file, the bundle will also contain the
version of Shave in its name (e.g. <i>shaveHaircut_Maya2018_0-9.0v36.mpkg</i>).
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.
<p>
The installer will first display a welcome window. Click on the <b>Continue</b>
button.
<p>
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 <b>Change Install Location</b> button.
<p>
To change where individual components of Shave are installed, click the
<b>Customize</b> button. You will be presented with a window listing each
of Shave's 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:
<p>
<ul>
<li>The <i>mayaFiles</i> component must be installed in the same location as
Maya.</li>
<li>The <i>pluginFiles</i> component must be installed in a location where
Maya will be able to find it. See the section
on <a href="#relocate-osx">Relocating The Plugin Files Component</a> for more
details.</li>
<li>The <i>sampleFiles</i> component is optional and can go anywhere.</li>
</ul>
<p>
Once you're ready to continue with the installation, click on the
<b>Install</b> 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 <b>Close</b> button.

<p>
<h3><a name="load-osx">Loading The Plugin</a></h3>
<p>
To use Shave And A Haircut from within Maya, bring up Maya's <i>Plug-in
Manager</i>, which can be found on the Maya menubar under <i>Window :
Settings/Preferences : Plug-in Manager</i>.
<p>
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:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    /Users/Shared/Autodesk/maya/2018/plug-ins
</div>
<p>
If you installed the component elsewhere then the path in the header will differ
correspondingly.
<p>
Beneath that heading you should see an entry for <i>shaveNode.bundle</i>
with two checkboxes to the right of it, marked <i>Loaded</i> and
<i>Auto load</i>.
<p>
To load Shave And A Haircut, check the <i>Loaded</i> box.  To have Shave
And A Haircut automatically load whenever you start up Maya, also check the
<i>Auto load</i> box.

<p>
<h3><a name="uninstall-osx">Uninstalling Shave And A Haircut</a></h3>
<p>
Unfortunately, OSX's Installer does not support uninstalling
packages, so you must remove the files by hand.
<p>
If you look in your system's <b>/var/db/receipts</b> directory you should
see a <i>.bom</i> file for each of Shave's components. E.g:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    com.epicgames.shave.maya2018_0.mayaFiles.pkg.bom
	<br>
    com.epicgames.shave.maya2018_0.pluginFiles.pkg.bom
	<br>
    com.epicgames.shave.maya2018_0.sampleFiles.pkg.bom
</div>
<p>
From a terminal window you can use the <i>lsbom</i> command to display
the list of files installed for that component. E.g:
<p>
<div style="margin-left:2em;font-family:monospace;font-size:large">
    lsbom /var/db/receipts/com.epicgames.shave.maya2018_0.mayaFiles.pkg.bom
</div>
<p>
All of the files will be listed relative to the directory in which the component
was installed. If you don't remember where you installed a component, there is
a corresponding <i>.plist</i> which contains that information. To view the contents
of the <i>.plist</i> file, bring up the Finder, select <b>Go</b> from the menu,
followed by <b>Go to Folder..</b>, and enter <b>/var/db/receipts</b> into the
window which pops up. When you click on the <i>.plist</i> file in the Finder it should
display the file's contents to the right. Near the top of the file should be a line
for the <i>InstallPrefixPath</i> key. E.g:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    &lt;key&gt;InstallPrefixPath&lt;/key&gt;
</div>
Immediately below that will be a <i>string</i> value containing the path where that
component was installed. E.g:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    &lt;string&gt;Applications/&lt;/string&gt;
</div>
<p>
With these two pieces of information you should be able to locate and delete
all of the files.
<p>

<p>
<h3><a name="remote-osx">Remote Installation</a></h3>
<p>
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:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    shaveHaircut_Maya2018_0-9.0v36.mpkg
</div>
<p>
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.
<p>
The <i>installer</i> 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.
<p>
To install Shave And A Haircut in its default location you would
use a command something like this:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    /usr/sbin/installer -pkg shaveHaircut_Maya2018_0-9.0v36.mpkg -target /
</div>
<p>
The <i>-pkg</i> flag specifies the location of the of the package to be
installed and the <i>-target</i> flag specifies the disk volume where Maya is
installed, which is usually just the system root ('/').
<p>
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 <b>Contents/Packages</b> directory inside the
bundle. In there you will see a separate bundle for each of Shave's
components. E.g:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    shaveHaircut_Maya2018-mayaFiles.pkg
	<br>
    shaveHaircut_Maya2018-pluginFiles.pkg
	<br>
    shaveHaircut_Maya2018-sampleFiles.pkg
</div>
<p>
The <i>installer</i> command can be used to install each component separately.
In doing so you must use the <i>-target</i> flag to provide the full path
for the component. For example, let's say that you have Maya 2018 installed
in <b>/Volumes/Shared/Maya/2018</b>. You will have to provide that path when
installing the 'mayaFiles' component:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    /usr/sbin/installer -pkg shaveHaircut_Maya2018-mayaFiles.pkg -target /Volumes/Shared/Maya/2018
</div>
<p>
When choosing an alternate location for a component, keep the following in
mind:
<p>
<ul>
<li>The <i>mayaFiles</i> component must be installed in the same location as
Maya.</li>
<li>The <i>pluginFiles</i> component must be installed in a location where
Maya will be able to find it. See the section
on <a href="#relocate-osx">Relocating The Plugin Files Component</a> for more
details.</li>
<li>The <i>sampleFiles</i> component is optional and can go anywhere.</li>
</ul>
<p>
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:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    /usr/sbin/installer&nbsp;-pkg&nbsp;shaveHaircut_Maya2018-pluginFiles.pkg&nbsp;-target&nbsp;/Users/Shared/Autodesk/maya/2018
	<br>
    /usr/sbin/installer&nbsp;-pkg&nbsp;shaveHaircut_Maya2018-sampleFiles.pkg&nbsp;-target&nbsp;/Users/Shared/Epic&nbsp;Games/shaveHaircut/maya2018
</div>
<p>

<h3><a name="relocate-osx">Relocating Files</a></h3>
<p>
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.
<p>
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.

<p>
<h4>Base Plugin Files, Scripts and Icons (required)</h4>
<p>
The <i>Plugin Files</i> component contains three subdirectories: <b>icons</b>,
<b>plug-ins</b> and <b>scripts</b>. For proper operation of Shave the <b>icons</b>
directory must be in Maya's <a href="#mayaVars">XBMLANGPATH</a>,
the <b>plug-ins</b> directory must be in Maya's
<a href="#mayaVars">MAYA_PLUG_IN_PATH</a> and the
<b>scripts</b> directory must be in Maya's <a href="#mayaVars">MAYA_SCRIPT_PATH</a>.
<p>
By default the Plugin Files component is installed into Maya's
shared directory (e.g. /Users/Shared/Autodesk/maya/2018) 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.
<p>
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 <b>Maya.env</b> file.
<p>
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:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    + shaveHaircut [shaveVersion] [componentPath]
</div>
<p>
Replace <i>[shaveVersion]</i> with the version of shave you are installing
and replace <i>[componentPath]</i> 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 9.0v36 into <b>/Library/MayaPlugins/shave</b> then the
module file would contain this:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    + shaveHaircut 9.0 /Library/MayaPlugins/shave
</div>
<p>
Place this file in Maya's <b>modules</b> directory
(e.g. /Applications/Autodesk/maya/2018/Maya.app/Contents/modules).
Maya will automatically add the subdirectories
of the path specified in the module file to the correct environment variables.


<h4>Base Runtime Library (required)</h4>
<p>
Shave And A Haircut installs a library named <i>libShave.dylib</i> to
which it must have access at runtime.  This file is installed into
Maya's <i>Maya.app/Contents/MacOS</i> directory along with Maya's own runtime libraries.  E.g:
<div style="margin-left:2em;font-family:monospace;font-size:large">
  /Applications/Autodesk/Maya2018/Maya.app/Contents/MacOS/libShave.dylib
</div>
<p>
This file cannot be relocated.
<p>


<h4>Presets (required)</h4>
<p>
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.
<p>
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
<i>Contents</i> hierarchy of Maya's installation directory.  So for Maya 2018
the default location of the script file for Shave's <i>grass</i> preset
would be:
<div style="margin-left:2em;font-family:monospace;font-size:large">
	/Applications/Autodesk/maya2018/Maya.app/Contents/presets/attrPresets/shaveHair/grass.mel
</div>
<p>
When searching for these built-in presets Shave And A Haircut looks in the
following directories, in the order listed, from top to bottom:
<p>
<ul>
<li>${SHAVE_COMMON_PRESET_PATH}</li>
<li>${SHAVE_LOCATION}/presets/attrPresets/shaveHair</li>
<li>${MAYA_PRESET_PATH}/attrPresets/shaveHair</li>
<li>${MAYA_LOCATION}/presets/attrPresets/shaveHair</li>
</ul>
<p>
The syntax <i>${NAME}</i> refers to the expansion of the environment
variabled named <i>NAME</i>. Note that <i>${MAYA_PRESET_PATH}</i> may
expand to a list of directories in which case each is checked in turn.


<h4>RenderMan Shaders (optional)</h4>
<p>
Shave provides both Reyes and RIS shaders for currently supported versions
of RenderMan Studio. These are all located in the <i>prman</i> tree
in Maya's shared <i>plug-ins</i> directory. For example:
<div style="margin-left:2em;font-family:monospace;font-size:large">
  /Users/Shared/Autodesk/maya/2015/plug-ins/prman
</div>
<p>
Shave looks for this directory relative to the location of its
plugin file, <i>shaveNode.bundle</i>, which normally sits in the
<i>plug-ins</i> directory of the path given above. So if you move
<i>shaveNode.bundle</i> to a different directory then you must move the
<i>prman</i> tree there as well.


<h4>Shave API Plugins (optional)</h4>
<p>
Third-party plugins developed using the Shave And A Haircut API will
require the presence of the <i>libShaveAPI.dylib</i> runtime library, which
is installed into
Maya's <i>Maya.app/Contents/MacOS</i> directory along with Maya's own runtime libraries.  E.g:
<div style="margin-left:2em;font-family:monospace;font-size:large">
  /Applications/Autodesk/Maya2018/Maya.app/Contents/MacOS/libShaveAPI.dylib
</div>
<p>
This file cannot be relocated.
<p>
Note that Shave And A Haircut does not itself use this file.
<p>


<hr>
<p>
<h2 align="center"><a name="windows">Installing Shave And A Haircut On Windows</a></h2>
<p>

<h3><a name="before-windows">Before Installation</a></h3>
<p>
Shave And A Haircut for Windows comes as an executable installer with a
filename something like this:
<div style="margin-left:2em;font-family:monospace;font-size:large">
	shave-9.0v36-Release-Maya2018.exe
</div>
<p>
For the remainder of this document we will assume that you are installing
Shave And A Haircut for Maya 2018.  If not, please remember to adjust
the version numbers in any filenames or commands presented here to match
your version of Maya.
<p>
If any users on the system are currently running Maya, have them exit until
the installation is complete.

<p>
<h3><a name="install-windows">Installing Shave And A Haircut</a></h3>
<p>
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.

<p>
<h3><a name="load-windows">Loading The Plugin</a></h3>
<p>
To use Shave And A Haircut from within Maya, bring up Maya's <i>Plug-in
Manager</i>, which can be found on the Maya menubar under <i>Window :
Settings/Preferences : Plug-in Manager</i>.
<p>
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:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    C:/Program&nbsp;Files/Epic&nbsp;Games/shaveHaircut/maya2018/plug-ins
</div>
<p>
Beneath that heading you should see an entry for the <i>shaveNode.mll</i>
file with two checkboxes to the right of it, marked <i>loaded</i> and
<i>auto load</i>.
<p>
To load Shave And A Haircut, check the <i>loaded</i> box.  To have Shave
And A Haircut automatically load whenever you start up Maya, also check the
<i>auto load</i> box.

<p>
<h3><a name="uninstall-windows">Uninstalling Shave And A Haircut</a></h3>
<p>
There is currently a bug in the uninstaller for Shave And A Haircut:
if you try to uninstall it from the Windows Control Panel you will get
and error message saying "Incorrect command line options specified".
<p>
To work around this problem, re-run the installer and select
"Uninstall Shave And A Haircut for Maya" from the window which
appears.
<p>

<p>
<h3><a name="remote-windows">Remote Installation</a></h3>
<p>
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.
<p>
To access the silent mode, run the executable from the command line and
append the <i>/s</i> flag.  You'll also want to use the <i>/r</i> 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:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    shave-9.0v36-Release-Maya2018.exe /s /r
</div>
<p>
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\Maya2018).  However, if there are no registry
entries and Maya has been installed in a non-standard location, then the
installation will fail.
<p>
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=<path>' syntax.  E.g:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    shave-9.0v36-Release-Maya2018.exe /s /r /var:MayaLocation="D:\Apps\Autodesk\Maya2018"
</div>

<p>
<h3><a name="relocate-windows">Relocating Files</a></h3>
<p>
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.
<p>
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.

<h4>Base Plugin And Scripts (required)</h4>
<p>
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, or shader icons, so those
elements of the plugin must be dealt with separately.
<p>
The module definition file for Shave And A Haircut is named
<i>shaveHaircut.mod</i> and is located in Maya's module folder for the
specific version of Maya for which it was installed.  For example:
<div style="margin-left:2em;font-family:monospace;font-size:large">
  C:\Program&nbsp;Files\Autodesk\Maya2018\modules\shaveHaircut.mod
</div>
<p>
By default, the module file will point to the
<i>Epic&nbsp;Games\shaveHaircut\maya2018</i> folder, located in your system's
<i>Program Files</i> folder:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    C:\Program&nbsp;Files\Epic&nbsp;Games\shaveHaircut\maya2018
</div>
<p>
Within that folder lie sub-folders, containing plug-ins,
scripts, and Shave API sample files:
<div style="margin-left:2em;font-family:monospace;font-size:large">
  C:\Program&nbsp;Files\Epic&nbsp;Games\shaveHaircut\maya2018\plug-ins
  <br>
  C:\Program&nbsp;Files\Epic&nbsp;Games\shaveHaircut\maya2018\scripts
  <br>
  C:\Program&nbsp;Files\Epic&nbsp;Games\shaveHaircut\maya2018\samples
</div>
<p>
All except the sample files are required for the proper operation of Shave
And A Haircut.
<p>
The easiest way to relocate these files is to move the entire sub-tree, as
a unit, and modify the path in the <i>shaveHaircut.mod</i> file to point to
the new location.
<p>
The <i>shaveHaircut.mod</i> file itself may be relocated to any folder in
the user's <a href="#mayaVars">MAYA_MODULE_PATH</a>.
<p>
Alternatively, the files in the <i>plug-ins</i> sub-folder may be moved to
any folder which is in the user's <a href="#mayaVars">MAYA_PLUG_IN_PATH</a>,
and the files in the <i>scripts</i> sub-folder to any folder in the user's <a
href="#mayaVars">MAYA_SCRIPT_PATH</a>.
sub-folder to any folder in the user's <a href="#mayaVars">XBMLANGPATH</a>.
The files in the <i>samples</i> sub-folder can go wherever you like.


<h4>Base Runtime Library (required)</h4>
<p>
Shave And A Haircut installs a library named <i>libShave.dll</i> to
which it must have access at runtime.  By default this file is placed in
Maya's <i>bin</i> folder along with Maya's own runtime libraries. E.g:
<div style="margin-left:2em;font-family:monospace;font-size:large">
  C:\Program&nbsp;Files\Autodesk\Maya2018\bin\libShave.dll
</div>
<p>
You may relocate this library to any folder in the user's
<a href="#mayaVars">PATH</a>
<p>


<h4>Icons (recommended)</h4>
<p>
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
<i>icons</i> folder. E.g:
<div style="margin-left:2em;font-family:monospace;font-size:large">
	C:\Program&nbsp;Files\Autodesk\Maya2018\icons
</div>
<p>
Any files whose names begin with <i>shave</i> or <i>render_shave</i> are
part of the Shave And A Haircut plugin.
<p>
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.
<p>
The icons can be relocated to any directory in the user's
<a href="#mayaVars">XBMLANGPATH</a>.
<p>


<h4>Presets (required)</h4>
<p>
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.
<p>
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 2018 the
default location of the script file for Shave's <i>grass</i> preset would
be:
<div style="margin-left:2em;font-family:monospace;font-size:large">
  C:\Program&nbsp;Files\Autodesk\Maya2018\presets\attrPresets\shaveHair\grass.mel
</div>
<p>
When searching for these built-in presets Shave And A Haircut looks in the
following directories, in the order listed, from top to bottom:
<p>
<ul>
<li>${SHAVE_COMMON_PRESET_PATH}</li>
<li>${SHAVE_LOCATION}\presets\attrPresets\shaveHair</li>
<li>${MAYA_PRESET_PATH}\attrPresets\shaveHair</li>
<li>${MAYA_LOCATION}\presets\attrPresets\shaveHair</li>
</ul>
<p>
The syntax <i>${NAME}</i> refers to the expansion of the environment
variabled named <i>NAME</i>. Note that <i>${MAYA_PRESET_PATH}</i> may
expand to a list of directories in which case each is checked in turn.


<h4>RenderMan Shaders (optional)</h4>
<p>
Shave provides both Reyes and RIS shaders for currently supported versions
of RenderMan Studio. These are all located in the <i>plug-ins\prman</i> tree
in the Shave installation tree. For example:
<div style="margin-left:2em;font-family:monospace;font-size:large">
  C:\Program&nbsp;Files\Epic&nbsp;Games\shaveHaircut\maya2018\plug-ins\prman
</div>
<p>
Shave looks for this directory relative to the location of its
plugin file, <i>shaveNode.dll</i>, which normally sits in the
<i>plug-ins</i> directory of the path given above. So if you move
<i>shaveNode.dll</i> to a different directory then you must move the
<i>prman</i> tree there as well.


<h4>Shave API Plugins (optional)</h4>
<p>
Third-party plugins developed using the Shave And A Haircut API will
require the presence of the <i>libShaveAPI.dll</i> runtime library, which
by default can be found in Maya's own <i>bin</i> folder. E.g:
<div style="margin-left:2em;font-family:monospace;font-size:large">
	C:\Program&nbsp;Files\Autodesk\Maya2018\bin\libShaveAPI.dll
</div>
<p>
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 <a href="#mayaVars">PATH</a>.
<p>
Note that Shave And A Haircut does not itself use this file.
<p>

<h4>Shave API Development (optional)</h4>
<p>
Developers wishing to create their own plugins which use the Shave And A
Haircut API will need access to the <i>libShaveAPI.dll</i> runtime library
described in the previous section, as well as its associated header files,
<i>shaveAPI.h</i> and <i>shaveItHair.h</i>.  By default these header files
are located within Maya's own <i>include</i> folder.  E.g:
<div style="margin-left:2em;font-family:monospace;font-size:large">
    C:\Program&nbsp;Files\Autodesk\Maya2018\include\maya\shaveAPI.h
	<br>
    C:\Program&nbsp;Files\Autodesk\Maya2018\include\maya\shaveItHair.h
</div>
<p>
Shave And A Haircut does not itself use these files so you may
freely relocate them to any folder.

<hr>
<p>
<h2 align="center"><a name="mayaVars">Maya Environment Variables</a></h2>
<p>
If you don't know which directories are pointed to by a given Maya
environment variable, such as <i>MAYA_PLUG_IN_PATH</i>, then start up Maya
and in the Script Editor window use the <i>getenv</i> command on the
variable name. E.g:
<div style="margin-left:2em;font-family:monospace;font-size:large">
getenv MAYA_PLUG_IN_PATH
</div>
<p>
Maya will display a single line containing all of the directories that Maya
will search for, in this case, plug-ins.

</body>
</html>