From 4e5ef43dbb218d07733708dec7aff4d5db382251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 13 Nov 2018 10:31:02 +0100 Subject: ParticlesMaterial: Simplify PARAM_SCALE texture validation Using the same helper method as other param textures. --- scene/resources/particles_material.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/scene/resources/particles_material.cpp b/scene/resources/particles_material.cpp index d500609c43..b3fc13b79e 100644 --- a/scene/resources/particles_material.cpp +++ b/scene/resources/particles_material.cpp @@ -797,12 +797,7 @@ void ParticlesMaterial::set_param_texture(Parameter p_param, const Ref } break; case PARAM_SCALE: { VisualServer::get_singleton()->material_set_param(_get_material(), shader_names->scale_texture, p_texture); - - Ref curve_tex = p_texture; - if (curve_tex.is_valid()) { - curve_tex->ensure_default_setup(); - } - + _adjust_curve_range(p_texture, 0, 1); } break; case PARAM_HUE_VARIATION: { VisualServer::get_singleton()->material_set_param(_get_material(), shader_names->hue_variation_texture, p_texture); -- cgit v1.2.3