From d72f1f20553bf22eb68ebe53e88bea47870aacab Mon Sep 17 00:00:00 2001 From: RodZill4 Date: Tue, 19 Nov 2019 07:16:09 +0100 Subject: [PATCH] Fixed problem when duplicating gradient (interpolation mode was not copied) --- addons/material_maker/engine/gen_base.gd | 2 +- addons/material_maker/types/gradient.gd | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/material_maker/engine/gen_base.gd b/addons/material_maker/engine/gen_base.gd index 7ecef0a..5cb42a2 100644 --- a/addons/material_maker/engine/gen_base.gd +++ b/addons/material_maker/engine/gen_base.gd @@ -151,7 +151,7 @@ func get_input_shader(input_index : int) -> Dictionary: func get_shader(output_index : int, context) -> Dictionary: return get_shader_code("UV", output_index, context) -func render(output_index : int, size : int): +func render(output_index : int, size : int) -> Object: var context : MMGenContext = MMGenContext.new() var source = get_shader_code("UV", output_index, context) while source is GDScriptFunctionState: diff --git a/addons/material_maker/types/gradient.gd b/addons/material_maker/types/gradient.gd index b015475..b5e0832 100644 --- a/addons/material_maker/types/gradient.gd +++ b/addons/material_maker/types/gradient.gd @@ -148,5 +148,6 @@ func deserialize(v) -> void: clear() for p in v.points: add_point(p.v, p.c) + interpolation = v.interpolation else: print("Cannot deserialize gradient")