diff --git a/docs/adding-gui-settings.md b/docs/adding-gui-settings.md index e967cf6..a99bcf3 100644 --- a/docs/adding-gui-settings.md +++ b/docs/adding-gui-settings.md @@ -239,6 +239,29 @@ Settings flow through the system in this order: ### Testing After adding a setting: 1. Test CLI usage: `python -m clipper.yt_clipper --your-setting 50 markup.json` +2. For GUI-only tuning parameters (no CLI args) like `lgg_projection_gain` (an intensity multiplier for Lift/Gamma/Gain color wheel hue projection), ensure: + - Added to schema with empty `cli_args` list so it persists + - Added to `GeneralSettings` dataclass (`lgg_projection_gain: float = 1.5`) + - Consumed in frontend logic (e.g., passed into `buildLggFilterFromWheels`) + - UI control updates backend via `update_general_settings` API + +Example schema entry (general section): +```python +"lgg_projection_gain": { + "type": "number", + "description": "Intensity multiplier for Lift/Gamma/Gain color wheel hue projection (0.5-2.0)", + "min": 0.5, + "max": 2.0, + "default": 1.5, + "cli_args": [], +}, +``` + +Frontend usage snippet: +```ts +const projectionGain = settingsStore.generalSettings?.lgg_projection_gain ?? 1.5 +buildLggFilterFromWheels(wheelsInput, globalGamma, projectionGain) +``` 2. Test GUI usage: Verify setting appears in Settings Panel and persists when saved 3. Test processing: Ensure setting affects video output as expected 4. Test validation: Verify min/max ranges work in both CLI and GUI diff --git a/src/clipper/argparser.py b/src/clipper/argparser.py index ad1ac15..5668f31 100644 --- a/src/clipper/argparser.py +++ b/src/clipper/argparser.py @@ -678,6 +678,16 @@ def getSettingsSchema() -> Dict[str, Any]: "default": 5000, "cli_args": ["--cache-max-size-mb"], }, + # Color Grading / UI tuning (GUI only for now) + "lgg_projection_gain": { + "type": "number", + "description": "Intensity multiplier for Lift/Gamma/Gain color wheel hue projection (0.5-2.0)", + "min": 0.5, + "max": 2.0, + "default": 1.5, + # Intentionally no cli_args yet; internal GUI tuning parameter + "cli_args": [], + }, }, "video": { "video_title": { diff --git a/src/clipper/gui/settings_manager.py b/src/clipper/gui/settings_manager.py index 1ff3858..a2e7a2d 100644 --- a/src/clipper/gui/settings_manager.py +++ b/src/clipper/gui/settings_manager.py @@ -66,6 +66,10 @@ class GeneralSettings: cache_folder_path: str = "" cache_max_size_mb: int = 5000 + # === COLOR GRADING / UI TUNING === + # Multiplier applied to LGG color wheel hue projection (was hardcoded 1.5) + lgg_projection_gain: float = 1.5 + # === WINDOW OPTIONS === window_width: int = 1000 # Default window width window_height: int = 800 # Default window height diff --git a/src/gui-frontend/src/components/ColorControls.vue b/src/gui-frontend/src/components/ColorControls.vue index b052f7d..6373429 100644 --- a/src/gui-frontend/src/components/ColorControls.vue +++ b/src/gui-frontend/src/components/ColorControls.vue @@ -3,7 +3,7 @@
- +
Brightness
@@ -25,7 +25,7 @@
- +
+
+
Projection Gain + + + + +
+ +
Global Gamma
@@ -91,9 +111,11 @@