[ Pobierz całość w formacie PDF ]
spherePaint.mel and geometryPaint.mel in the following directories:
" (Windows) Drive:\Program Files\Autodesk\Maya2008\scripts\others
" (Linux) mayapath/scripts/others
" (Mac OS X) /Applications/Autodesk/maya2008/Maya.app/Contents/
scripts/others
This procedure should:
" determine a unique integer surface ID for this surface. This ID is passed to
future invocations of SetValueCommand, GetValueCommand and
FinalizeCommand associated with this surface. If your script maintains per
surface information, it is convenient to make this ID an array index, which
can be used to easily access the per surface information.
" determine what sort of information is required by future invocations of
SetValueCommand associated with this surface.
" determine whether to paint on the surface vertices or on an evenly spaced
grid in the surface s parameter space.
All of this information is passed back to Artisan via the $flags variable passed
back from the procedure. This is a string that contains a sequence of flags and
arguments very similar to the flags and arguments that can be passed to
standard MEL procedures. These are the flags that are understood by the Paint
Scripts Tool. Each flag has a short and long version (that is, -short/long) plus
some arguments:
" -id/identifier int
This flag indicates the integer surface ID that is to be used for this surface. If
this flag is not specified, the surface ID for this surface is -1.
" -uv/uvlong string
This flag indicates whether the (U,V) location should be sent to
SetValueCommand. The possible values for this are none, surface or
normalized. The default is none.
" -p/position string
This flag indicates whether the (x,y,z) position should be sent to
SetValueCommand. The possible values for this are none, local or world. The
default is none.
Artisan
29
3 | Painting with MEL scripts and the Paint Scripts Tool
How do I? > Write MEL Scripts for the Paint Scripts Tool
" -n/normal string
This flag indicates whether the (nx,ny,nz) normal should be sent to
SetValueCommand. The possible values for this are none, local or world. The
default is none.
" -g/grid int1 int2
This flag indicates that painting should occur on an evenly spaced grid in
parameter space of size int1 in the surface s U direction and int2 in the
surface s V direction. If this flag isn t specified, painting occurs on an array
defined by the surface s vertices.
" -j/jitter boolean
This flag is only valid in conjunction with the -grid flag. If it is true, the grid
positions are jittered before they are passed to the SetValueCommand. The
default value is false.
" -d/dither boolean
This flag is only valid in conjunction with the -grid flag. If it is true, Artisan
uses a 16x16 dithering matrix to determine whether SetValueCommand
should be called for it.
" -dt/directionType string
This flag indicates whether the (U,V,W) stroke direction should be sent to
SetValueCommand. The possible values for this are none, screenV (a vector
in screen space) or worldV (a vector in world space). The default is none. For
projection painting, both screenV and worldV return a vector in screen space.
The direction option is not supported for reflection painting. The third value
(W) will be invalid if the user has requested direction as screen vector.
" -sp/stampPosition string
This flag indicates whether the (spX, spY, spZ) stamp position should be sent
to SetValueCommand. The possible values for this are none, local or world.
The default is none.
Finalize Command (-fc "FinalizeCommand")
If defined, FinalizeCommand is called once per paintable surface after the end of
every stroke. Define this procedure as follows:
global proc FinalizeCommand(
int $surfaceID
)
{
...
}
... where $surfaceID is the surface identifier assigned to the surface by this
surface s corresponding InitializeCommand.
Artisan
30
3 | Painting with MEL scripts and the Paint Scripts Tool
How do I? > Write MEL Scripts for the Paint Scripts Tool
Set Value Command (-svc "SetValueCommand")
If defined, SetValueCommand is called when Artisan has set the value associated
with a particular "location" on the surface. This procedure is called once per
location. Therefore, if some Artisan painting operation changes the values at 10
locations on a surface, SetArrayAttributeCommand is called 10 times. Define this
procedure as follows:
global proc SetValueCommand(
int $surfaceID,
int $index,
float $value,
//
// The following arguments are only passed if requested by
// InitializeCommand. However this is the order that they
// will be passed in.
//
float $u, // ($u,$v) is UV location on surface
float $v,
float $px, // ($px,$py,$pz) is position on
surface
float $py,
float $pz,
float $nx, // ($nx,$ny,$nz) is surface normal
float $ny,
float $nz
)
{
...
}
... where:
" $surfaceID is the surface identifier assigned to the surface by this surface s
corresponding InitializeCommand
[ Pobierz całość w formacie PDF ]
pobieranie ^ do ÂściÂągnięcia ^ pdf ^ download ^ ebook
Menu
- Home
- Caryca Katarzyna II bez retuszu
- 632. Field Sandra Milioner i tajemnicza nieznajoma
- Gwyneth Jones Castles Made of Sand
- Tworzenie makr w VBA dla Excela 20032007. Ćwiczenia
- Zakładka edukacyjna matematyka gimnazjum geometria
- czas na gielde
- Cykl Gwiezdne Wojny Epizod 5 Imperium kontratakuje Donald F.Glut
- 0919. Gordon Lucy Bracia Rinucci 02 Bilet do Neapolu
- Sarbacker Samadhi The Numinous And Cessative in Indo tibetan Yoga
- CWIHP Bulletin nr 8 9 part 2 US Soviet relations and Soviet intervention in Afghanistan
- zanotowane.pl
- doc.pisz.pl
- pdf.pisz.pl
- adam123.opx.pl
Cytat
Fallite fallentes - okłamujcie kłamiących. Owidiusz
Diligentia comparat divitias - pilność zestawia bogactwa. Cyceron
Daj mi właściwe słowo i odpowiedni akcent, a poruszę świat. Joseph Conrad
I brak precedensu jest precedensem. Stanisław Jerzy Lec (pierw. de Tusch - Letz, 1909-1966)
Ex ante - z przed; zanim; oparte na wcześniejszych założeniach.