118
180
PropertyRNA *prop;
120
182
static EnumPropertyItem prop_noise_type_items[] = {
121
{MOD_SMOKE_NOISEWAVE, "NOISEWAVE", 0, "Wavelet", ""},
183
{MOD_SMOKE_NOISEWAVE, "NOISEWAVE", 0, "Wavelet", ""},
122
184
#ifdef WITH_FFTW3
123
{MOD_SMOKE_NOISEFFT, "NOISEFFT", 0, "FFT", ""},
185
{MOD_SMOKE_NOISEFFT, "NOISEFFT", 0, "FFT", ""},
125
/* {MOD_SMOKE_NOISECURL, "NOISECURL", 0, "Curl", ""}, */
126
{0, NULL, 0, NULL, NULL}};
187
/* {MOD_SMOKE_NOISECURL, "NOISECURL", 0, "Curl", ""}, */
188
{0, NULL, 0, NULL, NULL}
128
191
static EnumPropertyItem smoke_cache_comp_items[] = {
129
192
{SM_CACHE_LIGHT, "CACHELIGHT", 0, "Light", "Fast but not so effective compression"},
130
193
{SM_CACHE_HEAVY, "CACHEHEAVY", 0, "Heavy", "Effective but slow compression"},
131
{0, NULL, 0, NULL, NULL}};
194
{0, NULL, 0, NULL, NULL}
133
197
static EnumPropertyItem smoke_domain_colli_items[] = {
134
198
{SM_BORDER_OPEN, "BORDEROPEN", 0, "Open", "Smoke doesn't collide with any border"},
135
199
{SM_BORDER_VERTICAL, "BORDERVERTICAL", 0, "Vertically Open",
136
"Smoke doesn't collide with top and bottom sides"},
200
"Smoke doesn't collide with top and bottom sides"},
137
201
{SM_BORDER_CLOSED, "BORDERCLOSED", 0, "Collide All", "Smoke collides with every side"},
138
{0, NULL, 0, NULL, NULL}};
202
{0, NULL, 0, NULL, NULL}
140
205
srna = RNA_def_struct(brna, "SmokeDomainSettings", NULL);
141
206
RNA_def_struct_ui_text(srna, "Domain Settings", "Smoke domain settings");
156
221
RNA_def_property_ui_range(prop, 1, 10, 1, 0);
157
222
RNA_def_property_ui_text(prop, "Amplification", "Enhance the resolution of smoke by this factor using noise");
158
223
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
159
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
224
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
161
226
prop = RNA_def_property(srna, "use_high_resolution", PROP_BOOLEAN, PROP_NONE);
162
227
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_HIGHRES);
163
228
RNA_def_property_ui_text(prop, "High res", "Enable high resolution (using amplification)");
164
229
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
165
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
230
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
167
232
prop = RNA_def_property(srna, "show_high_resolution", PROP_BOOLEAN, PROP_NONE);
168
233
RNA_def_property_boolean_sdna(prop, NULL, "viewsettings", MOD_SMOKE_VIEW_SHOWBIG);
169
234
RNA_def_property_ui_text(prop, "Show High Resolution", "Show high resolution (using amplification)");
170
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
235
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
172
237
prop = RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
173
238
RNA_def_property_enum_sdna(prop, NULL, "noise");
174
239
RNA_def_property_enum_items(prop, prop_noise_type_items);
175
240
RNA_def_property_ui_text(prop, "Noise Method", "Noise method which is used for creating the high resolution");
176
241
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
177
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
242
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
179
244
prop = RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_NONE);
180
245
RNA_def_property_float_sdna(prop, NULL, "alpha");
190
255
RNA_def_property_ui_range(prop, -5.0, 5.0, 0.02, 5);
191
256
RNA_def_property_ui_text(prop, "Heat",
192
257
"How much heat affects smoke motion (higher value results in faster rising smoke)");
193
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
258
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
195
260
prop = RNA_def_property(srna, "collision_group", PROP_POINTER, PROP_NONE);
196
261
RNA_def_property_pointer_sdna(prop, NULL, "coll_group");
197
262
RNA_def_property_struct_type(prop, "Group");
198
263
RNA_def_property_flag(prop, PROP_EDITABLE);
199
264
RNA_def_property_ui_text(prop, "Collision Group", "Limit collisions to this group");
200
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset_dependancy");
265
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset_dependancy");
202
267
prop = RNA_def_property(srna, "fluid_group", PROP_POINTER, PROP_NONE);
203
268
RNA_def_property_pointer_sdna(prop, NULL, "fluid_group");
204
269
RNA_def_property_struct_type(prop, "Group");
205
270
RNA_def_property_flag(prop, PROP_EDITABLE);
206
271
RNA_def_property_ui_text(prop, "Fluid Group", "Limit fluid objects to this group");
207
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset_dependancy");
272
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset_dependancy");
209
274
prop = RNA_def_property(srna, "effector_group", PROP_POINTER, PROP_NONE);
210
275
RNA_def_property_pointer_sdna(prop, NULL, "eff_group");
211
276
RNA_def_property_struct_type(prop, "Group");
212
277
RNA_def_property_flag(prop, PROP_EDITABLE);
213
278
RNA_def_property_ui_text(prop, "Effector Group", "Limit effectors to this group");
214
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset_dependancy");
279
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset_dependancy");
216
281
prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
217
282
RNA_def_property_float_sdna(prop, NULL, "strength");
218
283
RNA_def_property_range(prop, 0.0, 10.0);
219
284
RNA_def_property_ui_range(prop, 0.0, 10.0, 1, 2);
220
285
RNA_def_property_ui_text(prop, "Strength", "Strength of noise");
221
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
286
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
223
288
prop = RNA_def_property(srna, "dissolve_speed", PROP_INT, PROP_NONE);
224
289
RNA_def_property_int_sdna(prop, NULL, "diss_speed");
225
290
RNA_def_property_range(prop, 1.0, 10000.0);
226
291
RNA_def_property_ui_range(prop, 1.0, 10000.0, 1, 0);
227
292
RNA_def_property_ui_text(prop, "Dissolve Speed", "Dissolve Speed");
228
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
293
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
230
295
prop = RNA_def_property(srna, "use_dissolve_smoke", PROP_BOOLEAN, PROP_NONE);
231
296
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_DISSOLVE);
232
297
RNA_def_property_ui_text(prop, "Dissolve Smoke", "Enable smoke to disappear over time");
233
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
298
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
235
300
prop = RNA_def_property(srna, "use_dissolve_smoke_log", PROP_BOOLEAN, PROP_NONE);
236
301
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_DISSOLVE_LOG);
237
302
RNA_def_property_ui_text(prop, "Logarithmic dissolve", "Using 1/x ");
238
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
303
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
240
305
prop = RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
241
306
RNA_def_property_flag(prop, PROP_NEVER_NULL);
262
327
prop = RNA_def_property(srna, "smooth_emitter", PROP_BOOLEAN, PROP_NONE);
263
328
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");
329
RNA_def_property_ui_text(prop, "Smooth Emitter", "Smooth emitted smoke to avoid blockiness");
330
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
267
332
prop = RNA_def_property(srna, "time_scale", PROP_FLOAT, PROP_NONE);
268
333
RNA_def_property_float_sdna(prop, NULL, "time_scale");
269
334
RNA_def_property_range(prop, 0.2, 1.5);
270
335
RNA_def_property_ui_range(prop, 0.2, 1.5, 0.02, 5);
271
336
RNA_def_property_ui_text(prop, "Time Scale", "Adjust simulation speed");
272
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
337
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
274
339
prop = RNA_def_property(srna, "vorticity", PROP_FLOAT, PROP_NONE);
275
340
RNA_def_property_float_sdna(prop, NULL, "vorticity");
276
341
RNA_def_property_range(prop, 0.01, 4.0);
277
342
RNA_def_property_ui_range(prop, 0.01, 4.0, 0.02, 5);
278
343
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");
344
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
346
prop = RNA_def_property(srna, "density", PROP_FLOAT, PROP_NONE);
347
RNA_def_property_array(prop, 32);
348
RNA_def_property_flag(prop, PROP_DYNAMIC);
349
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
350
RNA_def_property_dynamic_array_funcs(prop, "rna_SmokeModifier_density_get_length");
351
RNA_def_property_float_funcs(prop, "rna_SmokeModifier_density_get", NULL, NULL);
352
RNA_def_property_ui_text(prop, "Density", "Smoke density");
354
prop = RNA_def_property(srna, "cell_size", PROP_FLOAT, PROP_XYZ); /* can change each frame when using adaptive domain */
355
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
356
RNA_def_property_ui_text(prop, "cell_size", "Cell Size");
358
prop = RNA_def_property(srna, "start_point", PROP_FLOAT, PROP_XYZ); /* can change each frame when using adaptive domain */
359
RNA_def_property_float_sdna(prop, NULL, "p0");
360
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
361
RNA_def_property_ui_text(prop, "p0", "Start point");
363
prop = RNA_def_property(srna, "domain_resolution", PROP_INT, PROP_XYZ); /* can change each frame when using adaptive domain */
364
RNA_def_property_int_sdna(prop, NULL, "res");
365
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
366
RNA_def_property_ui_text(prop, "res", "Smoke Grid Resolution");
368
prop = RNA_def_property(srna, "burning_rate", PROP_FLOAT, PROP_NONE);
369
RNA_def_property_range(prop, 0.01, 4.0);
370
RNA_def_property_ui_range(prop, 0.01, 2.0, 1.0, 5);
371
RNA_def_property_ui_text(prop, "Speed", "Speed of the burning reaction (use larger values for smaller flame)");
372
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
374
prop = RNA_def_property(srna, "flame_smoke", PROP_FLOAT, PROP_NONE);
375
RNA_def_property_range(prop, 0.0, 8.0);
376
RNA_def_property_ui_range(prop, 0.0, 4.0, 1.0, 5);
377
RNA_def_property_ui_text(prop, "Smoke", "Amount of smoke created by burning fuel");
378
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
380
prop = RNA_def_property(srna, "flame_vorticity", PROP_FLOAT, PROP_NONE);
381
RNA_def_property_range(prop, 0.0, 2.0);
382
RNA_def_property_ui_range(prop, 0.0, 1.0, 1.0, 5);
383
RNA_def_property_ui_text(prop, "Vorticity", "Additional vorticity for the flames");
384
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
386
prop = RNA_def_property(srna, "flame_ignition", PROP_FLOAT, PROP_NONE);
387
RNA_def_property_range(prop, 0.5, 5.0);
388
RNA_def_property_ui_range(prop, 0.5, 2.5, 1.0, 5);
389
RNA_def_property_ui_text(prop, "Ignition", "Minimum temperature of flames");
390
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
392
prop = RNA_def_property(srna, "flame_max_temp", PROP_FLOAT, PROP_NONE);
393
RNA_def_property_range(prop, 1.0, 10.0);
394
RNA_def_property_ui_range(prop, 1.0, 5.0, 1.0, 5);
395
RNA_def_property_ui_text(prop, "Maximum", "Maximum temperature of flames");
396
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
398
prop = RNA_def_property(srna, "flame_smoke_color", PROP_FLOAT, PROP_COLOR_GAMMA);
399
RNA_def_property_array(prop, 3);
400
RNA_def_property_ui_text(prop, "Smoke Color", "Color of smoke emitted from burning fuel");
401
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
403
prop = RNA_def_property(srna, "use_adaptive_domain", PROP_BOOLEAN, PROP_NONE);
404
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_ADAPTIVE_DOMAIN);
405
RNA_def_property_ui_text(prop, "Adaptive Domain", "Adapt simulation resolution and size to fluid");
406
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
407
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
409
prop = RNA_def_property(srna, "additional_res", PROP_INT, PROP_NONE);
410
RNA_def_property_int_sdna(prop, NULL, "adapt_res");
411
RNA_def_property_range(prop, 0, 512);
412
RNA_def_property_ui_range(prop, 0, 512, 2, 0);
413
RNA_def_property_ui_text(prop, "Additional", "Maximum number of additional cells");
414
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
416
prop = RNA_def_property(srna, "adapt_margin", PROP_INT, PROP_NONE);
417
RNA_def_property_int_sdna(prop, NULL, "adapt_margin");
418
RNA_def_property_range(prop, 2, 24);
419
RNA_def_property_ui_range(prop, 2, 24, 2, 0);
420
RNA_def_property_ui_text(prop, "Margin", "Margin added around fluid to minimize boundary interference");
421
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
423
prop = RNA_def_property(srna, "adapt_threshold", PROP_FLOAT, PROP_NONE);
424
RNA_def_property_range(prop, 0.01, 0.5);
425
RNA_def_property_ui_range(prop, 0.01, 0.5, 1.0, 5);
426
RNA_def_property_ui_text(prop, "Threshold",
427
"Maximum amount of fluid cell can contain before it is considered empty");
428
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
283
431
static void rna_def_smoke_flow_settings(BlenderRNA *brna)
293
461
prop = RNA_def_property(srna, "density", PROP_FLOAT, PROP_NONE);
294
462
RNA_def_property_float_sdna(prop, NULL, "density");
295
RNA_def_property_range(prop, 0.001, 1);
296
RNA_def_property_ui_range(prop, 0.001, 1.0, 1.0, 4);
463
RNA_def_property_range(prop, 0.0, 1);
464
RNA_def_property_ui_range(prop, 0.0, 1.0, 1.0, 4);
297
465
RNA_def_property_ui_text(prop, "Density", "");
298
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
466
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
468
prop = RNA_def_property(srna, "smoke_color", PROP_FLOAT, PROP_COLOR_GAMMA);
469
RNA_def_property_float_sdna(prop, NULL, "color");
470
RNA_def_property_array(prop, 3);
471
RNA_def_property_ui_text(prop, "Smoke Color", "Color of smoke");
472
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
474
prop = RNA_def_property(srna, "fuel_amount", PROP_FLOAT, PROP_NONE);
475
RNA_def_property_range(prop, 0.0, 10);
476
RNA_def_property_ui_range(prop, 0.0, 5.0, 1.0, 4);
477
RNA_def_property_ui_text(prop, "Flame Rate", "");
478
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
300
480
prop = RNA_def_property(srna, "temperature", PROP_FLOAT, PROP_NONE);
301
481
RNA_def_property_float_sdna(prop, NULL, "temp");
302
482
RNA_def_property_range(prop, -10, 10);
303
483
RNA_def_property_ui_range(prop, -10, 10, 1, 1);
304
484
RNA_def_property_ui_text(prop, "Temp. Diff.", "Temperature difference to ambient temperature");
305
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
485
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
307
487
prop = RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE);
308
488
RNA_def_property_pointer_sdna(prop, NULL, "psys");
311
491
RNA_def_property_ui_text(prop, "Particle Systems", "Particle systems emitted from the object");
312
492
RNA_def_property_update(prop, 0, "rna_Smoke_reset_dependancy");
314
prop = RNA_def_property(srna, "use_outflow", PROP_BOOLEAN, PROP_NONE);
315
RNA_def_property_boolean_sdna(prop, NULL, "type", MOD_SMOKE_FLOW_TYPE_OUTFLOW);
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");
494
prop = RNA_def_property(srna, "smoke_flow_type", PROP_ENUM, PROP_NONE);
495
RNA_def_property_enum_sdna(prop, NULL, "type");
496
RNA_def_property_enum_items(prop, smoke_flow_types);
497
RNA_def_property_ui_text(prop, "Flow Type", "Change how flow affects the simulation");
498
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
500
prop = RNA_def_property(srna, "smoke_flow_source", PROP_ENUM, PROP_NONE);
501
RNA_def_property_enum_sdna(prop, NULL, "source");
502
RNA_def_property_enum_items(prop, smoke_flow_sources);
503
RNA_def_property_ui_text(prop, "Source", "Change how smoke is emitted");
504
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
319
506
prop = RNA_def_property(srna, "use_absolute", PROP_BOOLEAN, PROP_NONE);
320
507
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_FLOW_ABSOLUTE);
321
508
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");
509
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
324
511
prop = RNA_def_property(srna, "initial_velocity", PROP_BOOLEAN, PROP_NONE);
325
512
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");
513
RNA_def_property_ui_text(prop, "Initial Velocity", "Smoke has some initial velocity when it is emitted");
514
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
329
516
prop = RNA_def_property(srna, "velocity_factor", PROP_FLOAT, PROP_NONE);
330
517
RNA_def_property_float_sdna(prop, NULL, "vel_multi");
331
518
RNA_def_property_range(prop, -2.0, 2.0);
332
519
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");
520
RNA_def_property_ui_text(prop, "Source", "Multiplier of source velocity passed to smoke");
521
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
523
prop = RNA_def_property(srna, "velocity_normal", PROP_FLOAT, PROP_NONE);
524
RNA_def_property_float_sdna(prop, NULL, "vel_normal");
525
RNA_def_property_range(prop, -2.0, 2.0);
526
RNA_def_property_ui_range(prop, -2.0, 2.0, 0.05, 5);
527
RNA_def_property_ui_text(prop, "Normal", "Amount of normal directional velocity");
528
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
530
prop = RNA_def_property(srna, "velocity_random", PROP_FLOAT, PROP_NONE);
531
RNA_def_property_float_sdna(prop, NULL, "vel_random");
532
RNA_def_property_range(prop, 0.0, 2.0);
533
RNA_def_property_ui_range(prop, 0.0, 2.0, 0.05, 5);
534
RNA_def_property_ui_text(prop, "Random", "Amount of random velocity");
535
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
537
prop = RNA_def_property(srna, "volume_density", PROP_FLOAT, PROP_NONE);
538
RNA_def_property_range(prop, 0.0, 1.0);
539
RNA_def_property_ui_range(prop, 0.0, 1.0, 0.05, 5);
540
RNA_def_property_ui_text(prop, "Volume", "Factor for smoke emitted from inside the mesh volume");
541
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
543
prop = RNA_def_property(srna, "surface_distance", PROP_FLOAT, PROP_NONE);
544
RNA_def_property_range(prop, 0.5, 10.0);
545
RNA_def_property_ui_range(prop, 0.5, 5.0, 0.05, 5);
546
RNA_def_property_ui_text(prop, "Surface", "Maximum distance from mesh surface to emit smoke");
547
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
549
prop = RNA_def_property(srna, "density_vertex_group", PROP_STRING, PROP_NONE);
550
RNA_def_property_string_funcs(prop, "rna_SmokeFlow_density_vgroup_get",
551
"rna_SmokeFlow_density_vgroup_length",
552
"rna_SmokeFlow_density_vgroup_set");
553
RNA_def_property_ui_text(prop, "Vertex Group",
554
"Name of vertex group which determines surface emission rate");
555
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
557
prop = RNA_def_property(srna, "use_texture", PROP_BOOLEAN, PROP_NONE);
558
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_FLOW_TEXTUREEMIT);
559
RNA_def_property_ui_text(prop, "Use Texture", "Use a texture to control emission strength");
560
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
562
prop = RNA_def_property(srna, "texture_map_type", PROP_ENUM, PROP_NONE);
563
RNA_def_property_enum_sdna(prop, NULL, "texture_type");
564
RNA_def_property_enum_items(prop, smoke_flow_texture_types);
565
RNA_def_property_ui_text(prop, "Mapping", "Texture mapping type");
566
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
568
prop = RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
569
RNA_def_property_string_sdna(prop, NULL, "uvlayer_name");
570
RNA_def_property_ui_text(prop, "UV Map", "UV map name");
571
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SmokeFlow_uvlayer_set");
572
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
574
prop = RNA_def_property(srna, "noise_texture", PROP_POINTER, PROP_NONE);
575
RNA_def_property_flag(prop, PROP_EDITABLE);
576
RNA_def_property_ui_text(prop, "Texture", "Texture that controls emission strength");
577
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
579
prop = RNA_def_property(srna, "texture_size", PROP_FLOAT, PROP_NONE);
580
RNA_def_property_range(prop, 0.01, 10.0);
581
RNA_def_property_ui_range(prop, 0.1, 5.0, 0.05, 5);
582
RNA_def_property_ui_text(prop, "Size", "Size of texture mapping");
583
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
585
prop = RNA_def_property(srna, "texture_offset", PROP_FLOAT, PROP_NONE);
586
RNA_def_property_range(prop, 0.0, 200.0);
587
RNA_def_property_ui_range(prop, 0.0, 100.0, 0.05, 5);
588
RNA_def_property_ui_text(prop, "Offset", "Z-offset of texture mapping");
589
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
337
592
static void rna_def_smoke_coll_settings(BlenderRNA *brna)
594
static EnumPropertyItem smoke_coll_type_items[] = {
595
{SM_COLL_STATIC, "COLLSTATIC", 0, "Static", "Non moving obstacle"},
596
{SM_COLL_RIGID, "COLLRIGID", 0, "Rigid", "Rigid obstacle"},
597
{SM_COLL_ANIMATED, "COLLANIMATED", 0, "Animated", "Animated obstacle"},
598
{0, NULL, 0, NULL, NULL}
341
604
srna = RNA_def_struct(brna, "SmokeCollSettings", NULL);
342
605
RNA_def_struct_ui_text(srna, "Collision Settings", "Smoke collision settings");
343
606
RNA_def_struct_sdna(srna, "SmokeCollSettings");
344
607
RNA_def_struct_path_func(srna, "rna_SmokeCollSettings_path");
609
prop = RNA_def_property(srna, "collision_type", PROP_ENUM, PROP_NONE);
610
RNA_def_property_enum_sdna(prop, NULL, "type");
611
RNA_def_property_enum_items(prop, smoke_coll_type_items);
612
RNA_def_property_ui_text(prop, "Collision type", "Collision type");
613
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
347
616
void RNA_def_smoke(BlenderRNA *brna)