diff options
author | jfons <joan.fonssanchez@gmail.com> | 2021-06-09 13:06:38 +0200 |
---|---|---|
committer | jfons <joan.fonssanchez@gmail.com> | 2021-06-14 14:05:13 +0200 |
commit | ee702334a1c7bd19dd8fd7fd57009e393939bab7 (patch) | |
tree | cf4e0ece2f10a1c0d5f89d6e1d0e532406fefc6e /editor | |
parent | f178e7abd7d0af21d326f2e818bcd07a487b19fe (diff) |
Rename get_parent_spatial() to get_parent_node3d()
Renames get_parent_spatial() to get_parent_node3d() and changes its
implementation. Before it was not returning a correct pointer if the
node wasn't added to a SceneTree. Now it uses the same implementation as
CanvasItem, which will be correct even for nodes outside a SceneTree.
Diffstat (limited to 'editor')
-rw-r--r-- | editor/import/resource_importer_scene.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index b589a6aaa0..ff626edfa0 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -1213,7 +1213,7 @@ void ResourceImporterScene::_generate_meshes(Node *p_node, const Dictionary &p_m Node3D *n = src_mesh_node; while (n) { xf = n->get_transform() * xf; - n = n->get_parent_spatial(); + n = n->get_parent_node_3d(); } Vector<uint8_t> lightmap_cache; |