feat(autoseg): reapply palette colors to existing objects#83
Merged
Conversation
Objects imported before the autoseg color features baked their colors in at import time, so they never pick up the current colorblind-safe default (or a custom) palette. Add "Reapply autoseg colors..." to the object-list / object context menu to push the CURRENT palette + seed back onto selected objects. - palette.py: AUTOSEG_TRACE_PREFIX (single source of truth for the "autoseg_<id>" import naming), label_id_from_name (recovers the label id from an unmodified import name), and palette_color_for_name (reproduces the exact import color for a parseable name; falls back to a stable, PYTHONHASHSEED- independent zlib.crc32 hash of the name otherwise). conversions.py now builds import names from the shared prefix so the two stay in sync. - series.reapplyAutosegColors: resolves the palette/seed and per-object color once, then rewrites colors through the normal per-section editTraceAttributes path over only the sections the objects appear on -- one undoable operation, correct list/field refresh (reuses the #69 stale-render funnel), no per-object full-series scans. - GUI action goes through the existing object_function wrapper, so locked objects are blocked exactly as any other bulk attribute edit, and a confirm dialog warns before existing colors are discarded (undo restores them). Selection is the contract: it composes with the regex/group/invert filters, so "select all autoseg_* then reapply" works without guessing a name pattern. Tests: id-parse + hash-fallback determinism, custom palette/seed respected, recolor matches a fresh import, distinct ids stay distinct, single undo restores every prior color across sections, zero-selection no-op. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
dustenhubbard
enabled auto-merge (squash)
July 19, 2026 20:00
dustenhubbard
added a commit
that referenced
this pull request
Jul 23, 2026
Objects imported before the autoseg color features baked their colors in at import time, so they never pick up the current colorblind-safe default (or a custom) palette. Add "Reapply autoseg colors..." to the object-list / object context menu to push the CURRENT palette + seed back onto selected objects. - palette.py: AUTOSEG_TRACE_PREFIX (single source of truth for the "autoseg_<id>" import naming), label_id_from_name (recovers the label id from an unmodified import name), and palette_color_for_name (reproduces the exact import color for a parseable name; falls back to a stable, PYTHONHASHSEED- independent zlib.crc32 hash of the name otherwise). conversions.py now builds import names from the shared prefix so the two stay in sync. - series.reapplyAutosegColors: resolves the palette/seed and per-object color once, then rewrites colors through the normal per-section editTraceAttributes path over only the sections the objects appear on -- one undoable operation, correct list/field refresh (reuses the #69 stale-render funnel), no per-object full-series scans. - GUI action goes through the existing object_function wrapper, so locked objects are blocked exactly as any other bulk attribute edit, and a confirm dialog warns before existing colors are discarded (undo restores them). Selection is the contract: it composes with the regex/group/invert filters, so "select all autoseg_* then reapply" works without guessing a name pattern. Tests: id-parse + hash-fallback determinism, custom palette/seed respected, recolor matches a fresh import, distinct ids stay distinct, single undo restores every prior color across sections, zero-selection no-op.
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 the retroactivity gap in the autoseg color features (#80/#82): series imported before those changes can now be brought onto the current palette.
autoseg_<id>naming (import and recolor now share a hoisted prefix constant so they can't drift); renamed objects fall back to a crc32 name hash (deterministic across runs, unlike builtin hash).editTraceAttributesbulk path: ONE undo restores every prior color across all sections; render freshness covered by the fix(render): refresh trace render when a trace's attributes change #69 fix; per-object color map computed once, sections scoped via getObjectSections.15 new tests; suite 1234 passed, 5 pre-existing xfails.
🤖 Generated with Claude Code