~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to source/blender/makesrna/intern/rna_smoke.c

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-07-23 08:54:18 UTC
  • mfrom: (14.2.16 sid)
  • mto: (14.2.19 sid)
  • mto: This revision was merged to the branch mainline in revision 42.
  • Revision ID: package-import@ubuntu.com-20120723085418-9foz30v6afaf5ffs
Tags: 2.63a-2
* debian/: Cycles support added (Closes: #658075)
  For now, this top feature has been enabled only
  on [any-amd64 any-i386] architectures because
  of OpenImageIO failing on all others
* debian/: scripts installation path changed
  from /usr/lib to /usr/share:
  + debian/patches/: patchset re-worked for path changing
  + debian/control: "Breaks" field added on yafaray-exporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 * $Id: rna_smoke.c 28560 2010-05-04 05:15:53Z zanqdo $
3
 
 *
 
1
/*
4
2
 * ***** BEGIN GPL LICENSE BLOCK *****
5
3
 *
6
4
 * This program is free software; you can redistribute it and/or
22
20
 * ***** END GPL LICENSE BLOCK *****
23
21
 */
24
22
 
 
23
/** \file blender/makesrna/intern/rna_smoke.c
 
24
 *  \ingroup RNA
 
25
 */
 
26
 
 
27
 
25
28
#include <stdlib.h>
26
29
#include <limits.h>
27
30
 
33
36
#include "BKE_smoke.h"
34
37
 
35
38
#include "DNA_modifier_types.h"
 
39
#include "DNA_object_force.h"
36
40
#include "DNA_object_types.h"
37
41
#include "DNA_scene_types.h"
38
42
#include "DNA_smoke_types.h"
47
51
#include "BKE_particle.h"
48
52
 
49
53
 
50
 
static void rna_Smoke_update(Main *bmain, Scene *scene, PointerRNA *ptr)
 
54
static void rna_Smoke_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
51
55
{
52
 
        DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
 
56
        DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA);
53
57
}
54
58
 
55
59
static void rna_Smoke_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr)
56
60
{
57
61
        rna_Smoke_update(bmain, scene, ptr);
58
 
        DAG_scene_sort(scene);
 
62
        DAG_scene_sort(bmain, scene);
59
63
}
60
64
 
61
65
static void rna_Smoke_reset(Main *bmain, Scene *scene, PointerRNA *ptr)
64
68
 
65
69
        smokeModifier_reset(settings->smd);
66
70
 
 
71
        if (settings->smd && settings->smd->domain)
 
72
                settings->point_cache[0]->flag |= PTCACHE_OUTDATED;
 
73
 
67
74
        rna_Smoke_update(bmain, scene, ptr);
68
75
}
69
76
 
73
80
 
74
81
        smokeModifier_reset(settings->smd);
75
82
 
 
83
        if (settings->smd && settings->smd->domain)
 
84
                settings->smd->domain->point_cache[0]->flag |= PTCACHE_OUTDATED;
 
85
 
76
86
        rna_Smoke_dependency_update(bmain, scene, ptr);
77
87
}
78
88
 
79
89
static char *rna_SmokeDomainSettings_path(PointerRNA *ptr)
80
90
{
81
91
        SmokeDomainSettings *settings = (SmokeDomainSettings*)ptr->data;
82
 
        ModifierData *md= (ModifierData *)settings->smd;
 
92
        ModifierData *md = (ModifierData *)settings->smd;
83
93
 
84
94
        return BLI_sprintfN("modifiers[\"%s\"].domain_settings", md->name);
85
95
}
87
97
static char *rna_SmokeFlowSettings_path(PointerRNA *ptr)
88
98
{
89
99
        SmokeFlowSettings *settings = (SmokeFlowSettings*)ptr->data;
90
 
        ModifierData *md= (ModifierData *)settings->smd;
 
100
        ModifierData *md = (ModifierData *)settings->smd;
91
101
 
92
102
        return BLI_sprintfN("modifiers[\"%s\"].flow_settings", md->name);
93
103
}
95
105
static char *rna_SmokeCollSettings_path(PointerRNA *ptr)
96
106
{
97
107
        SmokeCollSettings *settings = (SmokeCollSettings*)ptr->data;
98
 
        ModifierData *md= (ModifierData *)settings->smd;
 
108
        ModifierData *md = (ModifierData *)settings->smd;
99
109
 
100
110
        return BLI_sprintfN("modifiers[\"%s\"].coll_settings", md->name);
101
111
}
109
119
 
110
120
        static EnumPropertyItem prop_noise_type_items[] = {
111
121
                                {MOD_SMOKE_NOISEWAVE, "NOISEWAVE", 0, "Wavelet", ""},
112
 
#if FFTW3 == 1
113
 
                                {MOD_SMOKE_NOISEFFT, "NOISEFFT", 0, "FFT", ""}, 
 
122
#ifdef WITH_FFTW3
 
123
                                {MOD_SMOKE_NOISEFFT, "NOISEFFT", 0, "FFT", ""},
114
124
#endif
115
125
                        /*      {MOD_SMOKE_NOISECURL, "NOISECURL", 0, "Curl", ""}, */
116
126
                                {0, NULL, 0, NULL, NULL}};
120
130
                {SM_CACHE_HEAVY, "CACHEHEAVY", 0, "Heavy", "Effective but slow compression"},
121
131
                {0, NULL, 0, NULL, NULL}};
122
132
 
 
133
        static EnumPropertyItem smoke_domain_colli_items[] = {
 
134
                {SM_BORDER_OPEN, "BORDEROPEN", 0, "Open", "Smoke doesn't collide with any border"},
 
135
                {SM_BORDER_VERTICAL, "BORDERVERTICAL", 0, "Vertically Open",
 
136
                                     "Smoke doesn't collide with top and bottom sides"},
 
137
                {SM_BORDER_CLOSED, "BORDERCLOSED", 0, "Collide All", "Smoke collides with every side"},
 
138
                {0, NULL, 0, NULL, NULL}};
 
139
 
123
140
        srna = RNA_def_struct(brna, "SmokeDomainSettings", NULL);
124
141
        RNA_def_struct_ui_text(srna, "Domain Settings", "Smoke domain settings");
125
142
        RNA_def_struct_sdna(srna, "SmokeDomainSettings");
126
143
        RNA_def_struct_path_func(srna, "rna_SmokeDomainSettings_path");
127
144
 
128
 
        prop= RNA_def_property(srna, "maxres", PROP_INT, PROP_NONE);
 
145
        prop = RNA_def_property(srna, "resolution_max", PROP_INT, PROP_NONE);
129
146
        RNA_def_property_int_sdna(prop, NULL, "maxres");
130
147
        RNA_def_property_range(prop, 24, 512);
131
148
        RNA_def_property_ui_range(prop, 24, 512, 2, 0);
132
149
        RNA_def_property_ui_text(prop, "Max Res", "Maximal resolution used in the fluid domain");
 
150
        RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
133
151
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
134
152
 
135
 
        prop= RNA_def_property(srna, "amplify", PROP_INT, PROP_NONE);
 
153
        prop = RNA_def_property(srna, "amplify", PROP_INT, PROP_NONE);
136
154
        RNA_def_property_int_sdna(prop, NULL, "amplify");
137
155
        RNA_def_property_range(prop, 1, 10);
138
156
        RNA_def_property_ui_range(prop, 1, 10, 1, 0);
139
157
        RNA_def_property_ui_text(prop, "Amplification", "Enhance the resolution of smoke by this factor using noise");
 
158
        RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
140
159
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
141
160
 
142
 
        prop= RNA_def_property(srna, "highres", PROP_BOOLEAN, PROP_NONE);
 
161
        prop = RNA_def_property(srna, "use_high_resolution", PROP_BOOLEAN, PROP_NONE);
143
162
        RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_HIGHRES);
144
163
        RNA_def_property_ui_text(prop, "High res", "Enable high resolution (using amplification)");
 
164
        RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
145
165
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
146
166
 
147
 
        prop= RNA_def_property(srna, "viewhighres", PROP_BOOLEAN, PROP_NONE);
 
167
        prop = RNA_def_property(srna, "show_high_resolution", PROP_BOOLEAN, PROP_NONE);
148
168
        RNA_def_property_boolean_sdna(prop, NULL, "viewsettings", MOD_SMOKE_VIEW_SHOWBIG);
149
169
        RNA_def_property_ui_text(prop, "Show High Resolution", "Show high resolution (using amplification)");
150
170
        RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
151
171
 
152
 
        prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
 
172
        prop = RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
153
173
        RNA_def_property_enum_sdna(prop, NULL, "noise");
154
174
        RNA_def_property_enum_items(prop, prop_noise_type_items);
155
175
        RNA_def_property_ui_text(prop, "Noise Method", "Noise method which is used for creating the high resolution");
 
176
        RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
156
177
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
157
178
 
158
 
        prop= RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_NONE);
 
179
        prop = RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_NONE);
159
180
        RNA_def_property_float_sdna(prop, NULL, "alpha");
160
181
        RNA_def_property_range(prop, -5.0, 5.0);
161
182
        RNA_def_property_ui_range(prop, -5.0, 5.0, 0.02, 5);
162
 
        RNA_def_property_ui_text(prop, "Gravity", "Higher value results in sinking smoke");
 
183
        RNA_def_property_ui_text(prop, "Density",
 
184
                                 "How much density affects smoke motion (higher value results in faster rising smoke)");
163
185
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
164
186
 
165
 
        prop= RNA_def_property(srna, "beta", PROP_FLOAT, PROP_NONE);
 
187
        prop = RNA_def_property(srna, "beta", PROP_FLOAT, PROP_NONE);
166
188
        RNA_def_property_float_sdna(prop, NULL, "beta");
167
189
        RNA_def_property_range(prop, -5.0, 5.0);
168
190
        RNA_def_property_ui_range(prop, -5.0, 5.0, 0.02, 5);
169
 
        RNA_def_property_ui_text(prop, "Heat", "Higher value results in faster rising smoke");
 
191
        RNA_def_property_ui_text(prop, "Heat",
 
192
                                 "How much heat affects smoke motion (higher value results in faster rising smoke)");
170
193
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
171
194
 
172
 
        prop= RNA_def_property(srna, "coll_group", PROP_POINTER, PROP_NONE);
 
195
        prop = RNA_def_property(srna, "collision_group", PROP_POINTER, PROP_NONE);
173
196
        RNA_def_property_pointer_sdna(prop, NULL, "coll_group");
174
197
        RNA_def_property_struct_type(prop, "Group");
175
198
        RNA_def_property_flag(prop, PROP_EDITABLE);
176
199
        RNA_def_property_ui_text(prop, "Collision Group", "Limit collisions to this group");
177
200
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset_dependancy");
178
201
 
179
 
        prop= RNA_def_property(srna, "fluid_group", PROP_POINTER, PROP_NONE);
 
202
        prop = RNA_def_property(srna, "fluid_group", PROP_POINTER, PROP_NONE);
180
203
        RNA_def_property_pointer_sdna(prop, NULL, "fluid_group");
181
204
        RNA_def_property_struct_type(prop, "Group");
182
205
        RNA_def_property_flag(prop, PROP_EDITABLE);
183
206
        RNA_def_property_ui_text(prop, "Fluid Group", "Limit fluid objects to this group");
184
207
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset_dependancy");
185
208
 
186
 
        prop= RNA_def_property(srna, "eff_group", PROP_POINTER, PROP_NONE);
 
209
        prop = RNA_def_property(srna, "effector_group", PROP_POINTER, PROP_NONE);
187
210
        RNA_def_property_pointer_sdna(prop, NULL, "eff_group");
188
211
        RNA_def_property_struct_type(prop, "Group");
189
212
        RNA_def_property_flag(prop, PROP_EDITABLE);
190
213
        RNA_def_property_ui_text(prop, "Effector Group", "Limit effectors to this group");
191
214
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset_dependancy");
192
215
 
193
 
        prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
 
216
        prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
194
217
        RNA_def_property_float_sdna(prop, NULL, "strength");
195
 
        RNA_def_property_range(prop, 1.0, 10.0);
196
 
        RNA_def_property_ui_range(prop, 1.0, 10.0, 1, 2);
197
 
        RNA_def_property_ui_text(prop, "Strength", "Strength of wavelet noise");
 
218
        RNA_def_property_range(prop, 0.0, 10.0);
 
219
        RNA_def_property_ui_range(prop, 0.0, 10.0, 1, 2);
 
220
        RNA_def_property_ui_text(prop, "Strength", "Strength of noise");
198
221
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
199
222
 
200
 
        prop= RNA_def_property(srna, "dissolve_speed", PROP_INT, PROP_NONE);
 
223
        prop = RNA_def_property(srna, "dissolve_speed", PROP_INT, PROP_NONE);
201
224
        RNA_def_property_int_sdna(prop, NULL, "diss_speed");
202
 
        RNA_def_property_range(prop, 1.0, 100.0);
203
 
        RNA_def_property_ui_range(prop, 1.0, 1000.0, 1, 0);
 
225
        RNA_def_property_range(prop, 1.0, 10000.0);
 
226
        RNA_def_property_ui_range(prop, 1.0, 10000.0, 1, 0);
204
227
        RNA_def_property_ui_text(prop, "Dissolve Speed", "Dissolve Speed");
205
 
        RNA_def_property_update(prop, 0, NULL);
206
 
 
207
 
        prop= RNA_def_property(srna, "initial_velocity", PROP_BOOLEAN, PROP_NONE);
208
 
        RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_INITVELOCITY);
209
 
        RNA_def_property_ui_text(prop, "Initial Velocity", "Smoke inherits it's velocity from the emitter particle");
210
 
        RNA_def_property_update(prop, 0, NULL);
211
 
 
212
 
        prop= RNA_def_property(srna, "dissolve_smoke", PROP_BOOLEAN, PROP_NONE);
 
228
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
 
229
 
 
230
        prop = RNA_def_property(srna, "use_dissolve_smoke", PROP_BOOLEAN, PROP_NONE);
213
231
        RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_DISSOLVE);
214
232
        RNA_def_property_ui_text(prop, "Dissolve Smoke", "Enable smoke to disappear over time");
215
 
        RNA_def_property_update(prop, 0, NULL);
 
233
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
216
234
 
217
 
        prop= RNA_def_property(srna, "dissolve_smoke_log", PROP_BOOLEAN, PROP_NONE);
 
235
        prop = RNA_def_property(srna, "use_dissolve_smoke_log", PROP_BOOLEAN, PROP_NONE);
218
236
        RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_DISSOLVE_LOG);
219
237
        RNA_def_property_ui_text(prop, "Logarithmic dissolve", "Using 1/x ");
220
 
        RNA_def_property_update(prop, 0, NULL);
 
238
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
221
239
 
222
 
        prop= RNA_def_property(srna, "point_cache_low", PROP_POINTER, PROP_NONE);
 
240
        prop = RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
223
241
        RNA_def_property_flag(prop, PROP_NEVER_NULL);
224
242
        RNA_def_property_pointer_sdna(prop, NULL, "point_cache[0]");
225
243
        RNA_def_property_ui_text(prop, "Point Cache", "");
226
244
 
227
 
        prop= RNA_def_property(srna, "point_cache_high", PROP_POINTER, PROP_NONE);
228
 
        RNA_def_property_flag(prop, PROP_NEVER_NULL);
229
 
        RNA_def_property_pointer_sdna(prop, NULL, "point_cache[1]");
230
 
        RNA_def_property_ui_text(prop, "Point Cache", "");
231
 
 
232
 
        prop= RNA_def_property(srna, "smoke_cache_comp", PROP_ENUM, PROP_NONE);
 
245
        prop = RNA_def_property(srna, "point_cache_compress_type", PROP_ENUM, PROP_NONE);
233
246
        RNA_def_property_enum_sdna(prop, NULL, "cache_comp");
234
247
        RNA_def_property_enum_items(prop, smoke_cache_comp_items);
235
248
        RNA_def_property_ui_text(prop, "Cache Compression", "Compression method to be used");
236
 
        RNA_def_property_update(prop, 0, NULL);
237
 
 
238
 
        prop= RNA_def_property(srna, "smoke_cache_high_comp", PROP_ENUM, PROP_NONE);
239
 
        RNA_def_property_enum_sdna(prop, NULL, "cache_high_comp");
240
 
        RNA_def_property_enum_items(prop, smoke_cache_comp_items);
241
 
        RNA_def_property_ui_text(prop, "Cache Compression", "Compression method to be used");
242
 
        RNA_def_property_update(prop, 0, NULL);
243
 
 
244
 
 
245
 
        prop= RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
 
249
 
 
250
        prop = RNA_def_property(srna, "collision_extents", PROP_ENUM, PROP_NONE);
 
251
        RNA_def_property_enum_sdna(prop, NULL, "border_collisions");
 
252
        RNA_def_property_enum_items(prop, smoke_domain_colli_items);
 
253
        RNA_def_property_ui_text(prop, "Border Collisions",
 
254
                                 "Select which domain border will be treated as collision object");
 
255
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
 
256
 
 
257
        prop = RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
246
258
        RNA_def_property_struct_type(prop, "EffectorWeights");
247
259
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
248
260
        RNA_def_property_ui_text(prop, "Effector Weights", "");
249
261
 
 
262
        prop = RNA_def_property(srna, "smooth_emitter", PROP_BOOLEAN, PROP_NONE);
 
263
        RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_HIGH_SMOOTH);
 
264
        RNA_def_property_ui_text(prop, "Smooth Emitter", "Smoothen emitted smoke to avoid blockiness");
 
265
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
 
266
 
 
267
        prop = RNA_def_property(srna, "time_scale", PROP_FLOAT, PROP_NONE);
 
268
        RNA_def_property_float_sdna(prop, NULL, "time_scale");
 
269
        RNA_def_property_range(prop, 0.2, 1.5);
 
270
        RNA_def_property_ui_range(prop, 0.2, 1.5, 0.02, 5);
 
271
        RNA_def_property_ui_text(prop, "Time Scale", "Adjust simulation speed");
 
272
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
 
273
 
 
274
        prop = RNA_def_property(srna, "vorticity", PROP_FLOAT, PROP_NONE);
 
275
        RNA_def_property_float_sdna(prop, NULL, "vorticity");
 
276
        RNA_def_property_range(prop, 0.01, 4.0);
 
277
        RNA_def_property_ui_range(prop, 0.01, 4.0, 0.02, 5);
 
278
        RNA_def_property_ui_text(prop, "Vorticity", "Amount of turbulence/rotation in fluid");
 
279
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
 
280
 
250
281
}
251
282
 
252
283
static void rna_def_smoke_flow_settings(BlenderRNA *brna)
259
290
        RNA_def_struct_sdna(srna, "SmokeFlowSettings");
260
291
        RNA_def_struct_path_func(srna, "rna_SmokeFlowSettings_path");
261
292
 
262
 
        prop= RNA_def_property(srna, "density", PROP_FLOAT, PROP_NONE);
 
293
        prop = RNA_def_property(srna, "density", PROP_FLOAT, PROP_NONE);
263
294
        RNA_def_property_float_sdna(prop, NULL, "density");
264
295
        RNA_def_property_range(prop, 0.001, 1);
265
296
        RNA_def_property_ui_range(prop, 0.001, 1.0, 1.0, 4);
266
297
        RNA_def_property_ui_text(prop, "Density", "");
267
 
        RNA_def_property_update(prop, 0, NULL); // NC_OBJECT|ND_MODIFIER
 
298
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
268
299
 
269
 
        prop= RNA_def_property(srna, "temperature", PROP_FLOAT, PROP_NONE);
 
300
        prop = RNA_def_property(srna, "temperature", PROP_FLOAT, PROP_NONE);
270
301
        RNA_def_property_float_sdna(prop, NULL, "temp");
271
302
        RNA_def_property_range(prop, -10, 10);
272
303
        RNA_def_property_ui_range(prop, -10, 10, 1, 1);
273
304
        RNA_def_property_ui_text(prop, "Temp. Diff.", "Temperature difference to ambient temperature");
274
 
        RNA_def_property_update(prop, 0, NULL);
 
305
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
275
306
        
276
 
        prop= RNA_def_property(srna, "psys", PROP_POINTER, PROP_NONE);
 
307
        prop = RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE);
277
308
        RNA_def_property_pointer_sdna(prop, NULL, "psys");
278
309
        RNA_def_property_struct_type(prop, "ParticleSystem");
279
310
        RNA_def_property_flag(prop, PROP_EDITABLE);
280
311
        RNA_def_property_ui_text(prop, "Particle Systems", "Particle systems emitted from the object");
281
312
        RNA_def_property_update(prop, 0, "rna_Smoke_reset_dependancy");
282
313
 
283
 
        prop= RNA_def_property(srna, "outflow", PROP_BOOLEAN, PROP_NONE);
 
314
        prop = RNA_def_property(srna, "use_outflow", PROP_BOOLEAN, PROP_NONE);
284
315
        RNA_def_property_boolean_sdna(prop, NULL, "type", MOD_SMOKE_FLOW_TYPE_OUTFLOW);
285
 
        RNA_def_property_ui_text(prop, "Outflow", "Deletes smoke from simulation");
286
 
        RNA_def_property_update(prop, 0, NULL);
 
316
        RNA_def_property_ui_text(prop, "Outflow", "Delete smoke from simulation");
 
317
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
 
318
 
 
319
        prop = RNA_def_property(srna, "use_absolute", PROP_BOOLEAN, PROP_NONE);
 
320
        RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_FLOW_ABSOLUTE);
 
321
        RNA_def_property_ui_text(prop, "Absolute Density", "Only allow given density value in emitter area");
 
322
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
 
323
 
 
324
        prop = RNA_def_property(srna, "initial_velocity", PROP_BOOLEAN, PROP_NONE);
 
325
        RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_FLOW_INITVELOCITY);
 
326
        RNA_def_property_ui_text(prop, "Initial Velocity", "Smoke inherits its velocity from the emitter particle");
 
327
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
 
328
 
 
329
        prop = RNA_def_property(srna, "velocity_factor", PROP_FLOAT, PROP_NONE);
 
330
        RNA_def_property_float_sdna(prop, NULL, "vel_multi");
 
331
        RNA_def_property_range(prop, -2.0, 2.0);
 
332
        RNA_def_property_ui_range(prop, -2.0, 2.0, 0.05, 5);
 
333
        RNA_def_property_ui_text(prop, "Multiplier", "Multiplier to adjust velocity passed to smoke");
 
334
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
287
335
}
288
336
 
289
337
static void rna_def_smoke_coll_settings(BlenderRNA *brna)
304
352
}
305
353
 
306
354
#endif
307