[Blende Export][Fixed] Issues with animations

Missing order computation in some steps, like auto-crop
This commit is contained in:
Salvador E. Tropea 2024-01-15 13:38:37 -03:00
parent 74f72ed6b7
commit 0ecb546a8c
1 changed files with 9 additions and 5 deletions

View File

@ -433,6 +433,7 @@ class Blender_ExportOptions(BaseOptions):
for _ in range(pov.steps): for _ in range(pov.steps):
for o in self.outputs: for o in self.outputs:
files.append(self.get_output_filename(o, out_dir, pov, order)) files.append(self.get_output_filename(o, out_dir, pov, order))
order += 1
return files return files
def create_vrml(self, dest_dir): def create_vrml(self, dest_dir):
@ -662,12 +663,15 @@ class Blender_ExportOptions(BaseOptions):
# Execute the command # Execute the command
self.analyze_errors(run_command(cmd)) self.analyze_errors(run_command(cmd))
if self.render_options.auto_crop: if self.render_options.auto_crop:
order = 1
for pov in self.point_of_view: for pov in self.point_of_view:
for o in self.outputs: for _ in range(pov.steps):
if o.type != 'render': for o in self.outputs:
continue if o.type != 'render':
name = self.get_output_filename(o, self._parent.output_dir, pov) continue
run_command([convert_command, name, '-trim', '+repage', '-trim', '+repage', name]) name = self.get_output_filename(o, self._parent.output_dir, pov, order)
run_command([convert_command, name, '-trim', '+repage', '-trim', '+repage', name])
order += 1
@output_class @output_class