diff --git a/javascript/vec_cc.js b/javascript/vec_cc.js index c13b867..0e20b25 100644 --- a/javascript/vec_cc.js +++ b/javascript/vec_cc.js @@ -120,4 +120,18 @@ onUiLoaded(() => { VectorscopeCC.registerPicker(wheel, sliders, dot); }); + const config = document.getElementById("setting_cc_no_defaults").querySelector('input[type=checkbox]'); + if (config.checked) + return; + + setTimeout(() => { + ['txt', 'img'].forEach((mode) => { + const r = document.getElementById(`cc-r-${mode}`).querySelector("input").value; + const g = document.getElementById(`cc-g-${mode}`).querySelector("input").value; + const b = document.getElementById(`cc-b-${mode}`).querySelector("input").value; + + VectorscopeCC.updateCursor(r, g, b, mode); + }); + }, 100); + }); diff --git a/lib_cc/settings.py b/lib_cc/settings.py index ac01193..6867f99 100644 --- a/lib_cc/settings.py +++ b/lib_cc/settings.py @@ -28,7 +28,7 @@ def settings(): ) .needs_reload_ui() .info( - "Uncheck this option if you wish to use the built-in Defaults function) (enable this option again if the extension is not functioning correctly after an update" + "uncheck this option if you wish to use the built-in Defaults function) (enable this option again if the extension is not functioning correctly after an update" ), ) diff --git a/scripts/cc.py b/scripts/cc.py index d769f2b..9621c5d 100644 --- a/scripts/cc.py +++ b/scripts/cc.py @@ -117,7 +117,7 @@ class VectorscopeCC(scripts.Script): with gr.Row(elem_classes="style-rows"): style_choice = gr.Dropdown( - label="Styles", choices=style_manager.list_style(), scale=3 + label="CC Styles", choices=style_manager.list_style(), scale=3 ) apply_btn = gr.Button( value="Apply Style", elem_id=f"cc-apply-{mode}", scale=2 @@ -131,10 +131,12 @@ class VectorscopeCC(scripts.Script): ) delete_btn = gr.Button(value="Delete Style", scale=2) + if getattr(shared.opts, "cc_no_defaults", True): + style_choice.do_not_save_to_config = True + [ setattr(comp, "do_not_save_to_config", True) for comp in ( - style_choice, apply_btn, refresh_btn, style_name,