Merge pull request #14394 from AUTOMATIC1111/minor-xyz-fix

xyz grid handle axis_type is None
This commit is contained in:
AUTOMATIC1111 2023-12-30 15:06:39 +03:00 committed by GitHub
commit 1d603eb5a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -476,6 +476,8 @@ class Script(scripts.Script):
fill_z_button.click(fn=fill, inputs=[z_type, csv_mode], outputs=[z_values, z_values_dropdown])
def select_axis(axis_type, axis_values, axis_values_dropdown, csv_mode):
axis_type = axis_type or 0 # if axle type is None set to 0
choices = self.current_axis_options[axis_type].choices
has_choices = choices is not None
@ -526,6 +528,8 @@ class Script(scripts.Script):
return [x_type, x_values, x_values_dropdown, y_type, y_values, y_values_dropdown, z_type, z_values, z_values_dropdown, draw_legend, include_lone_images, include_sub_grids, no_fixed_seeds, margin_size, csv_mode]
def run(self, p, x_type, x_values, x_values_dropdown, y_type, y_values, y_values_dropdown, z_type, z_values, z_values_dropdown, draw_legend, include_lone_images, include_sub_grids, no_fixed_seeds, margin_size, csv_mode):
x_type, y_type, z_type = x_type or 0, y_type or 0, z_type or 0 # if axle type is None set to 0
if not no_fixed_seeds:
modules.processing.fix_seed(p)