diff --git a/addons/material_maker/nodes/material_3d.mmg b/addons/material_maker/nodes/material_3d.mmg index 76fe95feb..b53837dbb 100644 --- a/addons/material_maker/nodes/material_3d.mmg +++ b/addons/material_maker/nodes/material_3d.mmg @@ -507,7 +507,7 @@ ], "preview_shader": [ "shader_type spatial;", - "render_mode blend_mix,depth_draw_alpha_prepass,cull_back,diffuse_burley,specular_schlick_ggx;", + "render_mode blend_mix,depth_prepass_alpha,cull_back,diffuse_burley,specular_schlick_ggx;", "", "varying vec3 texcoords_3d;", "", @@ -515,7 +515,7 @@ "", "void vertex() {", "$if $(param:world)", - "\ttexcoords_3d = (vec4(VERTEX, 1.0)*WORLD_MATRIX).xyz;", + "\ttexcoords_3d = (vec4(VERTEX, 1.0)*MODEL_MATRIX).xyz;", "$else", "\ttexcoords_3d = VERTEX;", "$fi", diff --git a/material_maker/main_window.gd b/material_maker/main_window.gd index ebc9b44ab..8e8c6a17b 100644 --- a/material_maker/main_window.gd +++ b/material_maker/main_window.gd @@ -744,12 +744,11 @@ func edit_select_connected(end1 : String, end2 : String) -> void: var node_list : Array = [] for n in graph_edit.get_selected_nodes(): node_list.push_back(n.name) - print(node_list) while !node_list.is_empty(): var new_node_list = [] for c in graph_edit.get_connection_list(): if c[end1] in node_list: - var source = graph_edit.get_node(c[end2]) + var source = graph_edit.get_node(NodePath(c[end2])) if !source.selected: new_node_list.push_back(c[end2]) source.selected = true @@ -760,14 +759,14 @@ func edit_select_sources_is_disabled() -> bool: return graph_edit == null or graph_edit.get_selected_nodes().is_empty() func edit_select_sources() -> void: - edit_select_connected("to", "from") + edit_select_connected("to_node", "from_node") func edit_select_targets_is_disabled() -> bool: var graph_edit : MMGraphEdit = get_current_graph_edit() return graph_edit.get_selected_nodes().is_empty() if graph_edit else true func edit_select_targets() -> void: - edit_select_connected("from", "to") + edit_select_connected("from_node", "to_node") func edit_duplicate_is_disabled() -> bool: return edit_cut_is_disabled() diff --git a/material_maker/main_window_layout.gd b/material_maker/main_window_layout.gd index fa50dd959..7b913b7bb 100644 --- a/material_maker/main_window_layout.gd +++ b/material_maker/main_window_layout.gd @@ -50,7 +50,8 @@ func load_panels() -> void: func save_config() -> void: var current_config : Dictionary = $FlexibleLayout.serialize() for mode in [ "material", "paint" ]: - mm_globals.config.set_value("layout", mode, JSON.stringify(layout[mode])) + if layout.has(mode): + mm_globals.config.set_value("layout", mode, JSON.stringify(layout[mode])) func get_panel(n) -> Control: if panels.has(n): diff --git a/material_maker/panels/preview_3d/preview_3d.gd b/material_maker/panels/preview_3d/preview_3d.gd index faf2d47d7..301ce8768 100644 --- a/material_maker/panels/preview_3d/preview_3d.gd +++ b/material_maker/panels/preview_3d/preview_3d.gd @@ -98,7 +98,7 @@ func _on_Model_item_selected(id) -> void: dialog.access = FileDialog.ACCESS_FILESYSTEM dialog.file_mode = FileDialog.FILE_MODE_OPEN_FILE for f in MMMeshLoader.get_file_dialog_filters(): - dialog.add_filter() + dialog.add_filter(f) if mm_globals.config.has_section_key("path", "mesh"): dialog.current_dir = mm_globals.config.get_value("path", "mesh") var files = await dialog.select_files()