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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Karhu <jhkarh@gmail.com>2010-12-01 00:31:18 +0300
committerJanne Karhu <jhkarh@gmail.com>2010-12-01 00:31:18 +0300
commit17cd5811e767df5bc7247648e3cbe52e39575f56 (patch)
tree71353d23d7bc5868620f1a344c2976e7d5eae316 /source/blender/makesrna/intern/rna_smoke.c
parent005feca62d0fafb665c348f0dc75d804cc15bf2d (diff)
Smoke now uses only one point cache where both normal and high resolution smoke are stored together:
* Separate caches were causing quite a lot of problems both in principle and practice. * For example it doesn't really make sense to have different frame ranges for normal and high resolution smoke, but this was fully possible before. * Also to fully bake the smoke you had to do a "Bake All Dynamics", which completely defeats the whole point of the feature! * As a result of this change the smoke cache usage is much much simpler and less error prone. * This is quite a big change, but hopefully there should be less rather than more problems as a result :) Some other related changes: * Changing the cache name now works for disk caches properly too, it now just renames the cache files so should be faster too! * Smoke is now always forced to disk cache with step 1 on file load as there were some strange cases where smoke was trying to use memory cache. * Disabled smoke debug prints from console. * Disabled changing smoke parameters when smoke is baked. Note to users: The unfortunate side effect of this is that old high resolution simulations have to be baked again, but in return you get much better and more logical functionality. Sorry none the less!
Diffstat (limited to 'source/blender/makesrna/intern/rna_smoke.c')
-rw-r--r--source/blender/makesrna/intern/rna_smoke.c29
1 files changed, 7 insertions, 22 deletions
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index 0638667ad28..cdc80cfa176 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -65,10 +65,8 @@ static void rna_Smoke_reset(Main *bmain, Scene *scene, PointerRNA *ptr)
smokeModifier_reset(settings->smd);
- if(settings->smd && settings->smd->domain) {
+ if(settings->smd && settings->smd->domain)
settings->point_cache[0]->flag |= PTCACHE_OUTDATED;
- settings->point_cache[1]->flag |= PTCACHE_OUTDATED;
- }
rna_Smoke_update(bmain, scene, ptr);
}
@@ -79,10 +77,8 @@ static void rna_Smoke_reset_dependancy(Main *bmain, Scene *scene, PointerRNA *pt
smokeModifier_reset(settings->smd);
- if(settings->smd && settings->smd->domain) {
+ if(settings->smd && settings->smd->domain)
settings->smd->domain->point_cache[0]->flag |= PTCACHE_OUTDATED;
- settings->smd->domain->point_cache[1]->flag |= PTCACHE_OUTDATED;
- }
rna_Smoke_dependency_update(bmain, scene, ptr);
}
@@ -219,40 +215,29 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 1.0, 10000.0);
RNA_def_property_ui_range(prop, 1.0, 10000.0, 1, 0);
RNA_def_property_ui_text(prop, "Dissolve Speed", "Dissolve Speed");
- RNA_def_property_update(prop, 0, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
prop= RNA_def_property(srna, "use_dissolve_smoke", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_DISSOLVE);
RNA_def_property_ui_text(prop, "Dissolve Smoke", "Enable smoke to disappear over time");
- RNA_def_property_update(prop, 0, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
prop= RNA_def_property(srna, "use_dissolve_smoke_log", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_DISSOLVE_LOG);
RNA_def_property_ui_text(prop, "Logarithmic dissolve", "Using 1/x ");
- RNA_def_property_update(prop, 0, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
- prop= RNA_def_property(srna, "point_cache_low", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "point_cache[0]");
RNA_def_property_ui_text(prop, "Point Cache", "");
- prop= RNA_def_property(srna, "point_cache_high", PROP_POINTER, PROP_NONE);
- RNA_def_property_flag(prop, PROP_NEVER_NULL);
- RNA_def_property_pointer_sdna(prop, NULL, "point_cache[1]");
- RNA_def_property_ui_text(prop, "Point Cache", "");
-
prop= RNA_def_property(srna, "point_cache_compress_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "cache_comp");
RNA_def_property_enum_items(prop, smoke_cache_comp_items);
RNA_def_property_ui_text(prop, "Cache Compression", "Compression method to be used");
RNA_def_property_update(prop, 0, NULL);
- prop= RNA_def_property(srna, "point_cache_compress_high_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "cache_high_comp");
- RNA_def_property_enum_items(prop, smoke_cache_comp_items);
- RNA_def_property_ui_text(prop, "Cache Compression", "Compression method to be used");
- RNA_def_property_update(prop, 0, NULL);
-
prop= RNA_def_property(srna, "collision_extents", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "border_collisions");
RNA_def_property_enum_items(prop, smoke_domain_colli_items);
@@ -267,7 +252,7 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "smooth_emitter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_HIGH_SMOOTH);
RNA_def_property_ui_text(prop, "Smooth Emitter", "Smoothens emitted smoke to avoid blockiness.");
- RNA_def_property_update(prop, 0, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
prop= RNA_def_property(srna, "time_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "time_scale");