Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
afd06245
Commit
afd06245
authored
Sep 15, 2023
by
Won-Kyu Park
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xyz_grid: add prepare option to AxisOption
parent
102b6617
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
scripts/xyz_grid.py
scripts/xyz_grid.py
+4
-1
No files found.
scripts/xyz_grid.py
View file @
afd06245
...
@@ -205,13 +205,14 @@ def csv_string_to_list_strip(data_str):
...
@@ -205,13 +205,14 @@ def csv_string_to_list_strip(data_str):
class
AxisOption
:
class
AxisOption
:
def
__init__
(
self
,
label
,
type
,
apply
,
format_value
=
format_value_add_label
,
confirm
=
None
,
cost
=
0.0
,
choices
=
None
):
def
__init__
(
self
,
label
,
type
,
apply
,
format_value
=
format_value_add_label
,
confirm
=
None
,
cost
=
0.0
,
choices
=
None
,
prepare
=
None
):
self
.
label
=
label
self
.
label
=
label
self
.
type
=
type
self
.
type
=
type
self
.
apply
=
apply
self
.
apply
=
apply
self
.
format_value
=
format_value
self
.
format_value
=
format_value
self
.
confirm
=
confirm
self
.
confirm
=
confirm
self
.
cost
=
cost
self
.
cost
=
cost
self
.
prepare
=
prepare
self
.
choices
=
choices
self
.
choices
=
choices
...
@@ -536,6 +537,8 @@ class Script(scripts.Script):
...
@@ -536,6 +537,8 @@ class Script(scripts.Script):
if
opt
.
choices
is
not
None
and
not
csv_mode
:
if
opt
.
choices
is
not
None
and
not
csv_mode
:
valslist
=
vals_dropdown
valslist
=
vals_dropdown
elif
opt
.
prepare
is
not
None
:
valslist
=
opt
.
prepare
(
vals
)
else
:
else
:
valslist
=
csv_string_to_list_strip
(
vals
)
valslist
=
csv_string_to_list_strip
(
vals
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment