Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Effectdoc.txt « doc « api2_2x « python « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 76cff428ed6b16fdaeb6030c6529593d71d63202 (plain)
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
EFFECT Module documentation


INTRODUCTION
The module effect allows you to access all the data of an effect. 
An effect can modify an object (typically a mesh) in three different ways.
    a) the build effect : makes the mesh appear progressively.
    b) the wave effect : waves appear on the mesh (which should be fine-grained)
    c) the particle effect : every vertex of the mesh emits particles, 
which can themselves emit new particles. This effect is the most parameterizable.

In the blender internals, the effect object is just a placeholder for the "real"
 effect, which can be a wave, particle or build effect. The python API follows 
this structure : the Effect module grants access to (the few) data which
 are shared between all effects. It has three submodules : Wave, Build, Particle
, which grant r/w access to the real parameters of these effects.




functions of the module :

Get(Name:string,pos:int) : returns the pos-th Effect associated
 to the object whose name is Name.

get : same as Get

New(Type:string ) : Creates and returns a new Effect Object.
The parameter Type can take the values "particle", "wave" or "build"



Effect object member functions :

getType() : Retrieves the type of the Effect Object.

setType(val:int) : Sets the type of the Effect Object.
The possible values of the type are :
    0 : effect build.
    1 : effect particle.
    2 : effect wave.


getFlag()Retrieves the flag of the Effect Object

setFlag(val:int) :Sets the flag

The flag of the effect is a combination of parameters, whose semantics depend upon the effect type.
All types :
Bit 0 : set to 1 if the effect is selected in the effects window.
Wave effect :
Bits 1,2,3  :  set to 1 if the button "X", "Y" or "Cycl" is clicked.
Particle effect :
Bits 1,2,3 :  set to 1 if the button "Bspline", "Static" or "Face" is clicked.






Submodules : Wave, Build, Particle.




Wave module 



functions of the module :

Get(Name:string,pos:int) : returns the pos-th wave Effect associated to the object whose name is Name.

get : same as Get

New( ) : Creates and returns a new Wave Object.


Wave object member functions :

getStartx() : returns the startx parameter of the wave object.

setStartx(val:int) : sets the startx parameter of the wave object.

getStarty() : returns the starty parameter of the wave object.

setStarty(val:int) : sets the starty parameter of the wave object.

getHeight() : returns the height parameter of the wave object.

setHeight(val:int) : sets the height parameter of the wave object.

getWidth() : returns the width parameter of the wave object.

setWidth(val:int) : sets the width parameter of the wave object.

getNarrow() : returns the narrow parameter of the wave object.

setNarrow(val:int) : sets the narrow parameter of the wave object.

getSpeed() : returns the speed parameter of the wave object.

setSpeed(val:int) : sets the speed parameter of the wave object.

getMinfac() : returns the minfac parameter of the wave object.

setMinfac(val:int) : sets the minfac parameter of the wave object.

getDamp() : returns the damp parameter of the wave object.

setDamp(val:int) : sets the damp parameter of the wave object.

getTimeoffs() : returns the timeoffs parameter of the wave object.

setTimeoffs(val:int) : sets the time offset parameter of the wave object.

getLifetime() : returns the lifetime parameter of the wave object.

setLifetime(val:int) : sets the lifetime parameter of the wave object.



The Object.attr syntax

Wave attributes can be read/written with the object.attr syntax.
Example :

w = Blender.Wave.Get("Obname",3) #retrieves the 4th effect associated to the object named Obname
a = w.speed  # a is now the value corresponding to the speed of the effect
w.speed = 42   # the speed of the effect is now equal to 42

The parameter can take these values :  "lifetime","timeoffs","damp","minfac","speed","narrow","width","height","startx","starty"




Build module 



functions of the module :

Get(Name:string,pos:int) : returns the pos-th build Effect associated to the object whose name is Name.

get(Name:string,pos:int) : same as Get

New( ) : Creates and returns a new Build Object.


Build object member functions :

getLen() : returns the length of the effect (in frames).

setLen(val:float) : sets the length of the effect (in frames).

getSfra() : returns the starting frame of the effect.

setSfra(val:float) : sets the starting frame of the effect.


The Object.attribute syntax

The attribute can take these values : "sfra","len".


Particle module 



functions of the module :

Get(Name:string,pos:int) : returns the pos-th particle Effect associated to the object whose name is Name.

get(Name:string,pos:int) : same as Get

New( ) : Creates and returns a new Effect Object.


Particle object member functions :

getStartTime() : returns the start time  of the particle effect (in frames).

setStartTime(val:float) : sets the start time of the particle effect (in frames).

getEndTime() : returns the end time  of the particle effect (in frames).

setEndTime(val:float) : sets the end time of the particle effect (in frames).

getLifeTime() : returns the life time  of the particles.

setLifeTime(val:float) : sets the life time of the particles.

getNormfac() : returns the normal strength of the particles (relatively to mesh).

setNormfac(val:float) : sets the normal strength of the particles(relatively to mesh).

getObfac() : returns the initial of the particles relatively to objects.

setObfac(val:float) : sets the initial of the particles relatively to objects.

getRandfac() : returns the initial random speed of the particles.

setRandfac(val:float) : sets the initial  random speed of the particles.

getTexfac() : returns the initial speed of the particles caused by the texture.

setTexfac(val:float) : sets the initial speed of the particles caused by the texture.

getRandlife() : returns the variability of the life of the particles.

setRandlife(val:float) : sets  the variability of the life of the particles.

getNabla() : returns the dimension of the area for gradient computation.

setNabla(val:float) : sets  the dimension of the area for gradient computation.

getTotpart() : returns the total number of particles.

setTotpart(val:int) : sets  the total number of particles.

getTotkey() : returns the number of key positions.

setTotkey(val:int) : sets the number of key positions.

getSeed() : returns the seed of the RNG.

setSeed(val:int) : sets the seed of the RNG.

getSeed() : returns the x,y,z components of the constant force applied to the particles.

setSeed(valx:float,valy:float,valz:float) : sets the x,y,z components of the constant force applied to the particles.

getMult() : returns the 4 probabilities of a particle having a child.

setMult(val1:float,val2:float,val3:float,val4:float) : sets the 4 probabilities of a particle having a child.

getLife() : returns the lifespan of the 4 generation particles.

setLife(val1:float,val2:float,val3:float,val4:float) : sets  the lifespan of the 4 generation particles.

getMat() : returns the material used by the 4 generation particles.

setMat(val1:float,val2:float,val3:float,val4:float) : sets the material used by the 4 generation particles.

getChild() : returns the number of children a particle may have.

setChild(val1:float,val2:float,val3:float,val4:float) : sets  the number of children a particle may have.

getDefvec() : returns the x, y and z axis of the force defined by the texture.

setDefvec(val1:float,val2:float,val3:float) : sets the x, y and z axis of the force defined by the texture.



The Object.attribute syntax

The attribute can take these values : "seed","nabla","sta","end","lifetime","normfac","obfac","randfac","texfac","randlife","vectsize","totpart","force","mult","life","child","mat","defvec".