diff --git a/loom.py b/loom.py index 4b91b5e..3e4c2fe 100644 --- a/loom.py +++ b/loom.py @@ -3798,15 +3798,22 @@ def frame_repath(self, scene, frame_number): k.base_path = os.path.join(replace_globals(v["Folder"]), of) def start_render(self, scene, frame, silent=False): - rndr = scene.render # Skip frame, if rendered already + rndr = scene.render if not rndr.use_overwrite and os.path.isfile(rndr.filepath): self._skipped_frames.append(frame) - self.post_render(scene, None) + if not silent: + self.post_render(scene, None) + else: + print("Skipped frame: {} (already exists)".format(frame)) else: + if rndr.use_placeholder and not os.path.isfile(rndr.filepath): + open(rndr.filepath, 'a').close() + if silent: bpy.ops.render.render(write_still=True) else: bpy.ops.render.render("INVOKE_DEFAULT", write_still=True) + if frame not in self._rendered_frames: self._rendered_frames.append(frame) @@ -3844,7 +3851,7 @@ def final_report(self): mf=i[0], sf=str(i[1]).split(".")[1]) for i in self._skipped_frames) else: skipped = ','.join(map(str, self._skipped_frames)) - self.report({'WARNING'}, "{} skipped (would overwrite existing file(s))".format(skipped)) + self.report({'WARNING'}, "Frame(s): {} skipped (would overwrite existing file(s))".format(skipped)) def execute(self, context): scn = context.scene @@ -3906,7 +3913,6 @@ def execute(self, context): """ Render silent """ if self.render_silent: - """ Apply custom Render Preset """ if self.render_preset and self.render_preset != "EMPTY": bpy.ops.script.execute_preset( @@ -3918,6 +3924,7 @@ def execute(self, context): self.start_render(scn, frame_number, silent=True) """ Reset output path & display results """ + self.final_report() self.reset_output_paths(scn) return {"FINISHED"}