| 6305 | } |
| 6306 | |
| 6307 | void _set_node_tree_owner(Node *p_current_node, Node *&p_scene_root) { |
| 6308 | // Note: p_scene_parent and p_scene_root must either both be null or both be valid. |
| 6309 | if (p_scene_root == nullptr) { |
| 6310 | // If the root node argument is null, this is the root node. |
| 6311 | p_scene_root = p_current_node; |
| 6312 | // If multiple nodes were generated under the root node, ensure they have the owner set. |
| 6313 | if (unlikely(p_current_node->get_child_count() > 0)) { |
| 6314 | Array args; |
| 6315 | args.append(p_scene_root); |
| 6316 | for (int i = 0; i < p_current_node->get_child_count(); i++) { |
| 6317 | Node *child = p_current_node->get_child(i); |
| 6318 | child->propagate_call(StringName("set_owner"), args); |
| 6319 | } |
| 6320 | } |
| 6321 | } else { |
| 6322 | // Add the node we generated and set the owner to the scene root. |
| 6323 | Array args; |
| 6324 | args.append(p_scene_root); |
| 6325 | p_current_node->propagate_call(StringName("set_owner"), args); |
| 6326 | } |
| 6327 | } |
| 6328 | |
| 6329 | bool GLTFDocument::_does_skinned_mesh_require_placeholder_node(Ref<GLTFState> p_state, Ref<GLTFNode> p_gltf_node) { |
| 6330 | if (p_gltf_node->skin < 0) { |
no test coverage detected