Skip to content

feat: flag skinned-mesh part-tracking targets - #299

Merged
MasamiYitsuse merged 2 commits into
developfrom
part-tracking-skinned-warning
Sep 2, 2026
Merged

feat: flag skinned-mesh part-tracking targets#299
MasamiYitsuse merged 2 commits into
developfrom
part-tracking-skinned-warning

Conversation

@MasamiYitsuse

Copy link
Copy Markdown
Collaborator

What

Part tracking (SpriteStudioPartAttachment2D) could target a skinned (bone-bound) mesh part, which tracks poorly: the vertices are drawn by bone skinning while the part's own transform stays near the setup node position (usually the character root), so the follower snaps near the root rather than onto the visible art. The behaviour is correct (the node is followed faithfully) but picking such a part is an easy mistake.

Surfaced in SSPlayerForUnity's QA and confirmed as a shared libssruntime trait across every sibling player. This is the Godot-side handling.

Changes

  • New query API SpriteStudioPlayer2D.is_part_skinned_mesh(part_name) — backed by a binary-property cache in SsInternalPlayer (built once in _rebuild_part_index_map, alongside the part names). Judged by PartMeshBinding.influence_bone length > 0, the same test every sibling player uses, so the flag agrees across engines.
  • Dropdown guard — the part_name inspector dropdown now omits skinned-mesh parts. It stays ENUM_SUGGESTION, so a name can still be typed by hand for the rare deliberate case. Rigid (deform-only) meshes track faithfully and remain selectable.
  • Configuration warning — when part_name resolves to a skinned mesh (e.g. typed by hand), the node shows a non-blocking ⚠ in the Scene dock pointing at the NULL-part workaround. Tracking is never blocked.
  • Docs — the Part Tracking guide (en/ja) documents the limitation, the NULL-part workaround, and the dropdown/warning behaviour.

Notes

  • No SDK / runtime / FFI change; the flag is read from the ssab the C++ side already holds.
  • The drivePosition/driveRotation OFF regression seen in Unity does not apply here: SpriteStudioPartAttachment2D is a node, so adding it runs the C++ constructor and the update_position/update_rotation defaults take effect. No code change needed.
  • Verified: GDExtension build (build-extension.ps1) passes; skinned-mesh dropdown/warning checked visually in the editor.

https://claude.ai/code/session_01JsXPn69XiQoSonP8q68CiQ

YITSUSE, Masami added 2 commits September 2, 2026 20:02
A bone-skinned mesh part draws its vertices by skinning while its own
transform stays near the setup pose, so following it snaps the target
near the character root rather than onto the visible art. The node is
followed faithfully (the behaviour is correct), but picking such a part
is an easy mistake.

- add SpriteStudioPlayer2D::is_part_skinned_mesh(part_name), backed by a
  binary-property cache in SsInternalPlayer (PartMeshBinding influence
  bone count > 0 -- the same test every sibling player uses)
- drop skinned-mesh parts from the SpriteStudioPartAttachment2D part_name
  dropdown (still typable by hand for the rare deliberate case)
- add a non-blocking configuration warning when part_name resolves to a
  skinned mesh, pointing at the NULL-part workaround
- document the limitation in the Part Tracking guide (en/ja)

Rigid (deform-only) meshes track faithfully and stay selectable.

Claude-Session: https://claude.ai/code/session_01JsXPn69XiQoSonP8q68CiQ
The part-tracking guide already noted that skinned meshes track poorly;
say what the editor does about it: the part_name dropdown omits skinned
meshes (reachable only by typing a name by hand), and a name that does
resolve to one raises the node's configuration warning. Rigid
(deform-only) meshes stay in the dropdown and raise no warning.

Claude-Session: https://claude.ai/code/session_01JsXPn69XiQoSonP8q68CiQ
@MasamiYitsuse
MasamiYitsuse merged commit 1787431 into develop Sep 2, 2026
0 of 2 checks passed
@MasamiYitsuse
MasamiYitsuse deleted the part-tracking-skinned-warning branch September 2, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant