diff --git a/ai_diffusion/ai_diffusion.action b/ai_diffusion/ai_diffusion.action index f137edb12e..4b08464a49 100644 --- a/ai_diffusion/ai_diffusion.action +++ b/ai_diffusion/ai_diffusion.action @@ -75,6 +75,18 @@ false + + + Apply result (layer) + + + + 10000 + 0 + + false + + Create region diff --git a/ai_diffusion/extension.py b/ai_diffusion/extension.py index 97ae0e8bcf..f2561efa0d 100644 --- a/ai_diffusion/extension.py +++ b/ai_diffusion/extension.py @@ -50,6 +50,7 @@ def createActions(self, window): self._create_action(window, "cancel_all", actions.cancel_all) self._create_action(window, "toggle_preview", actions.toggle_preview) self._create_action(window, "apply", actions.apply) + self._create_action(window, "apply_alternative", actions.apply_alternative) self._create_action(window, "create_region", actions.create_region) self._create_action( window, "switch_workspace_generation", actions.set_workspace(Workspace.generation) diff --git a/ai_diffusion/ui/actions.py b/ai_diffusion/ui/actions.py index 75992e76eb..ff7aaed728 100644 --- a/ai_diffusion/ui/actions.py +++ b/ai_diffusion/ui/actions.py @@ -42,6 +42,14 @@ def apply(): model.live.apply_result() +def apply_alternative(): + if model := root.model_for_active_document(): + if model.workspace is Workspace.live: + model.live.apply_result(layer_only=True) + else: + apply() + + def create_region(): if model := root.model_for_active_document(): model.regions.create_region(group=model.workspace is not Workspace.live)