summaryrefslogtreecommitdiff
path: root/cnn_v3
diff options
context:
space:
mode:
Diffstat (limited to 'cnn_v3')
-rw-r--r--cnn_v3/training/blender_export.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/cnn_v3/training/blender_export.py b/cnn_v3/training/blender_export.py
index bb0d3d9..345f395 100644
--- a/cnn_v3/training/blender_export.py
+++ b/cnn_v3/training/blender_export.py
@@ -161,9 +161,13 @@ def configure_compositor(args):
out_node.format.file_format = "OPEN_EXR_MULTILAYER"
out_node.format.exr_codec = "ZIP"
_set_output_path(out_node, args.output)
+ if hasattr(out_node, "file_name"):
+ out_node.file_name = "" # Blender 5: clear prefix so output is just ####.exr
# The node starts with one default slot; rename it first, then add the rest.
- slots = getattr(out_node, "file_slots", None) or getattr(out_node, "file_output_items", None)
+ slots = getattr(out_node, "file_output_items", None)
+ if slots is None:
+ slots = getattr(out_node, "file_slots", None)
if slots is None:
candidates = [a for a in dir(out_node) if not a.startswith("__")]
_die("cannot find slots attribute on CompositorNodeOutputFile.", candidates)