Repository navigation
fix: 読み込む単位 Prefabs で、prefab が使っていない FBX の部品を隠す (#151) - #153
Merged
Merged
Conversation
Japanese Train Station PBR Pack では駅の部品 54 個が 1 つの FBX にまとまっていて、 prefab は MeshFilter でそのうち 1〜3 個だけを指している。Scenes 単位には表に無いメッシュを 隠す処理(#58)があるが、Prefabs 単位には無く、どの prefab にも 54 個すべてが表示されていた。 Prefabs 単位でも、prefab がモデルを丸ごと置いていない(モデルの PrefabInstance の配置が無い) 場合は、表に無いメッシュを隠し、件数を Scenes 単位と同じ文言で警告に出す。 - core/hierarchy.py: Renderer から作った配置かの判定を built_from_renderers にまとめ、 parts_to_hide と共用する - core/prefab.py: models_placed_whole と unused_parts を追加。tables_from_hierarchy は 求めた配置を受け取れるようにし、prepare_package で配置を 1 回だけ求める - core/scene_import.py: 文言を unused_warning に切り出し、prefab 用の prefab_warnings を追加 - 合成パッケージの Partial.prefab(Spike だけを使う)を Prefabs 単位の期待値に加えた バージョンは 1.12.0 の開発を始めるので 1.12.0-dev.1 にする(#152 の機能追加と一緒に出す)。 Closes #151 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.
Closes #151
変更内容
読み込む単位 Prefabs で、prefab がモデルを丸ごと置いていない(Renderer からだけ使っている)場合に、表に無い FBX の部品を隠すようにした。Scenes 単位の #58 と同じ扱いで、件数も同じ文言で警告に出す。モデルの PrefabInstance として FBX を丸ごと置いている prefab では、FBX の全部品が Unity にあるので隠さない。
core/hierarchy.py: Renderer から作った配置かの判定をbuilt_from_renderersにまとめ、parts_to_hideと共用するcore/prefab.py:models_placed_whole/unused_partsを追加。tables_from_hierarchyは求めた配置を受け取れるようにしたcore/scene_import.py: 文言をunused_warningに切り出し、prefab_warningsを追加1.12.0-dev.1にした確認
Partial.prefab(Spike だけを使う)を Prefabs 単位の期待値に追加手動確認の手順
ts_fix_doorなどを選んで Import するこのブランチ単体では、使われていない部品は「隠す」だけで、オブジェクトとしては残ります(読み込まないオプションは #152 で追加します)。
🤖 Generated with Claude Code