def lock_view(screen,lock):
for area in screen.areas:
if area.type == "VIEW_3D":
for space in area.spaces:
if space.type == "VIEW_3D":
region = space.region_3d
if lock:
region.view_rotation = Quaternion((0.7071,0.7071,-0.0,-0.0))
region.lock_rotation = True
else:
region.lock_rotation = False
评论列表
文章目录