diff options
Diffstat (limited to 'scene/3d/bone_attachment_3d.cpp')
-rw-r--r-- | scene/3d/bone_attachment_3d.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/scene/3d/bone_attachment_3d.cpp b/scene/3d/bone_attachment_3d.cpp index 825cb39e2d..5e4b995aa1 100644 --- a/scene/3d/bone_attachment_3d.cpp +++ b/scene/3d/bone_attachment_3d.cpp @@ -31,12 +31,10 @@ #include "bone_attachment_3d.h" void BoneAttachment3D::_validate_property(PropertyInfo &property) const { - if (property.name == "bone_name") { Skeleton3D *parent = Object::cast_to<Skeleton3D>(get_parent()); if (parent) { - String names; for (int i = 0; i < parent->get_bone_count(); i++) { if (i > 0) @@ -47,7 +45,6 @@ void BoneAttachment3D::_validate_property(PropertyInfo &property) const { property.hint = PROPERTY_HINT_ENUM; property.hint_string = names; } else { - property.hint = PROPERTY_HINT_NONE; property.hint_string = ""; } @@ -55,10 +52,8 @@ void BoneAttachment3D::_validate_property(PropertyInfo &property) const { } void BoneAttachment3D::_check_bind() { - Skeleton3D *sk = Object::cast_to<Skeleton3D>(get_parent()); if (sk) { - int idx = sk->find_bone(bone_name); if (idx != -1) { sk->bind_child_node_to_bone(idx, this); @@ -69,12 +64,9 @@ void BoneAttachment3D::_check_bind() { } void BoneAttachment3D::_check_unbind() { - if (bound) { - Skeleton3D *sk = Object::cast_to<Skeleton3D>(get_parent()); if (sk) { - int idx = sk->find_bone(bone_name); if (idx != -1) { sk->unbind_child_node_from_bone(idx, this); @@ -85,7 +77,6 @@ void BoneAttachment3D::_check_unbind() { } void BoneAttachment3D::set_bone_name(const String &p_name) { - if (is_inside_tree()) _check_unbind(); @@ -96,20 +87,15 @@ void BoneAttachment3D::set_bone_name(const String &p_name) { } String BoneAttachment3D::get_bone_name() const { - return bone_name; } void BoneAttachment3D::_notification(int p_what) { - switch (p_what) { - case NOTIFICATION_ENTER_TREE: { - _check_bind(); } break; case NOTIFICATION_EXIT_TREE: { - _check_unbind(); } break; } |