From aaf9b7c5bbb69180b8ae2c4d9068923834bbad98 Mon Sep 17 00:00:00 2001 From: "Andrii Doroshenko (Xrayez)" Date: Sun, 9 Feb 2020 00:04:31 +0200 Subject: Do not override Path2D.self_modulate property Self-modulation was forcefully used for the curve drawing which can interfere with scripted drawing. The curve color is specified by the `draw_line()` method instead. --- scene/2d/path_2d.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp index ef7c343c1a..3525285050 100644 --- a/scene/2d/path_2d.cpp +++ b/scene/2d/path_2d.cpp @@ -102,7 +102,7 @@ void Path2D::_notification(int p_what) { #else const float line_width = 2; #endif - const Color color = Color(1.0, 1.0, 1.0, 1.0); + const Color color = Color(0.5, 0.6, 1.0, 0.7); for (int i = 0; i < curve->get_point_count(); i++) { @@ -163,7 +163,6 @@ void Path2D::_bind_methods() { Path2D::Path2D() { set_curve(Ref(memnew(Curve2D))); //create one by default - set_self_modulate(Color(0.5, 0.6, 1.0, 0.7)); } ///////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3