-1

I'm totally noob to blender and use it only to render isometric sprites from 3D animation. I would like a script to render my animation , rotate my object 45° on Z axis, render again, rotate again etc etc... 8 times so i can get my 8 isometric view sprites. Is it possible?

Demsay
  • 1
  • 1
    Why don't you just set it up as animation rotating the camera and just repeating the the other animation? – Martynas Žiemys Mar 05 '20 at 09:03
  • 3
    Related https://blender.stackexchange.com/questions/118238/why-does-blender-seem-to-freeze-when-i-run-this-script https://blender.stackexchange.com/questions/130404/script-to-render-one-object-from-different-angles https://blender.stackexchange.com/questions/135306/setting-up-an-isometric-view – batFINGER Mar 05 '20 at 09:12
  • Maybe I'm wrong but i find it easier to rotate only my object – Demsay Mar 05 '20 at 09:25
  • Not necessarily wrong but... transforming the camera (one object) is faster in general than transforming a bunch (hundreds) of objects. – brockmann Mar 05 '20 at 10:16
  • I tried the script in the first link provided by batFINGER (thanks): import bpy from math import radians angle = -45 axis = 2 # z-axis platform = bpy.data.objects["Cube"] original_path = bpy.data.scenes[0].render.filepath for i in range(0,8): # rotate the render platform and all children temp_rot = platform.rotation_euler temp_rot[axis] = temp_rot[axis] - radians(angle) platform.rotation_euler = temp_rot; # set the filename direction prefix bpy.data.scenes[0].render.filepath = original_path + str(i) # render animation for this direction bpy.ops.render.render(animation=True) bpy.data.scenes[0]. – user89741 Mar 05 '20 at 10:19
  • 1
    Recommend you make this an edit to the question To run a script like above, paste it into text editor (not py console) and choose run script (play button near name on later versions) Another thing is blender uses radians as an angle (look up radians if you don't know what it is) 360 degrees = 2pi radians. – batFINGER Mar 05 '20 at 10:23

1 Answers1

0

Isn't this just an animation?

  • Length: 8 frames
  • Keyed in Z rotation only, interpolation Linear
  • 0 at frame 1, 360d at frame 9

To copy animation to selected objects from the active object, CtrlL > 'Animation Data'.

Robin Betts
  • 76,260
  • 8
  • 77
  • 190