This commit is contained in:
drago87
2026-08-17 17:34:08 +02:00
parent 61bdc1bcd9
commit efd6740f0c
9 changed files with 1546 additions and 60 deletions
+1
View File
@@ -2,6 +2,7 @@ __pycache__/
*.pyc
*.pyo
*.log
*.zip
.DS_Store
node_modules/
web/dragos_dynamic.js.txt
+5 -5
View File
@@ -65,7 +65,7 @@ def parse_prompt_file(content: str):
class DragosPromptLoaderNode:
CATEGORY = "DragosScene"
CATEGORY = "Dragos/Scene Builder"
RETURN_TYPES = ("STRING",)
FUNCTION = "load_prompt"
@@ -152,7 +152,7 @@ class DragosVariableNode:
RETURN_TYPES = (PROMPT_VAR_TYPE,)
FUNCTION = "get_text"
CATEGORY = "DragosScene"
CATEGORY = "Dragos/Scene Builder"
def get_text(self, var_name, text):
@@ -180,7 +180,7 @@ class DragosObjectNode:
RETURN_TYPES = (PROMPT_VAR_TYPE,)
FUNCTION = "build_object"
CATEGORY = "DragosScene"
CATEGORY = "Dragos/Scene Builder"
@classmethod
def VALIDATE_INPUTS(cls, **kwargs):
@@ -247,7 +247,7 @@ class DragosSceneCompiler:
RETURN_TYPES = ("STRING",)
OUTPUT_NODE = True
FUNCTION = "compile_json"
CATEGORY = "DragosScene"
CATEGORY = "Dragos/Scene Builder"
@staticmethod
def _unwrap_prompt_var(v):
@@ -302,7 +302,7 @@ class DragosSceneCompiler:
class DragosStructuredBuilderNode:
CATEGORY = "DragosScene"
CATEGORY = "Dragos/Scene Builder"
RETURN_TYPES = (PROMPT_VAR_TYPE,)
FUNCTION = "build"
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "Dragos-SceneBuilder"
description = "This node pack offers various ways to build json strings that is ment to be used with a LLM to generate Prompts. It also have a node that can load different prompts so that a LLM can use the json string to make the Image Prompt."
version = "1.6.3"
version = "1.8.1"
license = { file = "LICENSE" }
[project.urls]
+313
View File
@@ -0,0 +1,313 @@
/* ============================================================
Dragos Multi-Select Widget Styles
Used by DragosStructuredBuilder for multi-select fields
============================================================ */
.dragos-ms {
--ms-bg: #1e1e2e;
--ms-surface: #252540;
--ms-surface-hover: #2a2a4a;
--ms-border: #3a3a5a;
--ms-text: #ccc;
--ms-text-dim: #888;
--ms-text-muted: #555;
--ms-accent: #7c6ff0;
--ms-accent-dim: #5a4fb8;
--ms-danger: #e55;
--ms-input-bg: #2a2a3a;
--ms-input-border: #555;
--ms-radius: 4px;
--ms-font: 12px Arial, sans-serif;
display: flex;
flex-direction: column;
background: var(--ms-bg);
border: 1px solid var(--ms-border);
border-radius: 6px;
overflow: hidden;
font-family: var(--ms-font);
color: var(--ms-text);
font-size: 12px;
min-height: 300px;
}
/* ---------- Search ---------- */
.dragos-ms-search {
padding: 6px 8px;
border-bottom: 1px solid var(--ms-border);
}
.dragos-ms-search input {
width: 100%;
box-sizing: border-box;
background: var(--ms-input-bg);
border: 1px solid var(--ms-input-border);
border-radius: var(--ms-radius);
color: var(--ms-text);
padding: 5px 8px;
font-size: 11px;
outline: none;
}
.dragos-ms-search input:focus {
border-color: var(--ms-accent);
}
.dragos-ms-search input::placeholder {
color: var(--ms-text-muted);
}
/* ---------- Dual panels ---------- */
.dragos-ms {
height: 100%;
min-height: 300px;
}
.dragos-ms-panels {
display: flex;
flex: 1;
min-height: 0;
overflow: hidden;
}
/* Left panel — groups & items */
.dragos-ms-left {
flex: 1 1 220px;
overflow-y: auto;
min-width: 220px;
border-right: 1px solid var(--ms-border);
}
.dragos-ms-left::-webkit-scrollbar {
width: 5px;
}
.dragos-ms-left::-webkit-scrollbar-thumb {
background: var(--ms-border);
border-radius: 3px;
}
/* Right panel — selected */
.dragos-ms-right {
width: 170px;
min-width: 150px;
overflow-y: auto;
background: #1a1a2a;
}
.dragos-ms-right::-webkit-scrollbar {
width: 5px;
}
.dragos-ms-right::-webkit-scrollbar-thumb {
background: var(--ms-border);
border-radius: 3px;
}
/* ---------- Group headers (dividers) ---------- */
.dragos-ms-group-header {
display: flex;
align-items: center;
gap: 5px;
padding: 5px 8px;
background: var(--ms-surface);
cursor: pointer;
user-select: none;
border-bottom: 1px solid var(--ms-border);
font-weight: bold;
text-transform: uppercase;
font-size: 10px;
color: var(--ms-text-dim);
letter-spacing: 0.4px;
}
.dragos-ms-group-header:hover {
background: var(--ms-surface-hover);
}
.dragos-ms-arrow {
font-size: 9px;
color: var(--ms-text-muted);
width: 10px;
text-align: center;
flex-shrink: 0;
}
.dragos-ms-group-count {
margin-left: auto;
background: #333;
border-radius: 7px;
padding: 1px 6px;
font-size: 9px;
color: #aaa;
font-weight: normal;
letter-spacing: 0;
text-transform: none;
}
/* ---------- Items (checkboxes) ---------- */
.dragos-ms-group-items {
padding: 2px 0;
}
.dragos-ms-group-items.collapsed {
display: none;
}
.dragos-ms-item {
display: flex;
align-items: center;
gap: 6px;
padding: 3px 8px 3px 18px;
cursor: pointer;
font-size: 11px;
color: #bbb;
}
.dragos-ms-item:hover {
background: var(--ms-input-bg);
}
.dragos-ms-item input[type="checkbox"] {
accent-color: var(--ms-accent);
margin: 0;
cursor: pointer;
flex-shrink: 0;
width: 13px;
height: 13px;
}
.dragos-ms-item mark {
background: rgba(124, 111, 240, 0.25);
color: #ddd;
border-radius: 2px;
padding: 0 1px;
}
/* ---------- Right panel header ---------- */
.dragos-ms-right-header {
padding: 5px 8px;
font-size: 10px;
font-weight: bold;
color: var(--ms-text-dim);
text-transform: uppercase;
letter-spacing: 0.4px;
border-bottom: 1px solid var(--ms-border);
display: flex;
align-items: center;
justify-content: space-between;
}
.dragos-ms-clear-btn {
background: none;
border: none;
color: var(--ms-text-muted);
font-size: 9px;
cursor: pointer;
text-transform: uppercase;
letter-spacing: 0.3px;
padding: 0;
}
.dragos-ms-clear-btn:hover {
color: var(--ms-danger);
}
/* ---------- Selected items ---------- */
.dragos-ms-selected-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 3px 8px;
font-size: 11px;
color: var(--ms-text);
gap: 4px;
}
.dragos-ms-selected-item:hover {
background: var(--ms-input-bg);
}
.dragos-ms-selected-name {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.dragos-ms-remove-btn {
background: none;
border: none;
color: var(--ms-text-muted);
font-size: 14px;
cursor: pointer;
padding: 0 2px;
line-height: 1;
flex-shrink: 0;
}
.dragos-ms-remove-btn:hover {
color: var(--ms-danger);
}
/* ---------- Weight slider ---------- */
.dragos-ms-weight {
display: flex;
align-items: center;
gap: 3px;
padding: 2px 8px 2px 20px;
font-size: 10px;
color: var(--ms-text-dim);
}
.dragos-ms-weight input[type="range"] {
flex: 1;
accent-color: var(--ms-accent);
height: 3px;
min-width: 40px;
cursor: pointer;
}
.dragos-ms-weight-val {
min-width: 32px;
text-align: right;
font-size: 10px;
color: var(--ms-accent);
font-weight: bold;
}
/* ---------- Other custom input ---------- */
.dragos-ms-other-input {
display: flex;
align-items: center;
gap: 4px;
padding: 3px 8px;
font-size: 11px;
}
.dragos-ms-other-label {
color: var(--ms-accent);
white-space: nowrap;
font-size: 10px;
}
.dragos-ms-other-input input[type="text"] {
flex: 1;
background: var(--ms-input-bg);
border: 1px solid var(--ms-input-border);
border-radius: 3px;
color: var(--ms-text);
padding: 2px 5px;
font-size: 10px;
outline: none;
min-width: 0;
}
.dragos-ms-other-input input[type="text"]:focus {
border-color: var(--ms-accent);
}
/* ---------- Empty states ---------- */
.dragos-ms-empty {
padding: 16px 8px;
text-align: center;
color: var(--ms-text-muted);
font-size: 11px;
}
.dragos-ms-no-results {
padding: 10px 8px;
text-align: center;
color: var(--ms-text-muted);
font-size: 11px;
}
/* ---------- Tags preview ---------- */
.dragos-ms-tags-preview {
padding: 5px 8px;
border-top: 1px solid var(--ms-border);
font-size: 10px;
color: var(--ms-text-dim);
max-height: 48px;
overflow-y: auto;
word-break: break-all;
line-height: 1.4;
background: #1a1a28;
}
.dragos-ms-tags-preview span {
color: var(--ms-accent);
}
File diff suppressed because it is too large Load Diff
+287
View File
@@ -0,0 +1,287 @@
Dragos Scene Builder Schema Format
==================================
Every schema file can contain special sections used by Dragos Scene Builder.
Special sections:
- _meta
- _static
- _conditions
Anything not listed here is considered normal schema data.
---
The "_meta" section controls how the editor displays and processes the schema.
It does not become part of the generated output.
--------------------------------------------------
display_name
--------------------------------------------------
Changes the name shown in the UI.
Example:
"_meta": {
"display_name": "Artist Styles"
}
If omitted, the filename is used instead.
Example:
artist.json
will be displayed as:
artist
Note:
When creating character schemas it is important to use:
{
"_meta": {
"display_name": "Character",
"override": "no"
},
"_static": {
"gender": "Female"
}
}
Using "override": "no" allows multiple characters to exist in the same scene.
--------------------------------------------------
extension
--------------------------------------------------
Defines what the schema is an extension of.
Example:
"_meta": {
"extension": "style"
},
"artist_styles" ["Rembrandt", "Caravaggio"]
Extensions are attached to matching schemas during processing.
using the example above would become
{
"style": {
"...",
"artist_styles" ["Rembrandt", "Caravaggio"]
}
}
instead of
{
"style": {
"..."
},
"artist_styles" ["Rembrandt", "Caravaggio"]
}
--------------------------------------------------
override
--------------------------------------------------
Controls how the schema behaves when another instance of the same type already exists.
Default:
"override": "yes"
If omitted, "yes" is assumed.
Example:
"override": "yes"
Merge into an existing target.
Example:
"override": "no"
Create a separate instance instead of merging.
This is commonly used for characters, accessories and other schema types that may appear multiple times in a scene.
--------------------------------------------------
multi_selects
--------------------------------------------------
Defines one or more multi-selection configurations.
Example:
"multi_selects": [
{
"applies_to": ["artist_styles"]
}
]
this let's the user select multiple things from a list
--------------------------------------------------
multi_selects.applies_to
--------------------------------------------------
Defines which categories are affected by the multi-select configuration.
Example:
"applies_to": [
"artist_styles"
]
--------------------------------------------------
multi_selects.dividers
--------------------------------------------------
Creates visual divider headers inside a category.
Example:
"dividers": [
"Realistic Classical",
"Fantasy Sci-Fi Illustration",
"Anime & Manga"
]
Divider values should also exist in the category list.
--------------------------------------------------
multi_selects.tags
--------------------------------------------------
Controls how selected values are formatted.
Example:
"tags": {
"prefix": "artist",
"allow_weight": true
}
--------------------------------------------------
multi_selects.tags.prefix
--------------------------------------------------
Adds a prefix before each selected value.
Example:
Configuration:
"prefix": "artist"
Selected:
Rembrandt
Output:
artist:Rembrandt
--------------------------------------------------
multi_selects.tags.separator
--------------------------------------------------
Defines the separator used between tag components.
Optional.
Default:
":"
Example:
"separator": "|"
Output:
artist|Rembrandt
--------------------------------------------------
multi_selects.tags.allow_weight
--------------------------------------------------
Allows a weight value to be assigned to each selected item.
Optional.
Default:
false
Example:
artist:Rembrandt:1.3
If disabled or omitted:
artist:Rembrandt
--------------------------------------------------
The "_static" section contains values that are automatically included in the generated output.
Values in "_static" are not editable by the user.
Example:
"_static": {
"gender": "Female",
"character_type": "Anthropomorphic"
}
Generated output will always contain:
{
"gender": "Female",
"character_type": "Anthropomorphic"
}
--------------------------------------------------
The "_conditions" section controls when fields are shown or hidden.
Conditions are evaluated dynamically in the editor.
Fields can be displayed only when other fields contain specific values.
Example:
"_conditions": {
"tail_type": {
"species": ["Wolf", "Fox"]
}
}
In this example:
tail_type
will only be visible when:
species
is set to:
Wolf
or
Fox
Conditions only affect editor visibility.
They do not modify generated output data.
- All _meta properties are optional.
- Unknown _meta properties are ignored.
- _meta controls editor behaviour.
- _static provides generated data.
- _conditions controls field visibility.
- Missing optional properties use default behaviour.
+149
View File
@@ -0,0 +1,149 @@
{
"_meta": {
"display_name": "Artist Styles",
"extension": "style",
"multi_selects": [
{
"applies_to": ["artist_styles"],
"dividers": [
"Realistic Classical",
"Fantasy Sci-Fi Illustration",
"Anime & Manga",
"Comics Graphic Novels",
"Digital Concept Art",
"Surreal Dark Horror",
"Stylized Animation"
],
"allow_weight": true,
"tags": {
"prefix": "artist",
"separator": ":"
}
}
]
},
"artist_styles": [
"Realistic Classical",
"Rembrandt",
"Caravaggio",
"Leonardo da Vinci",
"Albrecht Dürer",
"Michelangelo",
"Raphael",
"Johannes Vermeer",
"John Singer Sargent",
"Ivan Shishkin",
"William-Adolphe Bouguereau",
"John William Waterhouse",
"Jean-Léon Gérôme",
"Ilya Repin",
"Norman Rockwell",
"J.C. Leyendecker",
"Dean Cornwell",
"Andrew Loomis",
"Frederic Leighton",
"Fantasy Sci-Fi Illustration",
"Frank Frazetta",
"Alphonse Mucha",
"Michael Whelan",
"Boris Vallejo",
"Larry Elmore",
"Clyde Caldwell",
"Jeff Easley",
"Todd Lockwood",
"Donato Giancola",
"Greg Manchess",
"Julie Bell",
"Rowena Morrill",
"Stephan Martiniere",
"Chris Foss",
"Jim Burns",
"Romain Hugault",
"David A. Hardy",
"Peter Elson",
"Fred Gambino",
"J. Scott Campbell",
"Travis Charest",
"Anime & Manga",
"Makoto Shinkai",
"Hayao Miyazaki",
"Satoshi Kon",
"Akira Toriyama",
"Takehiko Inoue",
"Kentaro Miura",
"Yoshitaka Amano",
"Katsuhiro Otomo",
"Rumiko Takahashi",
"Naoko Takeuchi",
"Yoshiyuki Sadamoto",
"Hiromu Arakawa",
"Eiichiro Oda",
"Masashi Kishimoto",
"Hirohiko Araki",
"Range Murata",
"Ken Sugimori",
"Shinkiro",
"Junji Ito",
"CLAMP",
"Comics Graphic Novels",
"Mike Mignola",
"Jim Lee",
"Jack Kirby",
"Frank Miller",
"Moebius",
"Alex Ross",
"Steve Ditko",
"Bill Watterson",
"Hergé",
"Enki Bilal",
"Bill Sienkiewicz",
"Simon Bisley",
"Jamie Hewlett",
"Fiona Staples",
"Sean Gordon Murphy",
"Jorge Jiménez",
"Humberto Ramos",
"Digital Concept Art",
"Greg Rutkowski",
"WLOP",
"Artgerm",
"Ross Tran",
"Peter Mohrbacher",
"Craig Mullins",
"Loish",
"Magali Villeneuve",
"Fenghua Zhong",
"Aleksi Briclot",
"Sparth",
"Bobby Chiu",
"Marc Brunet",
"Ty Carter",
"Dan Mumford",
"Surreal Dark Horror",
"H.R. Giger",
"Tim Burton",
"Edward Gorey",
"Zdzisław Beksiński",
"Salvador Dalí",
"Hieronymus Bosch",
"Francisco Goya",
"Gustave Doré",
"Harry Clarke",
"Francis Bacon",
"Aubrey Beardsley",
"Remedios Varo",
"Pieter Bruegel the Elder",
"Stylized Animation",
"Syd Mead",
"Ralph McQuarrie",
"James Gurney",
"Gustav Klimt",
"Mary Blair",
"Eyvind Earle",
"Tove Jansson",
"E.H. Shepard",
"Quentin Blake",
"Jon Klassen",
"Other"
]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB