Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bpy, mathutils
- for area in bpy.context.window.screen.areas:
- if area.type == 'VIEW_3D':
- view_matrix = area.spaces.active.region_3d.view_matrix
- print(f"CURRENT MATRIX:\n{view_matrix}")
- flipped_view_matrix = view_matrix.copy()
- flipped_view_matrix[2][0] *= -1 # Flip scale-X? visibly not...
- print(f"NEW MATRIX:\n{flipped_view_matrix}")
- # Apply the new view matrix
- area.spaces.active.region_3d.view_matrix = flipped_view_matrix
- area.tag_redraw()
Advertisement
Add Comment
Please, Sign In to add comment