diff options
author | Roman Pogribnyi <pogribnyi@gmail.com> | 2014-06-11 01:52:45 +0400 |
---|---|---|
committer | Roman Pogribnyi <pogribnyi@gmail.com> | 2014-06-11 01:52:45 +0400 |
commit | c249d3dad12e2ad8a0c94ffc571f3b9fa4a5a79a (patch) | |
tree | 42efaf887fb0d75a05ac896bbc456ccc93631fe2 /source/blender | |
parent | c0ecba800204067e7c5f5927923a98e4daedcd5c (diff) |
Noise settings UI
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesdna/DNA_smoke_types.h | 8 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_smoke.c | 40 |
2 files changed, 48 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h index c8bec28466d..acf9982890d 100644 --- a/source/blender/makesdna/DNA_smoke_types.h +++ b/source/blender/makesdna/DNA_smoke_types.h @@ -42,6 +42,7 @@ enum { MOD_SMOKE_HIGH_SMOOTH = (1 << 5), /* -- Deprecated -- */ MOD_SMOKE_FILE_LOAD = (1 << 6), /* flag for file load */ MOD_SMOKE_ADAPTIVE_DOMAIN = (1 << 7), + MOD_SMOKE_NOISE_CLAMP = (1 << 8), /*for mantaflow*/ }; #if (DNA_DEPRECATED_GCC_POISON == 1) @@ -153,6 +154,13 @@ typedef struct SmokeDomainSettings { /* mantaflow settings */ int manta_solver_res; /*dimension of manta solver, 2d or 3d*/ int manta_uvs_num; /*number of UVs, important for octaves count*/ + /*noise settings*/ + float noise_clamp_neg; + float noise_clamp_pos; + float noise_val_scale; + float noise_val_offset; + float noise_time_anim; + float mock_var; /*not used*/ } SmokeDomainSettings; diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c index 6c1abbbab86..82b9926ff14 100644 --- a/source/blender/makesrna/intern/rna_smoke.c +++ b/source/blender/makesrna/intern/rna_smoke.c @@ -563,6 +563,46 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna) RNA_def_property_ui_range(prop, 0, 4, 1, -1); RNA_def_property_ui_text(prop, "UVs number", "how many uv coordinate grind to use(Better not more than 2)"); RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset"); + + prop = RNA_def_property(srna, "manta_clamp_noise", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_NOISE_CLAMP); + RNA_def_property_ui_text(prop, "MantaFlow", "Use Mantaflow"); + + prop = RNA_def_property(srna, "noise_clamp_neg", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "noise_clamp_neg"); + RNA_def_property_range(prop, 0.0, 2.0); + RNA_def_property_ui_range(prop, 0.0, 1.0, 1.0, 5); + RNA_def_property_ui_text(prop, "Clamp Negative Noise", ""); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache"); + + prop = RNA_def_property(srna, "noise_clamp_pos", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "noise_clamp_pos"); + RNA_def_property_range(prop, 0.0, 2.0); + RNA_def_property_ui_range(prop, 0.0, 1.0, 1.0, 5); + RNA_def_property_ui_text(prop, "Clamp Positive Noise", ""); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache"); + + prop = RNA_def_property(srna, "noise_val_scale", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "noise_val_scale"); + RNA_def_property_range(prop, 0.0, 2.0); + RNA_def_property_ui_range(prop, 0.0, 1.0, 1.0, 5); + RNA_def_property_ui_text(prop, "Noise Value Scale", ""); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache"); + + prop = RNA_def_property(srna, "noise_val_offset", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "noise_val_offset"); + RNA_def_property_range(prop, 0.0, 2.0); + RNA_def_property_ui_range(prop, 0.0, 1.0, 1.0, 5); + RNA_def_property_ui_text(prop, "Noise Value Offset", ""); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache"); + + prop = RNA_def_property(srna, "noise_time_anim", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "noise_time_anim"); + RNA_def_property_range(prop, 0.0, 2.0); + RNA_def_property_ui_range(prop, 0.0, 1.0, 1.0, 5); + RNA_def_property_ui_text(prop, "Noise animation time", ""); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache"); + } |