127
131
static PyObject *Part_getTargetPsys( BPy_PartSys * self );
128
132
static int Part_setRenderObject( BPy_PartSys * self, PyObject * args );
129
133
static PyObject *Part_getRenderObject( BPy_PartSys * self );
134
static int Part_setRenderMaterialColor( BPy_PartSys * self, PyObject * args );
135
static PyObject *Part_getRenderMaterialColor( BPy_PartSys * self );
136
static int Part_setRenderParents( BPy_PartSys * self, PyObject * args );
137
static PyObject *Part_getRenderParents( BPy_PartSys * self );
138
static int Part_setRenderUnborn( BPy_PartSys * self, PyObject * args );
139
static PyObject *Part_getRenderUnborn( BPy_PartSys * self );
140
static int Part_setRenderDied( BPy_PartSys * self, PyObject * args );
141
static PyObject *Part_getRenderDied( BPy_PartSys * self );
142
static int Part_setRenderMaterialIndex( BPy_PartSys * self, PyObject * args );
143
static PyObject *Part_getRenderMaterialIndex( BPy_PartSys * self );
130
144
static int Part_setStep( BPy_PartSys * self, PyObject * args );
131
145
static PyObject *Part_getStep( BPy_PartSys * self );
132
146
static int Part_setRenderStep( BPy_PartSys * self, PyObject * args );
133
147
static PyObject *Part_getRenderStep( BPy_PartSys * self );
134
148
static PyObject *Part_getDupOb( BPy_PartSys * self );
135
149
static PyObject *Part_getDrawAs( BPy_PartSys * self );
150
static int Part_setPhysType( BPy_PartSys * self, PyObject * args );
151
static PyObject *Part_getPhysType( BPy_PartSys * self );
152
static int Part_setIntegrator( BPy_PartSys * self, PyObject * args );
153
static PyObject *Part_getIntegrator( BPy_PartSys * self );
154
static int Part_setIniVelObject( BPy_PartSys * self, PyObject * args );
155
static PyObject *Part_getIniVelObject( BPy_PartSys * self );
156
static int Part_setIniVelNormal( BPy_PartSys * self, PyObject * args );
157
static PyObject *Part_getIniVelNormal( BPy_PartSys * self );
158
static int Part_setIniVelRandom( BPy_PartSys * self, PyObject * args );
159
static PyObject *Part_getIniVelRandom( BPy_PartSys * self );
160
static int Part_setIniVelTan( BPy_PartSys * self, PyObject * args );
161
static PyObject *Part_getIniVelTan( BPy_PartSys * self );
162
static int Part_setIniVelRot( BPy_PartSys * self, PyObject * args );
163
static PyObject *Part_getIniVelRot( BPy_PartSys * self );
164
static int Part_setIniVelPart( BPy_PartSys * self, PyObject * args );
165
static PyObject *Part_getIniVelPart( BPy_PartSys * self );
166
static int Part_setIniVelReact( BPy_PartSys * self, PyObject * args );
167
static PyObject *Part_getIniVelReact( BPy_PartSys * self );
168
static int Part_setRotDynamic( BPy_PartSys * self, PyObject * args );
169
static PyObject *Part_getRotDynamic( BPy_PartSys * self );
170
static int Part_setRotation( BPy_PartSys * self, PyObject * args );
171
static PyObject *Part_getRotation( BPy_PartSys * self );
172
static int Part_setRotRandom( BPy_PartSys * self, PyObject * args );
173
static PyObject *Part_getRotRandom( BPy_PartSys * self );
174
static int Part_setRotPhase( BPy_PartSys * self, PyObject * args );
175
static PyObject *Part_getRotPhase( BPy_PartSys * self );
176
static int Part_setRotPhaseR( BPy_PartSys * self, PyObject * args );
177
static PyObject *Part_getRotPhaseR( BPy_PartSys * self );
178
static int Part_setRotAngularV( BPy_PartSys * self, PyObject * args );
179
static PyObject *Part_getRotAngularV( BPy_PartSys * self );
180
static int Part_setRotAngularVAm( BPy_PartSys * self, PyObject * args );
181
static PyObject *Part_getRotAngularVAm( BPy_PartSys * self );
182
static int Part_setGlobAccX( BPy_PartSys * self, PyObject * args );
183
static PyObject *Part_getGlobAccX( BPy_PartSys * self );
184
static int Part_setGlobAccY( BPy_PartSys * self, PyObject * args );
185
static PyObject *Part_getGlobAccY( BPy_PartSys * self );
186
static int Part_setGlobAccZ( BPy_PartSys * self, PyObject * args );
187
static PyObject *Part_getGlobAccZ( BPy_PartSys * self );
188
static int Part_setGlobDrag( BPy_PartSys * self, PyObject * args );
189
static PyObject *Part_getGlobDrag( BPy_PartSys * self );
190
static int Part_setGlobBrown( BPy_PartSys * self, PyObject * args );
191
static PyObject *Part_getGlobBrown( BPy_PartSys * self );
192
static int Part_setGlobDamp( BPy_PartSys * self, PyObject * args );
193
static PyObject *Part_getGlobDamp( BPy_PartSys * self );
136
194
static PyObject *Part_GetAge( BPy_PartSys * self, PyObject * args );
195
static int Part_setChildAmount( BPy_PartSys * self, PyObject * args );
196
static PyObject *Part_getChildAmount( BPy_PartSys * self );
197
static int Part_setChildType( BPy_PartSys * self, PyObject * args );
198
static PyObject *Part_getChildType( BPy_PartSys * self );
199
static int Part_setChildRenderAmount( BPy_PartSys * self, PyObject * args );
200
static PyObject *Part_getChildRenderAmount( BPy_PartSys * self );
201
static int Part_setChildRadius( BPy_PartSys * self, PyObject * args );
202
static PyObject *Part_getChildRadius( BPy_PartSys * self );
203
static int Part_setChildRoundness( BPy_PartSys * self, PyObject * args );
204
static PyObject *Part_getChildRoundness( BPy_PartSys * self );
205
static int Part_setChildClumping( BPy_PartSys * self, PyObject * args );
206
static PyObject *Part_getChildClumping( BPy_PartSys * self );
207
static int Part_setChildShape( BPy_PartSys * self, PyObject * args );
208
static PyObject *Part_getChildShape( BPy_PartSys * self );
209
static int Part_setChildSize( BPy_PartSys * self, PyObject * args );
210
static PyObject *Part_getChildSize( BPy_PartSys * self );
211
static int Part_setChildRandom( BPy_PartSys * self, PyObject * args );
212
static PyObject *Part_getChildRandom( BPy_PartSys * self );
213
static int Part_setChildRough1( BPy_PartSys * self, PyObject * args );
214
static PyObject *Part_getChildRough1( BPy_PartSys * self );
215
static int Part_setChildRough1Size( BPy_PartSys * self, PyObject * args );
216
static PyObject *Part_getChildRough1Size( BPy_PartSys * self );
217
static int Part_setChildRough2( BPy_PartSys * self, PyObject * args );
218
static PyObject *Part_getChildRough2( BPy_PartSys * self );
219
static int Part_setChildRough2Size( BPy_PartSys * self, PyObject * args );
220
static PyObject *Part_getChildRough2Size( BPy_PartSys * self );
221
static int Part_setChildRough2Thres( BPy_PartSys * self, PyObject * args );
222
static PyObject *Part_getChildRough2Thres( BPy_PartSys * self );
223
static int Part_setChildRoughE( BPy_PartSys * self, PyObject * args );
224
static PyObject *Part_getChildRoughE( BPy_PartSys * self );
225
static int Part_setChildRoughEShape( BPy_PartSys * self, PyObject * args );
226
static PyObject *Part_getChildRoughEShape( BPy_PartSys * self );
227
static int Part_setChildKink( BPy_PartSys * self, PyObject * args );
228
static PyObject *Part_getChildKink( BPy_PartSys * self );
229
static int Part_setChildKinkAxis( BPy_PartSys * self, PyObject * args );
230
static PyObject *Part_getChildKinkAxis( BPy_PartSys * self );
231
static int Part_setChildKinkFreq( BPy_PartSys * self, PyObject * args );
232
static PyObject *Part_getChildKinkFreq( BPy_PartSys * self );
233
static int Part_setChildKinkShape( BPy_PartSys * self, PyObject * args );
234
static PyObject *Part_getChildKinkShape( BPy_PartSys * self );
235
static int Part_setChildKinkAmp( BPy_PartSys * self, PyObject * args );
236
static PyObject *Part_getChildKinkAmp( BPy_PartSys * self );
237
static int Part_setChildBranch( BPy_PartSys * self, PyObject * args );
238
static PyObject *Part_getChildBranch( BPy_PartSys * self );
239
static int Part_setChildBranchAnim( BPy_PartSys * self, PyObject * args );
240
static PyObject *Part_getChildBranchAnim( BPy_PartSys * self );
241
static int Part_setChildBranchSymm( BPy_PartSys * self, PyObject * args );
242
static PyObject *Part_getChildBranchSymm( BPy_PartSys * self );
243
static int Part_setChildBranchThre( BPy_PartSys * self, PyObject * args );
244
static PyObject *Part_getChildBranchThre( BPy_PartSys * self );
138
246
/*****************************************************************************/
139
247
/* Python Effect_Type callback function prototypes: */
316
450
(getter)Part_getDrawAs, NULL,
317
451
"Get draw type Particle.DRAWAS([ 'NONE' | 'OBJECT' | 'POINT' | ... ] )",
453
/* Newtonian Physics */
455
(getter)Part_getPhysType, (setter)Part_setPhysType,
456
"Select particle physics type Particle.PHYSICS([ 'BOIDS' | 'KEYED' | 'NEWTONIAN' | 'NONE' ])",
459
(getter)Part_getIntegrator, (setter)Part_setIntegrator,
460
"Select physics integrator type Particle.INTEGRATOR([ 'RK4' | 'MIDPOINT' | 'EULER' ])",
463
(getter)Part_getIniVelObject, (setter)Part_setIniVelObject,
464
"Let the object give the particle a starting speed",
467
(getter)Part_getIniVelNormal, (setter)Part_setIniVelNormal,
468
"Let the surface normal give the particle a starting speed",
471
(getter)Part_getIniVelRandom, (setter)Part_setIniVelRandom,
472
"Give the starting speed a random variation",
475
(getter)Part_getIniVelTan, (setter)Part_setIniVelTan,
476
"Let the surface tangent give the particle a starting speed",
479
(getter)Part_getIniVelRot, (setter)Part_setIniVelRot,
480
"Rotate the surface tangent",
483
(getter)Part_getIniVelPart, (setter)Part_setIniVelPart,
484
"Let the target particle give the particle a starting speed",
487
(getter)Part_getIniVelReact, (setter)Part_setIniVelReact,
488
"Let the vector away from the target particles location give the particle a starting speed",
491
(getter)Part_getRotation, (setter)Part_setRotation,
492
"Particles initial rotation Particle.ROTATION([ 'OBZ' | 'OBY' | 'OBX' | 'GLZ' | 'GLY' | 'GLX' | 'VEL' | 'NOR' | 'NONE' ])",
495
(getter)Part_getRotDynamic, (setter)Part_setRotDynamic,
496
"Sets rotation to dynamic/constant",
499
(getter)Part_getRotRandom, (setter)Part_setRotRandom,
500
"Randomize rotation",
503
(getter)Part_getRotPhase, (setter)Part_setRotPhase,
504
"Initial rotation phase",
507
(getter)Part_getRotPhaseR, (setter)Part_setRotPhaseR,
508
"Randomize rotation phase",
511
(getter)Part_getRotAngularV, (setter)Part_setRotAngularV,
512
"Select particle angular velocity mode Particle.ANGULARV([ 'RANDOM' | 'SPIN' | 'NONE' ])",
515
(getter)Part_getRotAngularVAm, (setter)Part_setRotAngularVAm,
516
"Angular velocity amount",
519
(getter)Part_getGlobAccX, (setter)Part_setGlobAccX,
520
"Specify a constant acceleration along the X-axis",
523
(getter)Part_getGlobAccY, (setter)Part_setGlobAccY,
524
"Specify a constant acceleration along the Y-axis",
527
(getter)Part_getGlobAccZ, (setter)Part_setGlobAccZ,
528
"Specify a constant acceleration along the Z-axis",
531
(getter)Part_getGlobDrag, (setter)Part_setGlobDrag,
532
"Specify the amount of air-drag",
535
(getter)Part_getGlobBrown, (setter)Part_setGlobBrown,
536
"Specify the amount of brownian motion",
539
(getter)Part_getGlobDamp, (setter)Part_setGlobDamp,
540
"Specify the amount of damping",
544
(getter)Part_getChildAmount, (setter)Part_setChildAmount,
545
"The total number of children",
548
(getter)Part_getChildType, (setter)Part_setChildType,
549
"Type of childrens ( Particle.CHILDTYPE[ 'FACES' | 'PARTICLES' | 'NONE' ] )",
551
{"childRenderAmount",
552
(getter)Part_getChildRenderAmount, (setter)Part_setChildRenderAmount,
553
"Amount of children/parent for rendering",
556
(getter)Part_getChildRadius, (setter)Part_setChildRadius,
557
"Radius of children around parent",
560
(getter)Part_getChildRoundness, (setter)Part_setChildRoundness,
561
"Roundness of children around parent",
564
(getter)Part_getChildClumping, (setter)Part_setChildClumping,
565
"Amount of clumpimg",
568
(getter)Part_getChildShape, (setter)Part_setChildShape,
572
(getter)Part_getChildSize, (setter)Part_setChildSize,
573
"A multiplier for the child particle size",
576
(getter)Part_getChildRandom, (setter)Part_setChildRandom,
577
"Random variation to the size of the child particles",
580
(getter)Part_getChildRough1, (setter)Part_setChildRough1,
581
"Amount of location dependant rough",
584
(getter)Part_getChildRough1Size, (setter)Part_setChildRough1Size,
585
"Size of location dependant rough",
588
(getter)Part_getChildRough2, (setter)Part_setChildRough2,
589
"Amount of random rough",
592
(getter)Part_getChildRough2Size, (setter)Part_setChildRough2Size,
593
"Size of random rough",
595
{"childRough2Thresh",
596
(getter)Part_getChildRough2Thres, (setter)Part_setChildRough2Thres,
597
"Amount of particles left untouched by random rough",
600
(getter)Part_getChildRoughE, (setter)Part_setChildRoughE,
601
"Amount of end point rough",
604
(getter)Part_getChildRoughEShape, (setter)Part_setChildRoughEShape,
605
"Shape of end point rough",
608
(getter)Part_getChildKink, (setter)Part_setChildKink,
609
"Type of periodic offset on the path (Particle.CHILDKINK[ 'BRAID' | 'WAVE' | 'RADIAL' | 'CURL' | 'NOTHING' ])",
612
(getter)Part_getChildKinkAxis, (setter)Part_setChildKinkAxis,
613
"Which axis to use for offset (Particle.CHILDKINKAXIS[ 'Z' | 'Y' | 'X' ])",
616
(getter)Part_getChildKinkFreq, (setter)Part_setChildKinkFreq,
617
"The frequency of the offset (1/total length)",
620
(getter)Part_getChildKinkShape, (setter)Part_setChildKinkShape,
621
"Adjust the offset to the beginning/end",
624
(getter)Part_getChildKinkAmp, (setter)Part_setChildKinkAmp,
625
"The amplitude of the offset",
628
(getter)Part_getChildBranch, (setter)Part_setChildBranch,
629
"Branch child paths from eachother",
632
(getter)Part_getChildBranchAnim, (setter)Part_setChildBranchAnim,
636
(getter)Part_getChildBranchSymm, (setter)Part_setChildBranchSymm,
637
"Start and end points are the same",
640
(getter)Part_getChildBranchThre, (setter)Part_setChildBranchThre,
641
"Threshold of branching",
319
643
{NULL,NULL,NULL,NULL,NULL} /* Sentinel */
1035
/* create the Blender.Particle.Physics constant dict */
1037
static PyObject *Particle_PhysicsDict( void )
1039
PyObject *Physics = PyConstant_New( );
1042
BPy_constant *c = ( BPy_constant * ) Physics;
1044
PyConstant_Insert( c, "BOIDS",
1045
PyInt_FromLong( 3 ) );
1046
PyConstant_Insert( c, "KEYED",
1047
PyInt_FromLong( 2 ) );
1048
PyConstant_Insert( c, "NEWTONIAN",
1049
PyInt_FromLong( 1 ) );
1050
PyConstant_Insert( c, "NONE",
1051
PyInt_FromLong( 0 ) );
1056
/* create the Blender.Particle.Integrator constant dict */
1058
static PyObject *Particle_IntegratorDict( void )
1060
PyObject *Integrator = PyConstant_New( );
1063
BPy_constant *c = ( BPy_constant * ) Integrator;
1065
PyConstant_Insert( c, "EULER",
1066
PyInt_FromLong( 2 ) );
1067
PyConstant_Insert( c, "MIDPOINT",
1068
PyInt_FromLong( 1 ) );
1069
PyConstant_Insert( c, "EULER",
1070
PyInt_FromLong( 0 ) );
1075
/* create the Blender.Particle.Rotation constant dict */
1077
static PyObject *Particle_RotationDict( void )
1079
PyObject *Rotation = PyConstant_New( );
1082
BPy_constant *c = ( BPy_constant * ) Rotation;
1084
PyConstant_Insert( c, "OBZ",
1085
PyInt_FromLong( 8 ) );
1086
PyConstant_Insert( c, "OBY",
1087
PyInt_FromLong( 7 ) );
1088
PyConstant_Insert( c, "OBX",
1089
PyInt_FromLong( 6 ) );
1090
PyConstant_Insert( c, "GLZ",
1091
PyInt_FromLong( 5 ) );
1092
PyConstant_Insert( c, "GLY",
1093
PyInt_FromLong( 4 ) );
1094
PyConstant_Insert( c, "GLX",
1095
PyInt_FromLong( 3 ) );
1096
PyConstant_Insert( c, "VEL",
1097
PyInt_FromLong( 2 ) );
1098
PyConstant_Insert( c, "NOR",
1099
PyInt_FromLong( 1 ) );
1100
PyConstant_Insert( c, "NONE",
1101
PyInt_FromLong( 0 ) );
1106
/* create the Blender.Particle.AngularV constant dict */
1108
static PyObject *Particle_AngularVDict( void )
1110
PyObject *AngularV = PyConstant_New( );
1113
BPy_constant *c = ( BPy_constant * ) AngularV;
1115
PyConstant_Insert( c, "RANDOM",
1116
PyInt_FromLong( 2 ) );
1117
PyConstant_Insert( c, "SPIN",
1118
PyInt_FromLong( 1 ) );
1119
PyConstant_Insert( c, "NONE",
1120
PyInt_FromLong( 0 ) );
1125
/* create the Blender.Particle.ChildType constant dict */
1127
static PyObject *Particle_ChildTypeDict( void )
1129
PyObject *ChildTypes = PyConstant_New( );
1132
BPy_constant *c = ( BPy_constant * ) ChildTypes;
1134
PyConstant_Insert( c, "FACES",
1135
PyInt_FromLong( 2 ) );
1136
PyConstant_Insert( c, "PARTICLES",
1137
PyInt_FromLong( 1 ) );
1138
PyConstant_Insert( c, "NONE",
1139
PyInt_FromLong( 0 ) );
1144
/* create the Blender.Particle.VertexGroups constant dict */
1146
static PyObject *Particle_VertexGroupsDict( void )
1148
PyObject *VertexGroups = PyConstant_New( );
1150
if( VertexGroups ) {
1151
BPy_constant *c = ( BPy_constant * ) VertexGroups;
1153
PyConstant_Insert( c, "EFFECTOR",
1154
PyInt_FromLong( 11 ) );
1155
PyConstant_Insert( c, "TANROT",
1156
PyInt_FromLong( 10 ) );
1157
PyConstant_Insert( c, "TANVEL",
1158
PyInt_FromLong( 9 ) );
1159
PyConstant_Insert( c, "SIZE",
1160
PyInt_FromLong( 8 ) );
1161
PyConstant_Insert( c, "ROUGHE",
1162
PyInt_FromLong( 7 ) );
1163
PyConstant_Insert( c, "ROUGH2",
1164
PyInt_FromLong( 6 ) );
1165
PyConstant_Insert( c, "ROUGH1",
1166
PyInt_FromLong( 5 ) );
1167
PyConstant_Insert( c, "KINK",
1168
PyInt_FromLong( 4 ) );
1169
PyConstant_Insert( c, "CLUMP",
1170
PyInt_FromLong( 3 ) );
1171
PyConstant_Insert( c, "LENGHT",
1172
PyInt_FromLong( 2 ) );
1173
PyConstant_Insert( c, "VELOCITY",
1174
PyInt_FromLong( 1 ) );
1175
PyConstant_Insert( c, "DENSITY",
1176
PyInt_FromLong( 0 ) );
1178
return VertexGroups;
1182
/* create the Blender.Particle.ChildKink constant dict */
1184
static PyObject *Particle_ChildKinkDict( void )
1186
PyObject *ChildKinks = PyConstant_New( );
1189
BPy_constant *c = ( BPy_constant * ) ChildKinks;
1191
PyConstant_Insert( c, "BRAID",
1192
PyInt_FromLong( 4 ) );
1193
PyConstant_Insert( c, "WAVE",
1194
PyInt_FromLong( 3 ) );
1195
PyConstant_Insert( c, "RADIAL",
1196
PyInt_FromLong( 2 ) );
1197
PyConstant_Insert( c, "CURL",
1198
PyInt_FromLong( 1 ) );
1199
PyConstant_Insert( c, "NOTHING",
1200
PyInt_FromLong( 0 ) );
1205
/* create the Blender.Particle.ChildKinkAxis constant dict */
1207
static PyObject *Particle_ChildKinkAxisDict( void )
1209
PyObject *ChildKinkAxes = PyConstant_New( );
1211
if( ChildKinkAxes ) {
1212
BPy_constant *c = ( BPy_constant * ) ChildKinkAxes;
1214
PyConstant_Insert( c, "Z",
1215
PyInt_FromLong( 2 ) );
1216
PyConstant_Insert( c, "Y",
1217
PyInt_FromLong( 1 ) );
1218
PyConstant_Insert( c, "X",
1219
PyInt_FromLong( 0 ) );
1221
return ChildKinkAxes;
713
1224
static PyObject *Particle_DrawAs( void )
715
1226
PyObject *DrawAs = PyConstant_New( );
2011
2767
return PyInt_FromLong( (long)( self->psys->part->draw_as ) );
2770
static int Part_setPhysType( BPy_PartSys * self, PyObject * args )
2772
int res = EXPP_setIValueRange( args, &self->psys->part->phystype,
2775
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
2780
static PyObject *Part_getPhysType( BPy_PartSys * self )
2782
return PyInt_FromLong( (short)( self->psys->part->phystype ) );
2785
static int Part_setIntegrator( BPy_PartSys * self, PyObject * args )
2787
int res = EXPP_setIValueRange( args, &self->psys->part->integrator,
2790
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
2795
static PyObject *Part_getIntegrator( BPy_PartSys * self )
2797
return PyInt_FromLong( (short)( self->psys->part->integrator ) );
2800
static int Part_setIniVelObject( BPy_PartSys * self, PyObject * args )
2802
int res = EXPP_setFloatRange( args, &self->psys->part->obfac,
2805
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
2810
static PyObject *Part_getIniVelObject( BPy_PartSys * self )
2812
return PyFloat_FromDouble( ((float)( self->psys->part->obfac )) );
2815
static int Part_setIniVelNormal( BPy_PartSys * self, PyObject * args )
2817
int res = EXPP_setFloatRange( args, &self->psys->part->normfac,
2820
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
2825
static PyObject *Part_getIniVelNormal( BPy_PartSys * self )
2827
return PyFloat_FromDouble( ((float)( self->psys->part->normfac )) );
2830
static int Part_setIniVelRandom( BPy_PartSys * self, PyObject * args )
2832
int res = EXPP_setFloatRange( args, &self->psys->part->randfac,
2835
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
2840
static PyObject *Part_getIniVelRandom( BPy_PartSys * self )
2842
return PyFloat_FromDouble( ((float)( self->psys->part->randfac )) );
2845
static int Part_setIniVelTan( BPy_PartSys * self, PyObject * args )
2847
int res = EXPP_setFloatRange( args, &self->psys->part->tanfac,
2850
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
2855
static PyObject *Part_getIniVelTan( BPy_PartSys * self )
2857
return PyFloat_FromDouble( ((float)( self->psys->part->tanfac )) );
2860
static int Part_setIniVelRot( BPy_PartSys * self, PyObject * args )
2862
int res = EXPP_setFloatRange( args, &self->psys->part->tanphase,
2865
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
2870
static PyObject *Part_getIniVelRot( BPy_PartSys * self )
2872
return PyFloat_FromDouble( ((float)( self->psys->part->tanphase )) );
2875
static int Part_setIniVelPart( BPy_PartSys * self, PyObject * args )
2877
int res = EXPP_setFloatRange( args, &self->psys->part->partfac,
2880
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
2885
static PyObject *Part_getIniVelPart( BPy_PartSys * self )
2887
return PyFloat_FromDouble( ((float)( self->psys->part->partfac )) );
2890
static int Part_setIniVelReact( BPy_PartSys * self, PyObject * args )
2892
int res = EXPP_setFloatRange( args, &self->psys->part->reactfac,
2895
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
2900
static PyObject *Part_getIniVelReact( BPy_PartSys * self )
2902
return PyFloat_FromDouble( ((float)( self->psys->part->reactfac )) );
2905
static int Part_setRotation( BPy_PartSys * self, PyObject * args )
2907
int res = EXPP_setIValueRange( args, &self->psys->part->rotmode,
2910
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
2915
static PyObject *Part_getRotation( BPy_PartSys * self )
2917
return PyInt_FromLong( (short)( self->psys->part->rotmode ) );
2920
static int Part_setRotDynamic( BPy_PartSys * self, PyObject * args )
2924
if( !PyInt_Check( args ) )
2925
return EXPP_ReturnIntError( PyExc_TypeError, "expected int argument" );
2927
number = PyInt_AS_LONG( args );
2930
self->psys->part->flag |= PART_ROT_DYN;
2932
self->psys->part->flag &= ~PART_ROT_DYN;
2935
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
2940
static PyObject *Part_getRotDynamic( BPy_PartSys * self )
2942
return PyInt_FromLong( ((long)( self->psys->part->flag & PART_ROT_DYN )) > 0 );
2945
static int Part_setRotRandom( BPy_PartSys * self, PyObject * args )
2947
int res = EXPP_setFloatRange( args, &self->psys->part->randrotfac,
2950
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
2955
static PyObject *Part_getRotRandom( BPy_PartSys * self )
2957
return PyFloat_FromDouble( ((float)( self->psys->part->randrotfac )) );
2960
static int Part_setRotPhase( BPy_PartSys * self, PyObject * args )
2962
int res = EXPP_setFloatRange( args, &self->psys->part->phasefac,
2965
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
2970
static PyObject *Part_getRotPhase( BPy_PartSys * self )
2972
return PyFloat_FromDouble( ((float)( self->psys->part->phasefac )) );
2975
static int Part_setRotPhaseR( BPy_PartSys * self, PyObject * args )
2977
int res = EXPP_setFloatRange( args, &self->psys->part->randphasefac,
2980
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
2985
static PyObject *Part_getRotPhaseR( BPy_PartSys * self )
2987
return PyFloat_FromDouble( ((float)( self->psys->part->randphasefac )) );
2990
static int Part_setRotAngularV( BPy_PartSys * self, PyObject * args )
2992
int res = EXPP_setIValueRange( args, &self->psys->part->avemode,
2995
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3000
static PyObject *Part_getRotAngularV( BPy_PartSys * self )
3002
return PyInt_FromLong( ((int)( self->psys->part->avemode )) );
3005
static int Part_setRotAngularVAm( BPy_PartSys * self, PyObject * args )
3007
int res = EXPP_setFloatRange( args, &self->psys->part->avefac,
3010
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3015
static PyObject *Part_getRotAngularVAm( BPy_PartSys * self )
3017
return PyFloat_FromDouble( ((float)( self->psys->part->avefac )) );
3020
static int Part_setGlobAccX( BPy_PartSys * self, PyObject * args )
3022
int res = EXPP_setFloatRange( args, &self->psys->part->acc[0],
3025
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3030
static PyObject *Part_getGlobAccX( BPy_PartSys * self )
3032
return PyFloat_FromDouble( ((float)( self->psys->part->acc[0] )) );
3035
static int Part_setGlobAccY( BPy_PartSys * self, PyObject * args )
3037
int res = EXPP_setFloatRange( args, &self->psys->part->acc[1],
3040
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3045
static PyObject *Part_getGlobAccY( BPy_PartSys * self )
3047
return PyFloat_FromDouble( ((float)( self->psys->part->acc[1] )) );
3050
static int Part_setGlobAccZ( BPy_PartSys * self, PyObject * args )
3052
int res = EXPP_setFloatRange( args, &self->psys->part->acc[2],
3055
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3060
static PyObject *Part_getGlobAccZ( BPy_PartSys * self )
3062
return PyFloat_FromDouble( ((float)( self->psys->part->acc[2] )) );
3065
static int Part_setGlobDrag( BPy_PartSys * self, PyObject * args )
3067
int res = EXPP_setFloatRange( args, &self->psys->part->dragfac,
3070
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3075
static PyObject *Part_getGlobDrag( BPy_PartSys * self )
3077
return PyFloat_FromDouble( ((float)( self->psys->part->dragfac )) );
3080
static int Part_setGlobBrown( BPy_PartSys * self, PyObject * args )
3082
int res = EXPP_setFloatRange( args, &self->psys->part->brownfac,
3085
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3090
static PyObject *Part_getGlobBrown( BPy_PartSys * self )
3092
return PyFloat_FromDouble( ((float)( self->psys->part->brownfac )) );
3095
static int Part_setGlobDamp( BPy_PartSys * self, PyObject * args )
3097
int res = EXPP_setFloatRange( args, &self->psys->part->dampfac,
3100
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3105
static PyObject *Part_getGlobDamp( BPy_PartSys * self )
3107
return PyFloat_FromDouble( ((float)( self->psys->part->dampfac )) );
3110
static int Part_setChildAmount( BPy_PartSys * self, PyObject * args )
3112
int res = EXPP_setIValueRange( args, &self->psys->part->child_nbr,
3113
0, MAX_PART_CHILDREN, 'i' );
3115
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3120
static PyObject *Part_getChildAmount( BPy_PartSys * self )
3122
return PyInt_FromLong( ((int)( self->psys->part->child_nbr )) );
3125
static int Part_setChildType( BPy_PartSys * self, PyObject * args )
3127
int res = EXPP_setIValueRange( args, &self->psys->part->childtype,
3130
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3135
static PyObject *Part_getChildType( BPy_PartSys * self )
3137
return PyInt_FromLong( (short)( self->psys->part->childtype ) );
3140
static int Part_setChildRenderAmount( BPy_PartSys * self, PyObject * args )
3142
int res = EXPP_setIValueRange( args, &self->psys->part->ren_child_nbr,
3143
0, MAX_PART_CHILDREN, 'i' );
3145
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3150
static PyObject *Part_getChildRenderAmount( BPy_PartSys * self )
3152
return PyInt_FromLong( ((int)( self->psys->part->ren_child_nbr )) );
3155
static int Part_setChildRadius( BPy_PartSys * self, PyObject * args )
3157
int res = EXPP_setFloatRange( args, &self->psys->part->childrad,
3160
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3165
static PyObject *Part_getChildRadius( BPy_PartSys * self )
3167
return PyFloat_FromDouble( ((float)( self->psys->part->childrad )) );
3170
static int Part_setChildRoundness( BPy_PartSys * self, PyObject * args )
3172
int res = EXPP_setFloatRange( args, &self->psys->part->childflat,
3175
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3180
static PyObject *Part_getChildRoundness( BPy_PartSys * self )
3182
return PyFloat_FromDouble( ((float)( self->psys->part->childflat )) );
3185
static int Part_setChildClumping( BPy_PartSys * self, PyObject * args )
3187
int res = EXPP_setFloatRange( args, &self->psys->part->clumpfac,
3190
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3195
static PyObject *Part_getChildClumping( BPy_PartSys * self )
3197
return PyFloat_FromDouble( ((float)( self->psys->part->clumpfac )) );
3200
static int Part_setChildShape( BPy_PartSys * self, PyObject * args )
3202
int res = EXPP_setFloatRange( args, &self->psys->part->clumppow,
3205
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3210
static PyObject *Part_getChildShape( BPy_PartSys * self )
3212
return PyFloat_FromDouble( ((float)( self->psys->part->clumppow )) );
3215
static int Part_setChildSize( BPy_PartSys * self, PyObject * args )
3217
int res = EXPP_setFloatRange( args, &self->psys->part->childsize,
3220
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3225
static PyObject *Part_getChildSize( BPy_PartSys * self )
3227
return PyFloat_FromDouble( ((float)( self->psys->part->childsize )) );
3230
static int Part_setChildRandom( BPy_PartSys * self, PyObject * args )
3232
int res = EXPP_setFloatRange( args, &self->psys->part->childrandsize,
3235
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3240
static PyObject *Part_getChildRandom( BPy_PartSys * self )
3242
return PyFloat_FromDouble( ((float)( self->psys->part->childrandsize )) );
3245
static int Part_setChildRough1( BPy_PartSys * self, PyObject * args )
3247
int res = EXPP_setFloatRange( args, &self->psys->part->rough1,
3250
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3255
static PyObject *Part_getChildRough1( BPy_PartSys * self )
3257
return PyFloat_FromDouble( ((float)( self->psys->part->rough1 )) );
3260
static int Part_setChildRough1Size( BPy_PartSys * self, PyObject * args )
3262
int res = EXPP_setFloatRange( args, &self->psys->part->rough1_size,
3265
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3270
static PyObject *Part_getChildRough1Size( BPy_PartSys * self )
3272
return PyFloat_FromDouble( ((float)( self->psys->part->rough1_size )) );
3275
static int Part_setChildRough2( BPy_PartSys * self, PyObject * args )
3277
int res = EXPP_setFloatRange( args, &self->psys->part->rough2,
3280
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3285
static PyObject *Part_getChildRough2( BPy_PartSys * self )
3287
return PyFloat_FromDouble( ((float)( self->psys->part->rough2 )) );
3290
static int Part_setChildRough2Size( BPy_PartSys * self, PyObject * args )
3292
int res = EXPP_setFloatRange( args, &self->psys->part->rough2_size,
3295
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3300
static PyObject *Part_getChildRough2Size( BPy_PartSys * self )
3302
return PyFloat_FromDouble( ((float)( self->psys->part->rough2_size )) );
3305
static int Part_setChildRough2Thres( BPy_PartSys * self, PyObject * args )
3307
int res = EXPP_setFloatRange( args, &self->psys->part->rough2_thres,
3310
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3315
static PyObject *Part_getChildRough2Thres( BPy_PartSys * self )
3317
return PyFloat_FromDouble( ((float)( self->psys->part->rough2_thres )) );
3320
static int Part_setChildRoughE( BPy_PartSys * self, PyObject * args )
3322
int res = EXPP_setFloatRange( args, &self->psys->part->rough_end,
3325
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3330
static PyObject *Part_getChildRoughE( BPy_PartSys * self )
3332
return PyFloat_FromDouble( ((float)( self->psys->part->rough_end )) );
3335
static int Part_setChildRoughEShape( BPy_PartSys * self, PyObject * args )
3337
int res = EXPP_setFloatRange( args, &self->psys->part->rough_end_shape,
3340
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3345
static PyObject *Part_getChildRoughEShape( BPy_PartSys * self )
3347
return PyFloat_FromDouble( ((float)( self->psys->part->rough_end_shape )) );
3350
static int Part_setChildKink( BPy_PartSys * self, PyObject * args )
3352
int res = EXPP_setIValueRange( args, &self->psys->part->kink,
3355
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3360
static PyObject *Part_getChildKink( BPy_PartSys * self )
3362
return PyInt_FromLong( (short)( self->psys->part->kink ) );
3365
static int Part_setChildKinkAxis( BPy_PartSys * self, PyObject * args )
3367
int res = EXPP_setIValueRange( args, &self->psys->part->kink_axis,
3370
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3375
static PyObject *Part_getChildKinkAxis( BPy_PartSys * self )
3377
return PyInt_FromLong( (short)( self->psys->part->kink_axis ) );
3380
static int Part_setChildKinkFreq( BPy_PartSys * self, PyObject * args )
3382
int res = EXPP_setFloatRange( args, &self->psys->part->kink_freq,
3385
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3390
static PyObject *Part_getChildKinkFreq( BPy_PartSys * self )
3392
return PyFloat_FromDouble( ((float)( self->psys->part->kink_freq )) );
3395
static int Part_setChildKinkShape( BPy_PartSys * self, PyObject * args )
3397
int res = EXPP_setFloatRange( args, &self->psys->part->kink_shape,
3400
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3405
static PyObject *Part_getChildKinkShape( BPy_PartSys * self )
3407
return PyFloat_FromDouble( ((float)( self->psys->part->kink_shape )) );
3410
static int Part_setChildKinkAmp( BPy_PartSys * self, PyObject * args )
3412
int res = EXPP_setFloatRange( args, &self->psys->part->kink_amp,
3415
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3420
static PyObject *Part_getChildKinkAmp( BPy_PartSys * self )
3422
return PyFloat_FromDouble( ((float)( self->psys->part->kink_amp )) );
3425
static int Part_setChildBranch( BPy_PartSys * self, PyObject * args )
3429
if( !PyInt_Check( args ) )
3430
return EXPP_ReturnIntError( PyExc_TypeError, "expected int argument" );
3432
number = PyInt_AS_LONG( args );
3435
self->psys->part->flag |= PART_BRANCHING;
3437
self->psys->part->flag &= ~PART_BRANCHING;
3440
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3445
static PyObject *Part_getChildBranch( BPy_PartSys * self )
3447
return PyInt_FromLong( ((long)( self->psys->part->flag & PART_BRANCHING )) > 0 );
3450
static int Part_setChildBranchAnim( BPy_PartSys * self, PyObject * args )
3454
if( !PyInt_Check( args ) )
3455
return EXPP_ReturnIntError( PyExc_TypeError, "expected int argument" );
3457
number = PyInt_AS_LONG( args );
3460
self->psys->part->flag |= PART_ANIM_BRANCHING;
3462
self->psys->part->flag &= ~PART_ANIM_BRANCHING;
3465
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3470
static PyObject *Part_getChildBranchAnim( BPy_PartSys * self )
3472
return PyInt_FromLong( ((long)( self->psys->part->flag & PART_ANIM_BRANCHING )) > 0 );
3475
static int Part_setChildBranchSymm( BPy_PartSys * self, PyObject * args )
3479
if( !PyInt_Check( args ) )
3480
return EXPP_ReturnIntError( PyExc_TypeError, "expected int argument" );
3482
number = PyInt_AS_LONG( args );
3485
self->psys->part->flag |= PART_SYMM_BRANCHING;
3487
self->psys->part->flag &= ~PART_SYMM_BRANCHING;
3490
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3495
static PyObject *Part_getChildBranchSymm( BPy_PartSys * self )
3497
return PyInt_FromLong( ((long)( self->psys->part->flag & PART_SYMM_BRANCHING )) > 0 );
3500
static int Part_setChildBranchThre( BPy_PartSys * self, PyObject * args )
3502
int res = EXPP_setFloatRange( args, &self->psys->part->branch_thres,
3505
psys_flush_settings( self->psys->part, PSYS_ALLOC, 1 );
3510
static PyObject *Part_getChildBranchThre( BPy_PartSys * self )
3512
return PyFloat_FromDouble( ((float)( self->psys->part->branch_thres )) );