Skip to content

Commit 882e52e

Browse files
committed
Make it actually show up
1 parent 877b010 commit 882e52e

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

editor/scene_tree_dock.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ class SceneTreeDock : public VBoxContainer {
134134
void _perform_property_drop(Node *p_node, const String &p_property, Ref<Resource> p_res);
135135

136136
EditorData *editor_data = nullptr;
137-
EditorSelection *editor_selection = nullptr;
138137

139138
List<Node *> node_clipboard;
140139
HashSet<Node *> node_clipboard_edited_scene_owned;
@@ -173,7 +172,6 @@ class SceneTreeDock : public VBoxContainer {
173172
Node *_do_create(Node *p_parent);
174173
void _post_do_create(Node *p_child);
175174
Node *scene_root = nullptr;
176-
Node *edited_scene = nullptr;
177175
Node *pending_click_select = nullptr;
178176
bool tree_clicked = false;
179177

@@ -311,6 +309,8 @@ class SceneTreeDock : public VBoxContainer {
311309
static void _bind_methods();
312310

313311
public:
312+
EditorSelection *editor_selection = nullptr;
313+
Node *edited_scene = nullptr;
314314
String get_filter();
315315
void set_filter(const String &p_filter);
316316
void save_branch_to_file(const String &p_directory);

modules/multi_godot/multi_godot.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,9 +1152,11 @@ void MultiGodot::_create_node(String parent_path, String type, bool is_custom_ty
11521152
obj = ClassDB::instantiate(type);
11531153
}
11541154

1155-
obj.operator Object *();
1156-
Node *node = Object::cast_to<Node>(obj);
1155+
Object *pointer = obj.operator Object *();
1156+
Node *node = Object::cast_to<Node>(pointer);
11571157
parent->add_child(node, true);
1158+
node->set_owner(SceneTreeDock::get_singleton()->edited_scene);
1159+
SceneTreeDock::get_singleton()->editor_selection->add_node(node);
11581160
}
11591161

11601162
void MultiGodot::_instantiate_scenes(String parent_path, Vector<String> paths, int index) {

0 commit comments

Comments
 (0)