Skip to content

Commit

Permalink
Print numbers with zero paddings in render_state.py
Browse files Browse the repository at this point in the history
  • Loading branch information
unkaktus committed Feb 24, 2023
1 parent 7bf4baa commit c37f482
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions render/render_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
# disable automatic camera reset on 'Show'
pv._DisableFirstRenderCameraReset()

print(f'[{args.task_id}] Loading state...')
print(f'[{args.task_id:04d}] Loading state...')
# load state
pv.LoadState(args.state)
print(f'[{args.task_id}] Loaded state.')
print(f'[{args.task_id:04d}] Loaded state.')

# get animation scene
animation = pv.GetAnimationScene()
Expand All @@ -37,7 +37,7 @@
# Set time
for i, frame_time in enumerate(frame_times):
global_frame_id = frame_number_offset + i
print(f'[{args.task_id}] Rendering frame #{global_frame_id} ({i} out of local batch of size {len(frame_times)})')
print(f'[{args.task_id:04d}] Rendering frame #{global_frame_id:06d} ({1+i:04d} out of local batch of size {len(frame_times):04d})')
animation.AnimationTime = frame_time
pv.Render()
filename = f'frame.{global_frame_id:06d}.png'
Expand Down

0 comments on commit c37f482

Please sign in to comment.