I'm super new to Blender and working on a script for Blender. My question is how to rotate scene via python script, just like using middle mouse?
Thank you.
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.
Sign up to join this communityI'm super new to Blender and working on a script for Blender. My question is how to rotate scene via python script, just like using middle mouse?
Thank you.
Thanks to batFINGER I've found the answer
import bpy
from mathutils import Euler
for area in bpy.context.screen.areas:
if area.type == 'VIEW_3D':
area.spaces.active.region_3d.view_rotation.rotate(Euler((0, 0, 0.01)))