diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2012-04-29 01:46:43 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2012-04-29 01:46:43 +0400 |
commit | 8bf8a128c2f1df5c85ee0005d1821316d3e88261 (patch) | |
tree | abbc6dc6eedefc185dd27c96b39a027a9ce19d38 /source/blender/makesrna | |
parent | 4465d2f419a8515df41a8fc415774eedaef0e6f6 (diff) |
Smoke: Support for moving obstacles. (Merge from Smoke2 branch)
Sponsored by the Blender Development Fund.
http://www.blender.org/blenderorg/blender-foundation/development-fund/
Remarks:
The original code was not designed to support moving obstacles so I had to introduce some velocity constraints into the code to prevent smoke from exploding. If this causes problems with "fire" emulation, please let me know.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_smoke.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c index 69d76c0e342..b1fed62f87b 100644 --- a/source/blender/makesrna/intern/rna_smoke.c +++ b/source/blender/makesrna/intern/rna_smoke.c @@ -16,6 +16,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * Contributor(s): Daniel Genrich + * Blender Foundation * * ***** END GPL LICENSE BLOCK ***** */ @@ -336,12 +337,25 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna) static void rna_def_smoke_coll_settings(BlenderRNA *brna) { + static EnumPropertyItem smoke_coll_type_items[] = { + {SM_COLL_STATIC, "COLLSTATIC", 0, "Static", "Non moving obstacle"}, + {SM_COLL_RIGID, "COLLRIGID", 0, "Rigid", "Rigid obstacle"}, + {SM_COLL_ANIMATED, "COLLANIMATED", 0, "Animated", "Animated obstacle"}, + {0, NULL, 0, NULL, NULL}}; + StructRNA *srna; + PropertyRNA *prop; srna = RNA_def_struct(brna, "SmokeCollSettings", NULL); RNA_def_struct_ui_text(srna, "Collision Settings", "Smoke collision settings"); RNA_def_struct_sdna(srna, "SmokeCollSettings"); RNA_def_struct_path_func(srna, "rna_SmokeCollSettings_path"); + + prop = RNA_def_property(srna, "collision_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "type"); + RNA_def_property_enum_items(prop, smoke_coll_type_items); + RNA_def_property_ui_text(prop, "Collision type", "Collision type"); + RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset"); } void RNA_def_smoke(BlenderRNA *brna) |