Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bpy
- is_local_view = sum(bpy.context.space_data.layers[:]) == 0
- for area in bpy.context.screen.areas:
- if area.type == 'VIEW_3D':
- space = area.spaces[0]
- if space.local_view: #check if using local view
- for region in area.regions:
- if region.type == 'WINDOW':
- override = {'area': area, 'region': region} #override context
- bpy.ops.view3d.localview(override) #switch to global view
- if context.space_data.local_view:
- bpy.ops.view3d.localview()
Add Comment
Please, Sign In to add comment