aboutsummaryrefslogtreecommitdiff
path: root/mayaPlug/shaveNode.h
blob: 7ebf0b5033a078485021566594c49fbdab5c0d83 (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
#ifndef _SHAVENODE_H_
#define _SHAVENODE_H_

// Shave and a Haircut
// (c) 2019 Epic Games
// US Patent 6720962

#include <maya/MDGModifier.h>
#include <maya/MFnMesh.h>
#include <maya/MPxNode.h>
#include <maya/MPlug.h>
#include <maya/MSelectionList.h>

#include "shaveSDK.h"
#include "shaveObjExporter.h"


class shaveNode : public MPxNode
{
public:
	enum HairDisplayMode
	{
		kHairDisplayGuides	= 0,
		kHairDisplayHair	= 1,
		kHairDisplayGeom	= 2
	};

	static void*	creator();
	static MStatus	initialize();

	static MTypeId  		id;
	static const MString	nodeTypeName;
	static const int		kNodeVersion;


	//*******************************************************************
	//
	// Attributes
	//
	//*******************************************************************
private:
	static MObject	blockDynamics;
	static MObject	collisionObjectsAttr;
	static MObject	collisionObjectsGroupIDAttr;
	static MObject	displayHairMaxAttr;
	static MObject	displayHairRatioAttr;
	static MObject	displayNodeAttr;
	static MObject	dspyMode;
	static MObject	growthObjectsGroupIDAttr;

	static MObject	hairColorTexture;
	static MObject		hairColorTextureR;
	static MObject		hairColorTextureG;
	static MObject		hairColorTextureB;

	static MObject	inputCurve;
	static MObject	inputMesh;
	static MObject	inputSurf;
	static MObject	instanceMesh;
	static MObject	instanceMeshChanged;
	static MObject	instancingStatusChanged;
	static MObject	isActive;

	static MObject	mutantHairColorTexture;
	static MObject		mutantHairColorTextureR;
	static MObject		mutantHairColorTextureG;
	static MObject		mutantHairColorTextureB;

	static MObject	neverBeenInstanced;
	static MObject	nodeVersionAttr;
	static MObject	outputMesh;
	static MObject	renderStateAttr;
	static MObject	ribDumper;
	static MObject	ribInsert;
	static MObject	runDynamics;

	static MObject	rootHairColorTexture;
	static MObject		rootHairColorTextureR;
	static MObject		rootHairColorTextureG;
	static MObject		rootHairColorTextureB;

	static MObject	shaveBlindHair;
	static MObject	shaveBlindState;
	static MObject	shaveInfo;
	static MObject	shaveNodeCommand;
	static MObject	shaveParamAmbDiff;			// slider  6
	static MObject	shaveParamAnimSpeed;		// slider 33
	static MObject	shaveParamCollide;
	static MObject	shaveParamCollisionMethod;
	static MObject	shaveParamDampening;		// slider 40
	static MObject	shaveParamDensity;			// slider 28
	static MObject	shaveParamDisplacement;		// slider 43

	static MObject	shaveParamFrizzAnimDir;
	static MObject		shaveParamFrizzAnimDirX;
	static MObject		shaveParamFrizzAnimDirY;
	static MObject		shaveParamFrizzAnimDirZ;

	static MObject	shaveParamFrizzAnim;		// slider 32
	static MObject	shaveParamFrizzFreqX;		// slider  1
	static MObject	shaveParamFrizzFreqY;		// slider 30
	static MObject	shaveParamFrizzFreqZ;		// slider 31
	static MObject	shaveParamFrizzRoot;		// slider  0
	static MObject	shaveParamFrizzTip;			// slider 24
	static MObject	shaveParamGeomShadow;
	static MObject	shaveParamGloss;			// slider  5
	static MObject	shaveParamGravity;

	static MObject	shaveParamHairColor;
	static MObject		shaveParamHairRed;		// slider  9
	static MObject		shaveParamHairGreen;	// slider 10
	static MObject		shaveParamHairBlue;		// slider 11

	static MObject	shaveParamHaircount;
	static MObject	shaveParamHueVariation;		// slider 12
	static MObject	shaveParamInstancingStatus;
	static MObject	shaveParamKinkFreqX;		// slider  3
	static MObject	shaveParamKinkFreqY;		// slider 34
	static MObject	shaveParamKinkFreqZ;		// slider 35
	static MObject	shaveParamKinkRoot;			// slider 38
	static MObject	shaveParamKinkTip;			// slider  2
	static MObject	shaveParamMultStrand;		// slider 25

	static MObject	shaveParamMutantColor;
	static MObject		shaveParamMutantRed;	// slider 13
	static MObject		shaveParamMutantGreen;	// slider 14
	static MObject		shaveParamMutantBlue;	// slider 15

	static MObject	shaveParamMutantPercent;	// slider 16

	static MObject	shaveParamNoInterp;
	static MObject	shaveParamPainted;
	static MObject	shaveParamPasses;
	static MObject	shaveParamRandScale;		// slider 36
	static MObject	shaveParamRandomizeMulti;	// slider 42

	static MObject	shaveParamRootColor;
	static MObject		shaveParamRootRed;		// slider 17
	static MObject		shaveParamRootGreen;	// slider 18
	static MObject		shaveParamRootBlue;		// slider 19

	static MObject	shaveParamRootStiffness;	// slider 21
	static MObject	shaveParamScale;			// slider 41
	static MObject	shaveParamSegs;
	static MObject	shaveParamSelfShadow;		// slider  7
	static MObject	shaveParamSpecular;			// slider  4
	static MObject	shaveParamSplayRoot;		// slider 26
	static MObject	shaveParamSplayTip;			// slider 27
	static MObject  shaveParamMultAsp;			// slider 44 - vlad|05July2010
	static MObject  shaveParamOffset;			// slider 45 - vlad|09July2010
	static MObject  shaveParamAspect;			// slider 46 - vlad|09July2010
	static MObject	shaveParamStiffness;		// slider  8
	static MObject	shaveParamThickRoot;		// slider 20
	static MObject	shaveParamThickTip;			// slider 37
	static MObject	shaveParamTotalGuides;
	static MObject	shaveParamValueVariation;	// slider 39
	static MObject	shaveTexMutantColor;
	static MObject	shaveTextureAttr;
	static MObject	surfTessU;
	static MObject	surfTessV;
	static MObject	textureCacheUpdatedAttr;
	static MObject	timeAttr;
	static MObject	triggerAttr;
	static MObject	overrideGeomShaderAttr;

	static MObject	uvSetAssignmentsAttr;
	static MObject		uvSetNameAttr;
	static MObject		uvSetTexturesAttr;

	//obsolete here
	static MObject	flyawayPerc;
	static MObject	flyawayStren;
	static MObject	messStren;
	
	static MObject clumps;
	static MObject clumpsStren;
	static MObject clumpsColStren;
	static MObject clumpsRotStren;
	static MObject clumpsRotOffset;

	static MObject	versionLockAttr;

private:
	//
	// Deprecated Attributes
	//
	static MObject birthName;			// Removed node version 5 or earlier.
	static MObject closeRibFilename;	// Removed node version 5 or earlier.
	static MObject growthSet;			// Removed node version 5 or earlier.
	static MObject instanceGeoAttr;		// Removed node version 6, Shave 2.0v39
	static MObject nodeNameAttr;		// Removed node version 5 or earlier.
	static MObject openRibFilename;		// Removed node version 5 or earlier.
	static MObject shaveBlindShaveParams;// Removed node version 7, Shave 2.4v29
	static MObject shaveParamThickness;	// Removed node version 5 or earlier.
	static MObject shaveUvSets;			// Removed node version 5 or earlier.
	static MObject signatureAttr;
	static MObject skullSet;			// Removed node version 5 or earlier.
	static MObject sourceType;			// Removed node version 5 or earlier.
};

#endif