diff --git a/modules/gltf/doc_classes/GLTFLight.xml b/modules/gltf/doc_classes/GLTFLight.xml
index 354cd48a0..c8cda9301 100644
--- a/modules/gltf/doc_classes/GLTFLight.xml
+++ b/modules/gltf/doc_classes/GLTFLight.xml
@@ -12,17 +12,17 @@
The inner angle of the cone in a spotlight. Must be less than or equal to the outer cone angle.
- Within this angle, the light is at full brightness. Between the inner and outer cone angles, there is a transition from full brightness to zero brightness. When creating a Godot [SpotLight3D], the ratio between the inner and outer cone angles is used to calculate the attenuation of the light.
+ Within this angle, the light is at full brightness. Between the inner and outer cone angles, there is a transition from full brightness to zero brightness. When creating a Godot [SpotLight], the ratio between the inner and outer cone angles is used to calculate the attenuation of the light.
The intensity of the light. This is expressed in candelas (lumens per steradian) for point and spot lights, and lux (lumens per m²) for directional lights. When creating a Godot light, this value is converted to a unitless multiplier.
- The type of the light. The values accepted by Godot are "point", "spot", and "directional", which correspond to Godot's [OmniLight3D], [SpotLight3D], and [DirectionalLight3D] respectively.
+ The type of the light. The values accepted by Godot are "point", "spot", and "directional", which correspond to Godot's [OmniLight], [SpotLight], and [DirectionalLight] respectively.
The outer angle of the cone in a spotlight. Must be greater than or equal to the inner angle.
- At this angle, the light drops off to zero brightness. Between the inner and outer cone angles, there is a transition from full brightness to zero brightness. If this angle is a half turn, then the spotlight emits in all directions. When creating a Godot [SpotLight3D], the outer cone angle is used as the angle of the spotlight.
+ At this angle, the light drops off to zero brightness. Between the inner and outer cone angles, there is a transition from full brightness to zero brightness. If this angle is a half turn, then the spotlight emits in all directions. When creating a Godot [SpotLight], the outer cone angle is used as the angle of the spotlight.
The range of the light, beyond which the light has no effect. GLTF lights with no range defined behave like physical lights (which have infinite range). When creating a Godot light, the range is clamped to 4096.
diff --git a/modules/gltf/doc_classes/GLTFSkeleton.xml b/modules/gltf/doc_classes/GLTFSkeleton.xml
index dad985e88..10b9d4830 100644
--- a/modules/gltf/doc_classes/GLTFSkeleton.xml
+++ b/modules/gltf/doc_classes/GLTFSkeleton.xml
@@ -8,7 +8,7 @@
-
+
@@ -24,7 +24,7 @@
-
+
diff --git a/modules/gltf/gltf_defines.h b/modules/gltf/gltf_defines.h
index 9c653e080..55976e9c6 100644
--- a/modules/gltf/gltf_defines.h
+++ b/modules/gltf/gltf_defines.h
@@ -34,15 +34,16 @@
// This file should only be included by other headers.
// Godot classes used by GLTF headers.
-class BoneAttachment3D;
-class CSGShape3D;
-class DirectionalLight3D;
-class GridMap;
-class Light3D;
-class MultiMeshInstance3D;
-class Skeleton3D;
+class BoneAttachment;
+class DirectionalLight;
+class Light;
+class MultiMeshInstance;
+class Skeleton;
class Skin;
+class CSGShape3D;
+class GridMap;
+
// GLTF classes.
struct GLTFAccessor;
class GLTFAnimation;
diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp
index 7e90f198f..f03d101b3 100644
--- a/modules/gltf/gltf_document.cpp
+++ b/modules/gltf/gltf_document.cpp
@@ -4338,12 +4338,12 @@ Error GLTFDocument::_create_skeletons(Ref state) {
for (GLTFSkeletonIndex skel_i = 0; skel_i < state->skeletons.size(); ++skel_i) {
Ref gltf_skeleton = state->skeletons.write[skel_i];
- Skeleton3D *skeleton = memnew(Skeleton3D);
+ Skeleton *skeleton = memnew(Skeleton);
gltf_skeleton->godot_skeleton = skeleton;
state->skeleton3d_to_gltf_skeleton[skeleton->get_instance_id()] = skel_i;
// Make a unique name, no gltf node represents this skeleton
- skeleton->set_name(_gen_unique_name(state, "Skeleton3D"));
+ skeleton->set_name(_gen_unique_name(state, "Skeleton"));
List bones;
@@ -5077,10 +5077,10 @@ void GLTFDocument::_assign_scene_names(Ref state) {
}
}
-BoneAttachment3D *GLTFDocument::_generate_bone_attachment(Ref state, Skeleton3D *skeleton, const GLTFNodeIndex node_index, const GLTFNodeIndex bone_index) {
+BoneAttachment *GLTFDocument::_generate_bone_attachment(Ref state, Skeleton *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);
+ BoneAttachment *bone_attachment = memnew(BoneAttachment);
print_verbose("glTF: Creating bone attachment for: " + gltf_node->get_name());
ERR_FAIL_COND_V(!bone_node->joint, nullptr);
@@ -5164,32 +5164,32 @@ Node3D *GLTFDocument::_generate_light(Ref state, const GLTFNodeIndex
}
if (l->light_type == "directional") {
- DirectionalLight3D *light = memnew(DirectionalLight3D);
- light->set_param(Light3D::PARAM_ENERGY, intensity);
+ DirectionalLight *light = memnew(DirectionalLight);
+ light->set_param(Light::PARAM_ENERGY, intensity);
light->set_color(l->color);
return light;
}
const float range = CLAMP(l->range, 0, 4096);
if (l->light_type == "point") {
- OmniLight3D *light = memnew(OmniLight3D);
- light->set_param(OmniLight3D::PARAM_ENERGY, intensity);
- light->set_param(OmniLight3D::PARAM_RANGE, range);
+ OmniLight *light = memnew(OmniLight);
+ light->set_param(OmniLight::PARAM_ENERGY, intensity);
+ light->set_param(OmniLight::PARAM_RANGE, range);
light->set_color(l->color);
return light;
}
if (l->light_type == "spot") {
- SpotLight3D *light = memnew(SpotLight3D);
- light->set_param(SpotLight3D::PARAM_ENERGY, intensity);
- light->set_param(SpotLight3D::PARAM_RANGE, range);
- light->set_param(SpotLight3D::PARAM_SPOT_ANGLE, Math::rad2deg(l->outer_cone_angle));
+ SpotLight *light = memnew(SpotLight);
+ light->set_param(SpotLight::PARAM_ENERGY, intensity);
+ light->set_param(SpotLight::PARAM_RANGE, range);
+ light->set_param(SpotLight::PARAM_SPOT_ANGLE, Math::rad2deg(l->outer_cone_angle));
light->set_color(l->color);
// Line of best fit derived from guessing, see https://www.desmos.com/calculator/biiflubp8b
// The points in desmos are not exact, except for (1, infinity).
float angle_ratio = l->inner_cone_angle / l->outer_cone_angle;
float angle_attenuation = 0.2 / (1 - angle_ratio) - 0.1;
- light->set_param(SpotLight3D::PARAM_SPOT_ATTENUATION, angle_attenuation);
+ light->set_param(SpotLight::PARAM_SPOT_ATTENUATION, angle_attenuation);
return light;
}
return memnew(Node3D);
@@ -5230,31 +5230,31 @@ GLTFCameraIndex GLTFDocument::_convert_camera(Ref state, Camera3D *p_
return camera_index;
}
-GLTFLightIndex GLTFDocument::_convert_light(Ref state, Light3D *p_light) {
+GLTFLightIndex GLTFDocument::_convert_light(Ref state, Light *p_light) {
print_verbose("glTF: Converting light: " + p_light->get_name());
Ref l;
l.instantiate();
l->color = p_light->get_color();
- if (cast_to(p_light)) {
+ if (cast_to(p_light)) {
l->light_type = "directional";
- DirectionalLight3D *light = cast_to(p_light);
- l->intensity = light->get_param(DirectionalLight3D::PARAM_ENERGY);
+ DirectionalLight *light = cast_to(p_light);
+ l->intensity = light->get_param(DirectionalLight::PARAM_ENERGY);
l->range = FLT_MAX; // Range for directional lights is infinite in Godot.
- } else if (cast_to(p_light)) {
+ } else if (cast_to(p_light)) {
l->light_type = "point";
- OmniLight3D *light = cast_to(p_light);
- l->range = light->get_param(OmniLight3D::PARAM_RANGE);
- l->intensity = light->get_param(OmniLight3D::PARAM_ENERGY);
- } else if (cast_to(p_light)) {
+ OmniLight *light = cast_to(p_light);
+ l->range = light->get_param(OmniLight::PARAM_RANGE);
+ l->intensity = light->get_param(OmniLight::PARAM_ENERGY);
+ } else if (cast_to(p_light)) {
l->light_type = "spot";
- SpotLight3D *light = cast_to(p_light);
- l->range = light->get_param(SpotLight3D::PARAM_RANGE);
- l->intensity = light->get_param(SpotLight3D::PARAM_ENERGY);
- l->outer_cone_angle = Math::deg2rad(light->get_param(SpotLight3D::PARAM_SPOT_ANGLE));
+ SpotLight *light = cast_to(p_light);
+ l->range = light->get_param(SpotLight::PARAM_RANGE);
+ l->intensity = light->get_param(SpotLight::PARAM_ENERGY);
+ l->outer_cone_angle = Math::deg2rad(light->get_param(SpotLight::PARAM_SPOT_ANGLE));
// This equation is the inverse of the import equation (which has a desmos link).
- float angle_ratio = 1 - (0.2 / (0.1 + light->get_param(SpotLight3D::PARAM_SPOT_ATTENUATION)));
+ float angle_ratio = 1 - (0.2 / (0.1 + light->get_param(SpotLight::PARAM_SPOT_ATTENUATION)));
angle_ratio = MAX(0, angle_ratio);
l->inner_cone_angle = l->outer_cone_angle * angle_ratio;
}
@@ -5295,17 +5295,17 @@ void GLTFDocument::_convert_scene_node(Ref state, Node *p_current, co
if (cast_to(p_current)) {
MeshInstance3D *mi = cast_to(p_current);
_convert_mesh_instance_to_gltf(mi, state, gltf_node);
- } else if (cast_to(p_current)) {
- BoneAttachment3D *bone = cast_to(p_current);
+ } else if (cast_to(p_current)) {
+ BoneAttachment *bone = cast_to(p_current);
_convert_bone_attachment_to_gltf(bone, state, p_gltf_parent, p_gltf_root, gltf_node);
return;
- } else if (cast_to(p_current)) {
- Skeleton3D *skel = cast_to(p_current);
+ } else if (cast_to(p_current)) {
+ Skeleton *skel = cast_to(p_current);
_convert_skeleton_to_gltf(skel, state, p_gltf_parent, p_gltf_root, gltf_node);
// We ignore the Godot Engine node that is the skeleton.
return;
- } else if (cast_to(p_current)) {
- MultiMeshInstance3D *multi = cast_to(p_current);
+ } else if (cast_to(p_current)) {
+ MultiMeshInstance *multi = cast_to(p_current);
_convert_multi_mesh_instance_to_gltf(multi, p_gltf_parent, p_gltf_root, gltf_node, state);
#ifdef MODULE_CSG_ENABLED
} else if (cast_to(p_current)) {
@@ -5322,8 +5322,8 @@ void GLTFDocument::_convert_scene_node(Ref state, Node *p_current, co
} else if (cast_to(p_current)) {
Camera3D *camera = Object::cast_to(p_current);
_convert_camera_to_gltf(camera, state, gltf_node);
- } else if (cast_to(p_current)) {
- Light3D *light = Object::cast_to(p_current);
+ } else if (cast_to(p_current)) {
+ Light *light = Object::cast_to(p_current);
_convert_light_to_gltf(light, state, gltf_node);
} else if (cast_to(p_current)) {
AnimationPlayer *animation_player = Object::cast_to(p_current);
@@ -5423,7 +5423,7 @@ void GLTFDocument::_convert_camera_to_gltf(Camera3D *camera, Ref stat
}
}
-void GLTFDocument::_convert_light_to_gltf(Light3D *light, Ref state, Ref gltf_node) {
+void GLTFDocument::_convert_light_to_gltf(Light *light, Ref state, Ref gltf_node) {
ERR_FAIL_COND(!light);
GLTFLightIndex light_index = _convert_light(state, light);
if (light_index != -1) {
@@ -5462,7 +5462,7 @@ void GLTFDocument::_convert_grid_map_to_gltf(GridMap *p_grid_map, GLTFNodeIndex
#endif // MODULE_GRIDMAP_ENABLED
void GLTFDocument::_convert_multi_mesh_instance_to_gltf(
- MultiMeshInstance3D *p_multi_mesh_instance,
+ MultiMeshInstance *p_multi_mesh_instance,
GLTFNodeIndex p_parent_node_index,
GLTFNodeIndex p_root_node_index,
Ref gltf_node, Ref state) {
@@ -5530,8 +5530,8 @@ void GLTFDocument::_convert_multi_mesh_instance_to_gltf(
}
}
-void GLTFDocument::_convert_skeleton_to_gltf(Skeleton3D *p_skeleton3d, Ref state, GLTFNodeIndex p_parent_node_index, GLTFNodeIndex p_root_node_index, Ref gltf_node) {
- Skeleton3D *skeleton = p_skeleton3d;
+void GLTFDocument::_convert_skeleton_to_gltf(Skeleton *p_skeleton3d, Ref state, GLTFNodeIndex p_parent_node_index, GLTFNodeIndex p_root_node_index, Ref gltf_node) {
+ Skeleton *skeleton = p_skeleton3d;
Ref gltf_skeleton;
gltf_skeleton.instantiate();
// GLTFSkeleton is only used to hold internal state data. It will not be written to the document.
@@ -5584,13 +5584,13 @@ void GLTFDocument::_convert_skeleton_to_gltf(Skeleton3D *p_skeleton3d, Ref state, GLTFNodeIndex p_parent_node_index, GLTFNodeIndex p_root_node_index, Ref gltf_node) {
- Skeleton3D *skeleton;
+void GLTFDocument::_convert_bone_attachment_to_gltf(BoneAttachment *p_bone_attachment, Ref state, GLTFNodeIndex p_parent_node_index, GLTFNodeIndex p_root_node_index, Ref gltf_node) {
+ Skeleton *skeleton;
// Note that relative transforms to external skeletons and pose overrides are not supported.
if (p_bone_attachment->get_use_external_skeleton()) {
- skeleton = cast_to(p_bone_attachment->get_node_or_null(p_bone_attachment->get_external_skeleton()));
+ skeleton = cast_to(p_bone_attachment->get_node_or_null(p_bone_attachment->get_external_skeleton()));
} else {
- skeleton = cast_to(p_bone_attachment->get_parent());
+ skeleton = cast_to(p_bone_attachment->get_parent());
}
GLTFSkeletonIndex skel_gltf_i = -1;
if (skeleton != nullptr && state->skeleton3d_to_gltf_skeleton.has(skeleton->get_instance_id())) {
@@ -5633,20 +5633,20 @@ void GLTFDocument::_generate_scene_node(Ref state, Node *scene_parent
Node3D *current_node = nullptr;
// Is our parent a skeleton
- Skeleton3D *active_skeleton = Object::cast_to(scene_parent);
+ Skeleton *active_skeleton = Object::cast_to(scene_parent);
const bool non_bone_parented_to_skeleton = active_skeleton;
// 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);
+ BoneAttachment *bone_attachment = _generate_bone_attachment(state, active_skeleton, node_index, gltf_node->parent);
scene_parent->add_child(bone_attachment, true);
bone_attachment->set_owner(scene_root);
// There is no gltf_node that represent this, so just directly create a unique name
- bone_attachment->set_name(_gen_unique_name(state, "BoneAttachment3D"));
+ bone_attachment->set_name(_gen_unique_name(state, "BoneAttachment"));
// We change the scene_parent to our bone attachment now. We do not set current_node because we want to make the node
// and attach it to the bone_attachment
@@ -5683,22 +5683,22 @@ void GLTFDocument::_generate_skeleton_bone_node(Ref state, Node *scen
Node3D *current_node = nullptr;
- Skeleton3D *skeleton = state->skeletons[gltf_node->skeleton]->godot_skeleton;
+ Skeleton *skeleton = state->skeletons[gltf_node->skeleton]->godot_skeleton;
// In this case, this node is already a bone in skeleton.
const bool is_skinned_mesh = (gltf_node->skin >= 0 && gltf_node->mesh >= 0);
const bool requires_extra_node = (gltf_node->mesh >= 0 || gltf_node->camera >= 0 || gltf_node->light >= 0);
- Skeleton3D *active_skeleton = Object::cast_to(scene_parent);
+ Skeleton *active_skeleton = Object::cast_to(scene_parent);
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);
+ BoneAttachment *bone_attachment = _generate_bone_attachment(state, active_skeleton, node_index, gltf_node->parent);
scene_parent->add_child(bone_attachment, true);
bone_attachment->set_owner(scene_root);
// There is no gltf_node that represent this, so just directly create a unique name
- bone_attachment->set_name(_gen_unique_name(state, "BoneAttachment3D"));
+ bone_attachment->set_name(_gen_unique_name(state, "BoneAttachment"));
// We change the scene_parent to our bone attachment now. We do not set current_node because we want to make the node
// and attach it to the bone_attachment
@@ -5720,13 +5720,13 @@ 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);
+ BoneAttachment *bone_attachment = _generate_bone_attachment(state, active_skeleton, node_index, node_index);
scene_parent->add_child(bone_attachment, true);
bone_attachment->set_owner(scene_root);
// There is no gltf_node that represent this, so just directly create a unique name
- bone_attachment->set_name(_gen_unique_name(state, "BoneAttachment3D"));
+ bone_attachment->set_name(_gen_unique_name(state, "BoneAttachment"));
// We change the scene_parent to our bone attachment now. We do not set current_node because we want to make the node
// and attach it to the bone_attachment
@@ -5915,7 +5915,7 @@ void GLTFDocument::_import_animation(Ref state, AnimationPlayer *ap,
node_path = root->get_path_to(node_element->value);
if (gltf_node->skeleton >= 0) {
- const Skeleton3D *sk = state->skeletons[gltf_node->skeleton]->godot_skeleton;
+ const Skeleton *sk = state->skeletons[gltf_node->skeleton]->godot_skeleton;
ERR_FAIL_COND(sk == nullptr);
const String path = ap->get_parent()->get_path_to(sk);
@@ -6135,7 +6135,7 @@ void GLTFDocument::_convert_mesh_instances(Ref state) {
node->rotation = mi_xform.basis.get_rotation_quaternion();
node->position = mi_xform.origin;
- Skeleton3D *skeleton = Object::cast_to(mi->get_node(mi->get_skeleton_path()));
+ Skeleton *skeleton = Object::cast_to(mi->get_node(mi->get_skeleton_path()));
if (!skeleton) {
continue;
}
@@ -6149,9 +6149,9 @@ void GLTFDocument::_convert_mesh_instances(Ref state) {
NodePath skeleton_path = mi->get_skeleton_path();
Node *skel_node = mi->get_node_or_null(skeleton_path);
- Skeleton3D *godot_skeleton = nullptr;
+ Skeleton *godot_skeleton = nullptr;
if (skel_node != nullptr) {
- godot_skeleton = cast_to(skel_node);
+ godot_skeleton = cast_to(skel_node);
}
if (godot_skeleton != nullptr && state->skeleton3d_to_gltf_skeleton.has(godot_skeleton->get_instance_id())) {
// This is a skinned mesh. If the mesh has no ARRAY_WEIGHTS or ARRAY_BONES, it will be invisible.
@@ -6264,7 +6264,7 @@ void GLTFDocument::_process_mesh_instances(Ref state, Node *scene_roo
const GLTFSkeletonIndex skel_i = state->skins.write[node->skin]->skeleton;
Ref gltf_skeleton = state->skeletons.write[skel_i];
- Skeleton3D *skeleton = gltf_skeleton->godot_skeleton;
+ Skeleton *skeleton = gltf_skeleton->godot_skeleton;
ERR_CONTINUE_MSG(skeleton == nullptr, vformat("Unable to find Skeleton for node %d skin %d", node_i, skin_i));
mi->get_parent()->remove_child(mi);
@@ -6557,10 +6557,10 @@ void GLTFDocument::_convert_animation(Ref state, AnimationPlayer *ap,
const NodePath node_path = node;
const String suffix = node_suffix[1];
Node *godot_node = ap->get_parent()->get_node_or_null(node_path);
- Skeleton3D *skeleton = nullptr;
+ Skeleton *skeleton = nullptr;
GLTFSkeletonIndex skeleton_gltf_i = -1;
for (GLTFSkeletonIndex skeleton_i = 0; skeleton_i < state->skeletons.size(); skeleton_i++) {
- if (state->skeletons[skeleton_i]->godot_skeleton == cast_to(godot_node)) {
+ if (state->skeletons[skeleton_i]->godot_skeleton == cast_to(godot_node)) {
skeleton = state->skeletons[skeleton_i]->godot_skeleton;
skeleton_gltf_i = skeleton_i;
ERR_CONTINUE(!skeleton);
diff --git a/modules/gltf/gltf_document.h b/modules/gltf/gltf_document.h
index 403ac077e..175080cbb 100644
--- a/modules/gltf/gltf_document.h
+++ b/modules/gltf/gltf_document.h
@@ -182,8 +182,8 @@ private:
Error _parse_lights(Ref state);
Error _parse_animations(Ref state);
Error _serialize_animations(Ref state);
- BoneAttachment3D *_generate_bone_attachment(Ref state,
- Skeleton3D *skeleton,
+ BoneAttachment *_generate_bone_attachment(Ref state,
+ Skeleton *skeleton,
const GLTFNodeIndex node_index,
const GLTFNodeIndex bone_index);
ImporterMeshInstance3D *_generate_mesh_instance(Ref state, const GLTFNodeIndex node_index);
@@ -305,8 +305,8 @@ public:
const GLTFAnimationIndex index, const int bake_fps);
void _convert_mesh_instances(Ref state);
GLTFCameraIndex _convert_camera(Ref state, Camera3D *p_camera);
- void _convert_light_to_gltf(Light3D *light, Ref state, Ref gltf_node);
- GLTFLightIndex _convert_light(Ref state, Light3D *p_light);
+ void _convert_light_to_gltf(Light *light, Ref state, Ref gltf_node);
+ GLTFLightIndex _convert_light(Ref state, Light *p_light);
void _convert_spatial(Ref state, Node3D *p_spatial, Ref p_node);
void _convert_scene_node(Ref state, Node *p_current,
const GLTFNodeIndex p_gltf_current,
@@ -338,16 +338,16 @@ public:
Ref gltf_node, Ref state);
#endif // MODULE_GRIDMAP_ENABLED
void _convert_multi_mesh_instance_to_gltf(
- MultiMeshInstance3D *p_multi_mesh_instance,
+ MultiMeshInstance *p_multi_mesh_instance,
GLTFNodeIndex p_parent_node_index,
GLTFNodeIndex p_root_node_index,
Ref gltf_node, Ref state);
void _convert_skeleton_to_gltf(
- Skeleton3D *p_scene_parent, Ref state,
+ Skeleton *p_scene_parent, Ref state,
GLTFNodeIndex p_parent_node_index,
GLTFNodeIndex p_root_node_index,
Ref gltf_node);
- void _convert_bone_attachment_to_gltf(BoneAttachment3D *p_bone_attachment,
+ void _convert_bone_attachment_to_gltf(BoneAttachment *p_bone_attachment,
Ref state,
GLTFNodeIndex p_parent_node_index,
GLTFNodeIndex p_root_node_index,
diff --git a/modules/gltf/structures/gltf_skeleton.cpp b/modules/gltf/structures/gltf_skeleton.cpp
index 90a6b0f50..1bd342091 100644
--- a/modules/gltf/structures/gltf_skeleton.cpp
+++ b/modules/gltf/structures/gltf_skeleton.cpp
@@ -68,7 +68,7 @@ void GLTFSkeleton::set_roots(Vector p_roots) {
roots = p_roots;
}
-Skeleton3D *GLTFSkeleton::get_godot_skeleton() {
+Skeleton *GLTFSkeleton::get_godot_skeleton() {
return godot_skeleton;
}
@@ -88,7 +88,7 @@ void GLTFSkeleton::set_godot_bone_node(Dictionary p_indict) {
GLTFTemplateConvert::set_from_dict(godot_bone_node, p_indict);
}
-BoneAttachment3D *GLTFSkeleton::get_bone_attachment(int idx) {
+BoneAttachment *GLTFSkeleton::get_bone_attachment(int idx) {
ERR_FAIL_INDEX_V(idx, bone_attachments.size(), nullptr);
return bone_attachments[idx];
}
diff --git a/modules/gltf/structures/gltf_skeleton.h b/modules/gltf/structures/gltf_skeleton.h
index 618849f10..5249f8b88 100644
--- a/modules/gltf/structures/gltf_skeleton.h
+++ b/modules/gltf/structures/gltf_skeleton.h
@@ -46,15 +46,15 @@ private:
// same parent (ie roots are siblings)
Vector roots;
- // The created Skeleton3D for the scene
- Skeleton3D *godot_skeleton = nullptr;
+ // The created Skeleton for the scene
+ Skeleton *godot_skeleton = nullptr;
// Set of unique bone names for the skeleton
HashSet unique_names;
HashMap godot_bone_node;
- Vector bone_attachments;
+ Vector bone_attachments;
protected:
static void _bind_methods();
@@ -66,7 +66,7 @@ public:
Vector get_roots();
void set_roots(Vector p_roots);
- Skeleton3D *get_godot_skeleton();
+ Skeleton *get_godot_skeleton();
// Skeleton *get_godot_skeleton() {
// return this->godot_skeleton;
@@ -94,7 +94,7 @@ public:
// VariantConversion::set_from_dict(this->godot_bone_node, p_indict);
//}
- BoneAttachment3D *get_bone_attachment(int idx);
+ BoneAttachment *get_bone_attachment(int idx);
int32_t get_bone_attachment_count();
};