Repository navigation
1.18.0 のリファクタ: NLA の共通処理とアーマチュアのまとめを分ける - #282
Merged
Merged
Conversation
- .anim(animation.py)とモデルのテイク(fbx_motion.py)に同じ形であった _add_track を nla.add_track の 1 つにした。 loop_strip・set_strip_range・copy_track と Animation のオプションの値(MODE_*)も nla.py に移し、 .anim の側が fbx_motion を import しなくて済むようにした。 - fbx_motion.py の後半(motion_rigs・merge_motion_rigs・retarget_action など)を rig_merge.py に分けた。 fbx_motion.py はテイクをクリップに分けて並べる処理だけになった。 あわせて直した不具合: .anim の側の _add_track は、トラックを足してから「ミュートでないトラックがあるか」を見ていた。 新しいトラックはミュートされていない状態で作られるので自分自身が数に入り、Animation を Active にしても .anim の トラックのミュートが外れていなかった。nla.add_track は足す前に数える(FBX の側と同じ順)。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
expectations_synthetic_anim_active.json を足した。リファクタ前のコードでは、5 つの対象のすべてで ミュートが外れておらず、このテストが落ちることを確かめた。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #281 の対応です。#281 はリリース(release → main のマージ)のときに閉じます。
変更
blender/nla.py(新規): クリップを NLA に置く共通の処理です。.anim(animation.py)とモデルのテイク(fbx_motion.py)の両方に同じ形であった_add_trackを、add_trackの 1 つにしました。loop_strip・set_strip_range・copy_trackと、Animation のオプションの値(MODE_*)もここに移しました。blender/rig_merge.py(新規):fbx_motion.pyの後半を分けました。中身は、モーションだけのアーマチュアのまとめと、レストの違いの変換です(motion_rigs・merge_motion_rigs・retarget_actionなど)。fbx_motion.py: テイクをクリップに分けて並べる処理だけになりました(451 行 → 約 170 行)。あわせて直した不具合
.animの側では、トラックを足してから「ミュートでないトラックがあるか」を見ていました。新しいトラックはミュートされていない状態で作られるので、自分自身が数に入っていました。そのため、Animation を Active にしても.animのトラックのミュートが外れていませんでした。add_trackは、トラックを足す前に数えます(FBX の側と同じ順)。テスト
expectations_synthetic_anim_active.jsonを足しました。リファクタ前のコードでは 5 件が落ちることを確かめています。🤖 Generated with Claude Code