Remove duplicate methods.

This commit is contained in:
Relintai 2022-08-08 17:31:56 +02:00
parent 2d2dfb6a84
commit 453c6cdda4

View File

@ -223,28 +223,6 @@ void BoneAttachment::_notification(int p_what) {
}
}
void BoneAttachment::_validate_property(PropertyInfo &property) const {
if (property.name == "bone_name") {
Skeleton *parent = Object::cast_to<Skeleton>(get_parent());
if (parent) {
String names;
for (int i = 0; i < parent->get_bone_count(); i++) {
if (i > 0) {
names += ",";
}
names += parent->get_bone_name(i);
}
property.hint = PROPERTY_HINT_ENUM;
property.hint_string = names;
} else {
property.hint = PROPERTY_HINT_NONE;
property.hint_string = "";
}
}
}
void BoneAttachment::_validate_property(PropertyInfo &property) const {
if (property.name == "bone_name") {
// Because it is a constant function, we cannot use the _get_skeleton_3d function.
@ -343,18 +321,6 @@ void BoneAttachment::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_external_skeleton"), &BoneAttachment::get_external_skeleton);
}
void BoneAttachment::_check_bind() {
Skeleton *sk = Object::cast_to<Skeleton>(get_parent());
if (sk) {
int idx = sk->find_bone(bone_name);
if (idx != -1) {
sk->bind_child_node_to_bone(idx, this);
set_transform(sk->get_bone_global_pose(idx));
bound = true;
}
}
}
void BoneAttachment::_check_bind() {
Skeleton *sk = _get_skeleton();