浏览代码

Merge pull request #36183 from Chaosus/vs_fix_texture_drop

Restore drag&drop textures in visual shaders
Yuri Roubinsky 5 年之前
父节点
当前提交
1779136336
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      editor/plugins/visual_shader_editor_plugin.cpp

+ 1 - 1
editor/plugins/visual_shader_editor_plugin.cpp

@@ -2179,7 +2179,7 @@ void VisualShaderEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
 							_add_custom_node(arr[i]);
 							_add_custom_node(arr[i]);
 							j++;
 							j++;
 						}
 						}
-					} else if (ClassDB::get_parent_class(type) == "Texture") {
+					} else if (ClassDB::get_parent_class(type) == "Texture2D") {
 						saved_node_pos = p_point + Vector2(0, j * 210 * EDSCALE);
 						saved_node_pos = p_point + Vector2(0, j * 210 * EDSCALE);
 						saved_node_pos_dirty = true;
 						saved_node_pos_dirty = true;
 						_add_texture_node(arr[i]);
 						_add_texture_node(arr[i]);