Fixed problem when duplicating gradient (interpolation mode was not copied)

This commit is contained in:
RodZill4 2019-11-19 07:16:09 +01:00
parent 816a758652
commit d72f1f2055
2 changed files with 2 additions and 1 deletions

View File

@ -151,7 +151,7 @@ func get_input_shader(input_index : int) -> Dictionary:
func get_shader(output_index : int, context) -> Dictionary: func get_shader(output_index : int, context) -> Dictionary:
return get_shader_code("UV", output_index, context) 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 context : MMGenContext = MMGenContext.new()
var source = get_shader_code("UV", output_index, context) var source = get_shader_code("UV", output_index, context)
while source is GDScriptFunctionState: while source is GDScriptFunctionState:

View File

@ -148,5 +148,6 @@ func deserialize(v) -> void:
clear() clear()
for p in v.points: for p in v.points:
add_point(p.v, p.c) add_point(p.v, p.c)
interpolation = v.interpolation
else: else:
print("Cannot deserialize gradient") print("Cannot deserialize gradient")