From 71dce8108d5645886718a173410279d65cb3f883 Mon Sep 17 00:00:00 2001 From: RodZill4 Date: Sun, 5 Jan 2020 12:36:46 +0100 Subject: [PATCH] Fixed graph node free error --- addons/material_maker/engine/gen_material.gd | 2 +- addons/material_maker/graph_edit.gd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/material_maker/engine/gen_material.gd b/addons/material_maker/engine/gen_material.gd index b6b41ba..c1fb41b 100644 --- a/addons/material_maker/engine/gen_material.gd +++ b/addons/material_maker/engine/gen_material.gd @@ -200,7 +200,7 @@ func update_spatial_material(m, file_prefix = null) -> void: m.ao_enabled = false # Depth texture = get_generated_texture("depth", file_prefix) - if texture != null: + if texture != null and parameters.depth_scale > 0: m.depth_enabled = true m.depth_deep_parallax = true m.depth_scale = parameters.depth_scale * 0.2 diff --git a/addons/material_maker/graph_edit.gd b/addons/material_maker/graph_edit.gd index 69e7b10..613ce04 100644 --- a/addons/material_maker/graph_edit.gd +++ b/addons/material_maker/graph_edit.gd @@ -77,7 +77,7 @@ func remove_node(node) -> void: if node == last_selected: set_last_selected(null) remove_child(node) - node.free() + node.queue_free() send_changed_signal() # Global operations on graph