diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-11-13 10:31:02 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2018-11-13 10:31:02 +0100 |
commit | 4e5ef43dbb218d07733708dec7aff4d5db382251 (patch) | |
tree | 7d55c1bb977497234e4fb62f4bf4751c2b5804be /scene/resources | |
parent | b2f96b2892ed63381f281ac94c795265950fca9b (diff) |
ParticlesMaterial: Simplify PARAM_SCALE texture validation
Using the same helper method as other param textures.
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/particles_material.cpp | 7 |
1 files changed, 1 insertions, 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<Texture> } break; case PARAM_SCALE: { VisualServer::get_singleton()->material_set_param(_get_material(), shader_names->scale_texture, p_texture); - - Ref<CurveTexture> 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); |