I'm rendering out products from different angles. I set up keyframes to rotate the product to the desired angles, then I'm doing an image sequence animation render for each angle. Is there a way to specify the filenames to the scene name followed by either a custom name, or the frame number? Thank You!
Asked
Active
Viewed 2,033 times
1
-
Have you tagged the question with 'python' and 'scripting' because you are triggering the rendering by code? – Ray Mairlot Jan 26 '17 at 16:52
2 Answers
1
This answer already explains how to render certain frames.
bpy.context.scene.name ... the scene's name
bpy.context.scene.frame_start ... the scene's starting frame
import bpy
scene = bpy.context.scene
fp = scene.render.filepath # get existing output path
for frame_nr in range(scene.frame_start, scene.frame_end):
# set current frame
scene.frame_set(frame_nr)
# set output path
scene.render.filepath = "//render/" + scene.name + "_folder/" + scene.name + "_customName_" + '{0:03d}'.format(frame_nr)
bpy.ops.render.render(write_still=True)
scene.render.filepath = fp
Refer to:
0
For what I needed, I just specified the file path names, starting with the product name and then it added the frame name to the end.
Design Ninja
- 57
- 1
- 4