From e8d02359cf0853d32722ead7513bd6d28318c92d Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Mon, 12 Oct 2020 12:37:48 +0200 Subject: 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. --- source/blender/makesrna/intern/rna_modifier.c | 1 + source/blender/modifiers/intern/MOD_volume_displace.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'source') 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(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; } -- cgit v1.2.3