From d507107577e3ceb981744990ad89b0e55132d9d6 Mon Sep 17 00:00:00 2001 From: RodZill4 Date: Thu, 25 Feb 2021 19:23:13 +0100 Subject: [PATCH] Fixed polygon deserialization (#294) --- addons/material_maker/types/polygon.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/material_maker/types/polygon.gd b/addons/material_maker/types/polygon.gd index 2bdddbed..910440e1 100644 --- a/addons/material_maker/types/polygon.gd +++ b/addons/material_maker/types/polygon.gd @@ -67,10 +67,10 @@ func deserialize(v) -> void: clear() if typeof(v) == TYPE_DICTIONARY and v.has("type") and v.type == "Polygon": for p in v.points: - add_point(p.x, p.y) + points.push_back(Vector2(p.x, p.y)) elif typeof(v) == TYPE_OBJECT and v.get_script() == get_script(): clear() for p in v.points: - add_point(p.x, p.y) + points.push_back(Vector2(p.x, p.y)) else: print("Cannot deserialize polygon")