mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-11 22:31:55 +00:00
proposed fix for #4311
This commit is contained in:
@@ -1613,9 +1613,14 @@ class Drawing(blenderbim.core.tool.Drawing):
|
|||||||
area = tool.Blender.get_view3d_area()
|
area = tool.Blender.get_view3d_area()
|
||||||
is_local_view = area.spaces[0].local_view is not None
|
is_local_view = area.spaces[0].local_view is not None
|
||||||
if is_local_view:
|
if is_local_view:
|
||||||
bpy.ops.view3d.localview()
|
#turn off local view before activating drawing, and then turn it on again.
|
||||||
|
for a in bpy.context.screen.areas:
|
||||||
|
if a.type == 'VIEW_3D':
|
||||||
|
override = bpy.context.copy()
|
||||||
|
override['area'] = a
|
||||||
|
bpy.ops.view3d.localview(override)
|
||||||
bpy.context.scene.camera = camera
|
bpy.context.scene.camera = camera
|
||||||
bpy.ops.view3d.localview()
|
bpy.ops.view3d.localview(override)
|
||||||
else:
|
else:
|
||||||
bpy.context.scene.camera = camera
|
bpy.context.scene.camera = camera
|
||||||
area.spaces[0].region_3d.view_perspective = "CAMERA"
|
area.spaces[0].region_3d.view_perspective = "CAMERA"
|
||||||
|
|||||||
Reference in New Issue
Block a user