Avoid overwriting custom image names
This commit is contained in:
+5
-1
@@ -1,6 +1,7 @@
|
||||
from .dumas_image_nodes import (
|
||||
NODE_CLASS_MAPPINGS as IMAGE_NODE_CLASS_MAPPINGS,
|
||||
NODE_DISPLAY_NAME_MAPPINGS as IMAGE_NODE_DISPLAY_NAME_MAPPINGS,
|
||||
_next_available_relative_path,
|
||||
_next_counter_for_relative_path,
|
||||
_folder_is_image,
|
||||
_list_folder_image_files,
|
||||
@@ -135,7 +136,10 @@ try:
|
||||
return 1, ""
|
||||
relative_template = "/".join(parts)
|
||||
counter = _next_counter_for_relative_path(base, relative_template)
|
||||
resolved_relative = relative_template.replace("%counter%", str(counter).zfill(digits))
|
||||
if "%counter%" in relative_template:
|
||||
resolved_relative = relative_template.replace("%counter%", str(counter).zfill(digits))
|
||||
else:
|
||||
resolved_relative = _next_available_relative_path(base, relative_template)
|
||||
return counter, resolved_relative
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user