~ubuntu-branches/ubuntu/lucid/blender/lucid

« back to all changes in this revision

Viewing changes to source/blender/python/api2_2x/doc/Particle.py

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2009-08-06 22:32:19 UTC
  • mfrom: (1.2.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090806223219-8z4eej1u8levu4pz
Tags: 2.49a+dfsg-0ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/control: Build-depend on python-2.6 rather than python-2.5.
  - debian/misc/*.desktop: Add Spanish translation to .desktop 
    files.
  - debian/pyversions: 2.6.
  - debian/rules: Clean *.o of source/blender/python/api2_2x/
* New upstream release (LP: #382153).
* Refreshed patches:
  - 01_sanitize_sys.patch
  - 02_tmp_in_HOME
  - 10_use_systemwide_ftgl
  - 70_portability_platform_detection
* Removed patches merged upstream:
  - 30_fix_python_syntax_warning
  - 90_ubuntu_ffmpeg_52_changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
                - LINE: Draw as lines
41
41
                - PATH: Draw pathes
42
42
                - OBJECT: Draw object
43
 
                - GROUP: Draw goup
 
43
                - GROUP: Draw group
44
44
                - BILLBOARD: Draw as billboard 
 
45
@type PHYSICS: readonly dictionary
 
46
@var PHYSICS: Constant dict used for with L{Particle.PHYSICS}
 
47
                - NONE: No physics
 
48
                - NEWTONIAN: Use newtonian physics
 
49
                - KEYED: Use keyed physics
 
50
                - BOIDS: Use Boids physics
 
51
@type INTEGRATOR: readonly dictionary
 
52
@var INTEGRATOR: Constant dict used for with L{Particle.INTEGRATOR}
 
53
                - EULER: Use Euler integrator
 
54
                - MIDPOINT: Use Midpoint integrator
 
55
                - RK4: Use RK4 integrator
 
56
@type ROTATION: readonly dictionary
 
57
@var ROTATION: Constant dict used for with L{Particle.ROTATION}
 
58
                - NONE: No particle initial rotation
 
59
                - NOR: Rotate along the normal
 
60
                - VEL: Rotate affect to velocity
 
61
                - GLX: Rotate along global X-Axis
 
62
                - GLY: Rotate along global Y-Axis
 
63
                - GLZ: Rotate along global Z-Axis
 
64
                - OBX: Rotate along local X-Axis
 
65
                - OBY: Rotate along local Y-Axis
 
66
                - OBZ: Rotate along local Z-Axis
 
67
@type ANGULARV: readonly dictionary
 
68
@var ANGULARV: Constant dict used for with L{Particle.ANGULARV}
 
69
                - NONE: No particle angular velocity
 
70
                - SPIN: Spin particle angular velocity
 
71
                - RANDOM: Random particle angular velocity
 
72
@type CHILDTYPE: readonly dictionary
 
73
@var CHILDTYPE: Constant dict used for with L{Particle.CHILDTYPE}
 
74
                - NONE: set no children
 
75
                - PARTICLES: set children born from particles
 
76
                - FACES: set children born from faces
 
77
@type CHILDKINK: readonly dictionary
 
78
@var CHILDKINK: Type of periodic offset on the path
 
79
                - NOTHING: set no offset on the path 
 
80
                - CURL: set curl offset on the path
 
81
                - RADIAL: set radial offset on the path
 
82
                - WAVE: set wave offset on the path
 
83
                - BRAID: set braid offset on the path
 
84
@type CHILDKINKAXIS: readonly dictionary
 
85
@var CHILDKINKAXIS: Which axis to use for offset
 
86
                - X: set X axis for offset
 
87
                - Y: set Y axis for offset
 
88
                - Z: set Z axis for offset
45
89
"""
46
90
 
 
91
def New(object):
 
92
        """
 
93
        Create a new particle system applied to L{object}
 
94
        @type object: string or L{Blender.Object.Object}
 
95
        @param name: The name of an existing object.
 
96
        @rtype: L{Particle}
 
97
        @return: a new Particle system.
 
98
        """
 
99
 
47
100
class Particle:
48
101
        """
49
102
        The Particle object
108
161
        @type object: Blender Object
109
162
        @ivar renderEmitter: Render emitter object.
110
163
        @type renderEmitter: int
 
164
        @ivar renderMatCol: Draw particles using material's diffuse color.
 
165
        @type renderMatCol: int
 
166
        @ivar renderParents: Render parent particles.
 
167
        @type renderParents: int
 
168
        @ivar renderUnborn: Show particles before they are emitted.
 
169
        @type renderUnborn: int
 
170
        @ivar renderDied: Show particles after they have died.
 
171
        @type renderDied: int
 
172
        @ivar renderMaterial: Specify material used for the particles.
 
173
        @type renderMaterial: int
111
174
        @ivar displayPercentage: Particle display percentage.
112
175
        @type displayPercentage: int
113
176
        @ivar hairDisplayStep: How many steps paths are drawn with (power of 2) in visu mode.
118
181
        @type duplicateObject: Blender Object
119
182
        @ivar drawAs: Get draw type Particle.DRAWAS([ 'NONE' | 'OBJECT' | 'POINT' | ... ]).
120
183
        @type drawAs: int
 
184
        @ivar physics: Select particle physics type Particle.PHYSICS([ 'BOIDS' | 'KEYED' | 'NEWTONIAN' | 'NONE' ])
 
185
        @type physics: int
 
186
        @ivar integration: Select physics integrator type Particle.INTEGRATOR([ 'RK4' | 'MIDPOINT' | 'EULER' ])
 
187
        @type integration: int
 
188
        @ivar inVelObj: Let the object give the particle a starting speed
 
189
        @type inVelObj: float
 
190
        @ivar inVelNor: Let the surface normal give the particle a starting speed
 
191
        @type inVelNor: float
 
192
        @ivar inVelRan: Give the starting speed a random variation
 
193
        @type inVelRan: float
 
194
        @ivar inVelTan: Let the surface tangent give the particle a starting speed
 
195
        @type inVelTan: float
 
196
        @ivar inVelRot: Rotate the surface tangent
 
197
        @type inVelRot: float
 
198
        @ivar inVelPart: Let the target particle give the particle a starting speed
 
199
        @type inVelPart: float
 
200
        @ivar inVelReact: Let the vector away from the target particles location give the particle a starting speed
 
201
        @type inVelReact: float
 
202
        @ivar rotation: Particles initial rotation Particle.ROTATION([ 'OBZ' | 'OBY' | 'OBX' | 'GLZ' | 'GLY' | 'GLX' | 'VEL' | 'NOR' | 'NONE' ])
 
203
        @type rotation: int
 
204
        @ivar rotDyn: Sets rotation to dynamic/constant
 
205
        @type rotDyn: int
 
206
        @ivar rotRand: Randomize rotation
 
207
        @type rotRand: float
 
208
        @ivar rotPhase: Initial rotation phase
 
209
        @type rotPhase: float
 
210
        @ivar rotPhaseR: Randomize rotation phase
 
211
        @type rotPhaseR: float
 
212
        @ivar rotAnV: Select particle angular velocity mode Particle.ANGULARV([ 'RANDOM' | 'SPIN' | 'NONE' ])
 
213
        @type rotAnV: int
 
214
        @ivar rotAnVAm: Angular velocity amount
 
215
        @type rotAnVAm: float
 
216
        @ivar glAccX: Specify a constant acceleration along the X-axis
 
217
        @type glAccX: float
 
218
        @ivar glAccY: Specify a constant acceleration along the Y-axis
 
219
        @type glAccY: float
 
220
        @ivar glAccZ: Specify a constant acceleration along the Z-axis
 
221
        @type glAccZ: float
 
222
        @ivar glDrag: Specify the amount of air-drag
 
223
        @type glDrag: float
 
224
        @ivar glBrown: Specify the amount of brownian motion
 
225
        @type glBrown: float
 
226
        @ivar glDamp: Specify the amount of damping
 
227
        @type glDamp: float
 
228
        @ivar childAmount: The total number of children
 
229
        @type childAmount: int
 
230
        @ivar childType: Type of childrens ( Particle.CHILDTYPE[ 'FACES' | 'PARTICLES' | 'NONE' ] )
 
231
        @type childType: int
 
232
        @ivar childRenderAmount: Amount of children/parent for rendering
 
233
        @type childRenderAmount: int
 
234
        @ivar childRadius: Radius of children around parent
 
235
        @type childRadius: float
 
236
        @ivar childRound: Roundness of children around parent
 
237
        @type childRound: float
 
238
        @ivar childClump: Amount of clumpimg
 
239
        @type childClump: float
 
240
        @ivar childShape: Shape of clumpimg
 
241
        @type childShape: float
 
242
        @ivar childSize: A multiplier for the child particle size
 
243
        @type childSize: float
 
244
        @ivar childRand: Random variation to the size of the child particles
 
245
        @type childRand: float
 
246
        @ivar childRough1: Amount of location dependant rough
 
247
        @type childRough1: float
 
248
        @ivar childRough1Size: Size of location dependant rough
 
249
        @type childRough1Size: float
 
250
        @ivar childRough2: Amount of random rough
 
251
        @type childRough2: float
 
252
        @ivar childRough2Size: Size of random rough
 
253
        @type childRough2Size: float
 
254
        @ivar childRough2Thresh: Amount of particles left untouched by random rough
 
255
        @type childRough2Thresh: float
 
256
        @ivar childRoughE: Amount of end point rough
 
257
        @type childRoughE: float
 
258
        @ivar childRoughEShape: Shape of end point rough
 
259
        @type childRoughEShape: float
 
260
        @ivar childKink: Type of periodic offset on the path (Particle.CHILDKINK[ 'BRAID' | 'WAVE' | 'RADIAL' | 'CURL' | 'NOTHING' ])
 
261
        @type childKink: int
 
262
        @ivar childKinkAxis: Which axis to use for offset (Particle.CHILDKINKAXIS[ 'Z' | 'Y' | 'X' ])
 
263
        @type childKinkAxis: int
 
264
        @ivar childKinkFreq: The frequency of the offset (1/total length)
 
265
        @type childKinkFreq: float
 
266
        @ivar childKinkShape: Adjust the offset to the beginning/end
 
267
        @type childKinkShape: float
 
268
        @ivar childKinkAmp: The amplitude of the offset
 
269
        @type childKinkAmp: float
 
270
        @ivar childBranch: Branch child paths from eachother
 
271
        @type childBranch: int
 
272
        @ivar childBranch: Animate branching
 
273
        @type childBranch: int
 
274
        @ivar childBranch: Start and end points are the same
 
275
        @type childBranch: int
 
276
        @ivar childBranch: Threshold of branching
 
277
        @type childBranch: float
121
278
        """
122
279
        
123
280
        def freeEdit():
153
310
                @return: list of 4-tuples or None if system is disabled
154
311
                """
155
312
                
 
313
        def setMat(mat):
 
314
                """
 
315
                Set the particles' material. This method checks if the argument
 
316
                given is really a material, imposes a limit of 16 materials and adds
 
317
                the material if it wasn't already in the list of the object.
 
318
                @type mat: Blender Material
 
319
                @param mat: The material to be assigned to particles
 
320
                """
 
321
                
156
322
        def getMat():
157
323
                """
158
324
                Get the particles' material.
183
349
                @rtype: list of floats
184
350
                @return: list of floats or list of tuples if id is not zero (size,id) or None if system is disabled.
185
351
                """
 
352
        
 
353
        def getVertGroup(attribute):
 
354
                """
 
355
                Get vertex group name and negation bit assigned to affect parameter attribute.
 
356
                A list of string and integer (vertex group name, negation bit).
 
357
                @type attribute: int
 
358
                @param attribute: Particle.VERTEXGROUPS([ 'DENSITY' | 'VELOCITY' | ... ])
 
359
                @rtype: list of objects
 
360
                @return: first element is the vg name and second the negation bit
 
361
                """
 
362
        def setVertGroup(name,attribute,negated):
 
363
                """
 
364
                Set vertex group and negation bit to affect particles system attribute.
 
365
                @type name: string
 
366
                @param name: Name of the vertex group
 
367
                @type attribute: int
 
368
                @param attribute: Particle.VERTEXGROUPS([ 'DENSITY' | 'VELOCITY' | ... ])
 
369
                @type negated: int
 
370
                @param negated: Negate the effect of the vertex group
 
371
                @return: None
 
372
                """