You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-31 18:41:20 +00:00
Merge pull request #113176 from xuhuisheng/dev/ske-mod-error
Fix empty 2D skeleton modification keeps printing error messages
This commit is contained in:
@@ -253,6 +253,9 @@ void SkeletonModification2DCCDIK::_draw_editor_gizmo() {
|
||||
if (!ccdik_data_chain[i].editor_draw_gizmo) {
|
||||
continue;
|
||||
}
|
||||
if (ccdik_data_chain[i].bone_idx < 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Bone2D *operation_bone = stack->skeleton->get_bone(ccdik_data_chain[i].bone_idx);
|
||||
editor_draw_angle_constraints(operation_bone, ccdik_data_chain[i].constraint_angle_min, ccdik_data_chain[i].constraint_angle_max,
|
||||
|
||||
@@ -180,7 +180,7 @@ void SkeletonModification2DLookAt::_setup_modification(SkeletonModificationStack
|
||||
}
|
||||
|
||||
void SkeletonModification2DLookAt::_draw_editor_gizmo() {
|
||||
if (!enabled || !is_setup) {
|
||||
if (!enabled || !is_setup || bone_idx < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ void SkeletonModification2DTwoBoneIK::_setup_modification(SkeletonModificationSt
|
||||
}
|
||||
|
||||
void SkeletonModification2DTwoBoneIK::_draw_editor_gizmo() {
|
||||
if (!enabled || !is_setup) {
|
||||
if (!enabled || !is_setup || joint_one_bone_idx < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user