feat: four-corner part color override, cellmap/cell name queries - #246
Merged
Merged
Conversation
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.
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.
Description
Three independent changes, all on the Godot player side.
1. Four-corner part color override.
ss_runtime_set_part_color_override_cornershas 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. Addsset_part_color_override_corners(part_name, left_top, right_top, left_bottom, right_bottom, blend_op = 0, priority = 1)and its_by_indextwin, passing the colors in the runtime's ownlt, rt, lb, rborder.Both entry points write the same per-part override slot, so the last call wins and the existing
clear_part_color_overrideclears either kind. This is documented in the header, the class reference and the docs site. The color packing shared by both paths moved intopack_color_rgbaso the two cannot drift apart.2.
get_cellmap_names()/get_cell_names(cellmap_name)on the player. These are the discovery half ofset_part_cell_override, and having them on the node saves the caller a round-trip throughget_ssab_resource(). They forward to the boundSSABResourceand return an empty array when none is assigned; the resource keeps its own copies for enumerating an.ssabthat 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-SDKsubmodule to427024d(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
Verification
scripts/build-extension.sh)scripts/build.sh)Both configurations were built because
get_cellmap_names/get_cell_namesbranch onSPRITESTUDIO_GODOT_EXTENSION(GDExtension returnsPackedStringArraydirectly, the module copies out ofVector<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_Ringogained a step that shows it — open that project and press Play to check step 2.Note that
pr.ymlis expected to fail at checkout while the SDK submodule is private; this is the known CI blocker, not something this PR introduces.Checklist