From 8a6de7337ce4011f74316ae5f06fdd86d7894e80 Mon Sep 17 00:00:00 2001 From: "K. S. Ernest (iFire) Lee" Date: Wed, 8 Sep 2021 11:24:01 -0700 Subject: [PATCH] Rename functions to proper names. --- modules/gltf/gltf_document.cpp | 16 ++++++++-------- modules/gltf/gltf_document.h | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index 71dc8461a67e..c1140e304e46 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -4845,7 +4845,7 @@ void GLTFDocument::_assign_scene_names(Ref state) { } } -BoneAttachment3D *GLTFDocument::_generate_bone_attachment(Ref state, Skeleton3D *skeleton, const GLTFNodeIndex node_index, const GLTFNodeIndex bone_index) { +BoneAttachment3D *GLTFDocument::_generate_bone_attachment_3d(Ref state, Skeleton3D *skeleton, const GLTFNodeIndex node_index, const GLTFNodeIndex bone_index) { Ref gltf_node = state->nodes[node_index]; Ref bone_node = state->nodes[bone_index]; BoneAttachment3D *bone_attachment = memnew(BoneAttachment3D); @@ -4955,7 +4955,7 @@ EditorSceneImporterMeshNode3D *GLTFDocument::_generate_importer_mesh_3d(Ref state, Node *scene_parent, const GLTFNodeIndex node_index) { +Node3D *GLTFDocument::_generate_light_3d(Ref state, Node *scene_parent, const GLTFNodeIndex node_index) { Ref gltf_node = state->nodes[node_index]; ERR_FAIL_INDEX_V(gltf_node->light, state->lights.size(), nullptr); @@ -5007,7 +5007,7 @@ Node3D *GLTFDocument::_generate_light(Ref state, Node *scene_parent, return memnew(Node3D); } -Camera3D *GLTFDocument::_generate_camera(Ref state, Node *scene_parent, const GLTFNodeIndex node_index) { +Camera3D *GLTFDocument::_generate_camera_3d(Ref state, Node *scene_parent, const GLTFNodeIndex node_index) { Ref gltf_node = state->nodes[node_index]; ERR_FAIL_INDEX_V(gltf_node->camera, state->cameras.size(), nullptr); @@ -5391,7 +5391,7 @@ void GLTFDocument::_generate_scene_node(Ref state, Node *scene_parent // skinned meshes must not be placed in a bone attachment. if (non_bone_parented_to_skeleton && gltf_node->skin < 0) { // Bone Attachment - Parent Case - BoneAttachment3D *bone_attachment = _generate_bone_attachment(state, active_skeleton, node_index, gltf_node->parent); + BoneAttachment3D *bone_attachment = _generate_bone_attachment_3d(state, active_skeleton, node_index, gltf_node->parent); scene_parent->add_child(bone_attachment); bone_attachment->set_owner(scene_root); @@ -5406,7 +5406,7 @@ void GLTFDocument::_generate_scene_node(Ref state, Node *scene_parent if (gltf_node->mesh >= 0) { current_node = _generate_mesh_instance_3d(state, scene_parent, node_index, p_importer_mesh); } else if (gltf_node->camera >= 0) { - current_node = _generate_camera(state, scene_parent, node_index); + current_node = _generate_camera_3d(state, scene_parent, node_index); } else if (gltf_node->light >= 0) { current_node = _generate_light(state, scene_parent, node_index); } @@ -5444,7 +5444,7 @@ void GLTFDocument::_generate_skeleton_bone_node(Ref state, Node *scen if (active_skeleton != skeleton) { if (active_skeleton) { // Bone Attachment - Direct Parented Skeleton Case - BoneAttachment3D *bone_attachment = _generate_bone_attachment(state, active_skeleton, node_index, gltf_node->parent); + BoneAttachment3D *bone_attachment = _generate_bone_attachment_3d(state, active_skeleton, node_index, gltf_node->parent); scene_parent->add_child(bone_attachment); bone_attachment->set_owner(scene_root); @@ -5472,7 +5472,7 @@ void GLTFDocument::_generate_skeleton_bone_node(Ref state, Node *scen // skinned meshes must not be placed in a bone attachment. if (!is_skinned_mesh) { // Bone Attachment - Same Node Case - BoneAttachment3D *bone_attachment = _generate_bone_attachment(state, active_skeleton, node_index, node_index); + BoneAttachment3D *bone_attachment = _generate_bone_attachment_3d(state, active_skeleton, node_index, node_index); scene_parent->add_child(bone_attachment); bone_attachment->set_owner(scene_root); @@ -5493,7 +5493,7 @@ void GLTFDocument::_generate_skeleton_bone_node(Ref state, Node *scen current_node = _generate_mesh_instance_3d(state, scene_parent, node_index, p_importer_mesh); } } else if (gltf_node->camera >= 0) { - current_node = _generate_camera(state, scene_parent, node_index); + current_node = _generate_camera_3d(state, scene_parent, node_index); } else if (gltf_node->light >= 0) { current_node = _generate_light(state, scene_parent, node_index); } diff --git a/modules/gltf/gltf_document.h b/modules/gltf/gltf_document.h index 9ffbef272c04..94020542769d 100644 --- a/modules/gltf/gltf_document.h +++ b/modules/gltf/gltf_document.h @@ -272,14 +272,14 @@ class GLTFDocument : public Resource { Error _parse_animations(Ref state); Error _serialize_animations(Ref state); EditorSceneImporterMeshNode3D *_generate_importer_mesh_3d(Ref, Node *, GLTFNodeIndex, bool p_importer_mesh); - BoneAttachment3D *_generate_bone_attachment(Ref state, + BoneAttachment3D *_generate_bone_attachment_3d(Ref state, Skeleton3D *skeleton, const GLTFNodeIndex node_index, const GLTFNodeIndex bone_index); EditorSceneImporterMeshNode3D *_generate_mesh_instance(Ref state, Node *scene_parent, const GLTFNodeIndex node_index, bool p_importer_mesh); - Camera3D *_generate_camera(Ref state, Node *scene_parent, + Camera3D *_generate_camera_3d(Ref state, Node *scene_parent, const GLTFNodeIndex node_index); - Node3D *_generate_light(Ref state, Node *scene_parent, const GLTFNodeIndex node_index); + Node3D *_generate_light_3d(Ref state, Node *scene_parent, const GLTFNodeIndex node_index); Node3D *_generate_node_3d(Ref state, Node *scene_parent, const GLTFNodeIndex node_index, bool p_importer_mesh); void _assign_scene_names(Ref state);