Skip to content

feat: four-corner part color override, cellmap/cell name queries - #246

Merged
Naruto merged 3 commits into
developfrom
feature/part-color-corners-and-name-queries
Jul 31, 2026
Merged

Naruto merged 3 commits into
developfrom
feature/part-color-corners-and-name-queries

Conversation

@Naruto

@Naruto Naruto commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Description

Three independent changes, all on the Godot player side.

1. Four-corner part color override. ss_runtime_set_part_color_override_corners has always been in the C API next to the single-color entry point, but only the single-color one was wrapped — a part could not be given a gradient. Adds set_part_color_override_corners(part_name, left_top, right_top, left_bottom, right_bottom, blend_op = 0, priority = 1) and its _by_index twin, passing the colors in the runtime's own lt, rt, lb, rb order.

Both entry points write the same per-part override slot, so the last call wins and the existing clear_part_color_override clears either kind. This is documented in the header, the class reference and the docs site. The color packing shared by both paths moved into pack_color_rgba so the two cannot drift apart.

ss_player.set_part_color_override_corners(
    "body", Color.RED, Color.RED, Color.BLUE, Color.BLUE, 0)

2. get_cellmap_names() / get_cell_names(cellmap_name) on the player. These are the discovery half of set_part_cell_override, and having them on the node saves the caller a round-trip through get_ssab_resource(). They forward to the bound SSABResource and return an empty array when none is assigned; the resource keeps its own copies for enumerating an .ssab that is not on a player yet.

3. Roadmap: the blending / crossfade item is removed. It was filed as blocked on SDK Phase 3, but the SDK shipped the whole-animation blend and crossfade primitives some time ago and the C API has carried them since (ss_runtime_add_blend_source / ss_runtime_crossfade / …). What kept the item from being actionable was never the SDK — the semantics a Godot-facing API would have to commit to (how sources of different lengths relate, whose events fire) are still open. Removed rather than left as a stale blocker; it can be re-filed once that design settles.

Also bumps the ss_player/SpriteStudio-SDK submodule to 427024d (SDK #336, "stop emitting the C++-only headers") — the follow-up to a3af9d5, which switched this repo to the SDK's C headers.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Verification

Build Result
GDExtension (scripts/build-extension.sh) pass
Custom module (scripts/build.sh) pass

Both configurations were built because get_cellmap_names / get_cell_names branch on SPRITESTUDIO_GODOT_EXTENSION (GDExtension returns PackedStringArray directly, the module copies out of Vector<String>), so each branch needed to be compiled at least once.

Not verified: the gradient has not been eyeballed in a running editor. examples/Override_Ringo gained a step that shows it — open that project and press Play to check step 2.

Note that pr.yml is expected to fail at checkout while the SDK submodule is private; this is the known CI blocker, not something this PR introduces.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Naruto added 3 commits July 31, 2026 19:07
The runtime has always exposed `ss_runtime_set_part_color_override_corners`
alongside the single-color entry point, but only the single-color one was
wrapped, so a part could not be given a gradient. Add
`set_part_color_override_corners` (and its `_by_index` twin), passing the
four colors in the runtime's own `lt, rt, lb, rb` order. Both entry points
write the same per-part override slot, so the last call wins and the
existing `clear_part_color_override` clears either kind.

Also forward `get_cellmap_names` / `get_cell_names` from the bound
`SSABResource` onto the player. These are the discovery half of
`set_part_cell_override`, and having them on the node saves the caller a
round-trip through `get_ssab_resource()`; the resource keeps its own copies
for enumerating an `.ssab` that is not on a player yet.

The color packing shared by both override paths moves into
`pack_color_rgba` so the two cannot drift apart.
It was filed as blocked on SDK Phase 3, but the SDK shipped the whole-
animation blend and crossfade primitives some time ago and the C API has
carried them since. What kept the item from being actionable was therefore
not the SDK: the semantics a Godot-facing API would have to commit to
(how sources of different lengths relate, whose events fire) are still
open. Remove it rather than leave a stale blocker, and re-file it once
that design settles.
@Naruto
Naruto merged commit 3481b67 into develop Jul 31, 2026
2 of 4 checks passed
@Naruto
Naruto deleted the feature/part-color-corners-and-name-queries branch July 31, 2026 11:09
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