fix(import): add TINQS diagnostic logging to skeleton rest fixer
WARN_PRINT for each bone's before/after conversion values during Overwrite Axis reimport. Confirms animation keyframe conversion is running correctly — arms issue is downstream (animation content or mesh skinning), not the conversion formula. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -794,6 +794,14 @@ void PostImportPluginSkeletonRestFixer::internal_process(InternalImportCategory
|
||||
Quaternion new_rest_q = new_rest.basis.get_rotation_quaternion();
|
||||
Quaternion old_pg_q = old_pg.basis.get_rotation_quaternion();
|
||||
Quaternion new_pg_q = new_pg.basis.get_rotation_quaternion();
|
||||
|
||||
// [TINQS] Diagnostic: log before/after for first key.
|
||||
if (key_len > 0) {
|
||||
Quaternion bq = static_cast<Quaternion>(anim->track_get_key_value(i, 0));
|
||||
Quaternion aq = new_pg_q.inverse() * old_pg_q * bq * old_rest_q.inverse() * old_pg_q.inverse() * new_pg_q * new_rest_q;
|
||||
WARN_PRINT("[TINQS] " + String(bn) + " before=(" + String::num(bq.x,2) + "," + String::num(bq.y,2) + "," + String::num(bq.z,2) + "," + String::num(bq.w,2) + ") after=(" + String::num(aq.x,2) + "," + String::num(aq.y,2) + "," + String::num(aq.z,2) + "," + String::num(aq.w,2) + ")");
|
||||
}
|
||||
|
||||
for (int j = 0; j < key_len; j++) {
|
||||
Quaternion qt = static_cast<Quaternion>(anim->track_get_key_value(i, j));
|
||||
anim->track_set_key_value(i, j, new_pg_q.inverse() * old_pg_q * qt * old_rest_q.inverse() * old_pg_q.inverse() * new_pg_q * new_rest_q);
|
||||
|
||||
Reference in New Issue
Block a user