Skip to content

Commit f383c7f

Browse files
committed
Add Close Project force bool option
1 parent 44e2c8a commit f383c7f

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515

1616
### Removed
1717

18-
## [1.1.0] - 2024-07-24
18+
## [1.1.0] - 2025-07-24
1919

2020
### Added
2121
- **Open Project Node**: Opens RTX Remix projects by layer ID for workflow management
2222
- **Get Loaded Project Node**: Gets layer ID of current open project for use with Open Project node
23-
- **Close Project Node**: Closes RTX Remix projects to save VRAM during AI processing
23+
- **Close Project Node**: Closes RTX Remix projects and a force boolean parameter default false
2424
- **Get Default Directory Node**: Captures the RTX Remix default output directory before closing projects
2525
- Low VRAM workflow example: "rtx_remix_pbrify_workflow_LowVRAM.json" demonstrating new project management nodes
2626

nodes/layers.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,9 @@ class CloseProject:
545545
@classmethod
546546
def INPUT_TYPES(cls): # noqa N802
547547
inputs = get_context_inputs()
548-
inputs["optional"] = {}
548+
inputs["optional"] = {
549+
"force": ("BOOLEAN", {"default": False}),
550+
}
549551
return inputs
550552

551553
RETURN_TYPES = ("STRING",)
@@ -557,12 +559,15 @@ def INPUT_TYPES(cls): # noqa N802
557559

558560
CATEGORY = f"{PREFIX_MENU}/{_file_name}"
559561

560-
def close_project(self) -> tuple[str]:
562+
def close_project(self, force: bool = False) -> tuple[str]:
561563
if not self.enable_this_node: # noqa
562564
return ("disabled",)
563565
address, port = self.context # noqa
566+
url = f"http://{address}:{port}/stagecraft/project"
567+
if force:
568+
url += "?force=true"
564569
r = requests.delete(
565-
f"http://{address}:{port}/stagecraft/project",
570+
url,
566571
headers=HEADER_LSS_REMIX_VERSION_1_0,
567572
)
568573
check_response_status_code(r)

0 commit comments

Comments
 (0)