Describe how Prism handles OCIO context variables for context-dependent transforms.
- Canonical context state is owned by
MainWindow:self._ocio_context_values: dict[str, str]
- Variable names/defaults come from loaded OCIO config declarations (config environment variable names + defaults), not arbitrary OS env variable listing.
- Context UI is presentation/editor only:
ContextVariablesPanelandContextVariablesDockdo not own authoritative state.
Update lifecycle:
- User loads OCIO config.
- Main window extracts context variables/defaults.
- Main window stores canonical context mapping.
- Main window syncs dock/panel rows.
- User edits value in panel (
editingFinished). - Panel emits
context_values_changed. - Main window updates canonical mapping and refreshes processing.
View -> OCIO Context Variablestoggles dock visibility.- Dock starts hidden by default.
- Empty states:
- no config loaded:
No OCIO config loaded. - config with no variables:
No OCIO context variables detected.
- no config loaded:
- Hiding/closing dock does not discard canonical context state.
core.ocio_processor.build_ocio_processor(...)acceptscontext_values.- When provided, context string variables are set on OCIO context before processor creation.
- Processing behavior is then re-evaluated with the updated context mapping.
- Context handling must stay explicit and deterministic.
- OCIO/context logic should remain outside widget internals.
- UI edits should emit bounded events (on edit-finish) to avoid excessive rebuild churn.