mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +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:
commit
996c9a644e
3 changed files with 5 additions and 2 deletions
|
|
@ -253,6 +253,9 @@ void SkeletonModification2DCCDIK::_draw_editor_gizmo() {
|
||||||
if (!ccdik_data_chain[i].editor_draw_gizmo) {
|
if (!ccdik_data_chain[i].editor_draw_gizmo) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (ccdik_data_chain[i].bone_idx < 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Bone2D *operation_bone = stack->skeleton->get_bone(ccdik_data_chain[i].bone_idx);
|
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,
|
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() {
|
void SkeletonModification2DLookAt::_draw_editor_gizmo() {
|
||||||
if (!enabled || !is_setup) {
|
if (!enabled || !is_setup || bone_idx < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ void SkeletonModification2DTwoBoneIK::_setup_modification(SkeletonModificationSt
|
||||||
}
|
}
|
||||||
|
|
||||||
void SkeletonModification2DTwoBoneIK::_draw_editor_gizmo() {
|
void SkeletonModification2DTwoBoneIK::_draw_editor_gizmo() {
|
||||||
if (!enabled || !is_setup) {
|
if (!enabled || !is_setup || joint_one_bone_idx < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue