1
$\begingroup$

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!

$\endgroup$
1
  • $\begingroup$ Have you tagged the question with 'python' and 'scripting' because you are triggering the rendering by code? $\endgroup$ Jan 26, 2017 at 16:52

2 Answers 2

1
$\begingroup$

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:

$\endgroup$
0
$\begingroup$

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.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .