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:
authorJacques Lucke <jacques@blender.org>2020-10-12 13:37:48 +0300
committerJacques Lucke <jacques@blender.org>2020-10-12 13:38:03 +0300
commite8d02359cf0853d32722ead7513bd6d28318c92d (patch)
treed07457c69b14e109ed96e266e4efd063697ffb83 /source/blender
parentfc5c5f0636bf03539d972293bd07b428b71877a9 (diff)
Volumes: reduce step and default of strength in Volume Displace modifier
The strength has a high impact on performance. With the previous step and default one could easily and accidentally make Blender unusably slow, because of a too high displacement strength.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c1
-rw-r--r--source/blender/modifiers/intern/MOD_volume_displace.cc2
2 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 5a03c2c236a..0010e473924 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -7096,6 +7096,7 @@ static void rna_def_modifier_volume_displace(BlenderRNA *brna)
prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop, "Strength", "Strength of the displacement");
+ RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 0.1, 4);
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop = RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
diff --git a/source/blender/modifiers/intern/MOD_volume_displace.cc b/source/blender/modifiers/intern/MOD_volume_displace.cc
index 89b5a604d58..535fdc762b8 100644
--- a/source/blender/modifiers/intern/MOD_volume_displace.cc
+++ b/source/blender/modifiers/intern/MOD_volume_displace.cc
@@ -62,7 +62,7 @@ static void initData(ModifierData *md)
{
VolumeDisplaceModifierData *vdmd = reinterpret_cast<VolumeDisplaceModifierData *>(md);
vdmd->texture = NULL;
- vdmd->strength = 1.0f;
+ vdmd->strength = 0.5f;
copy_v3_fl(vdmd->texture_mid_level, 0.5f);
vdmd->texture_sample_radius = 1.0f;
}