gui.py 425 B

1234567891011121314151617
  1. # Code licensed under the BSD License.
  2. # http://www.anki3d.org/LICENSE Panagiotis Christopoulos Charitos and contributors
  3. # keep methods in alphabetical order
  4. # blender imports
  5. import bpy
  6. bl_info = {"author": "A. A. Kalugin Jr."}
  7. def get_region3d(context):
  8. """
  9. Gets the first region 3d viewport.
  10. """
  11. for view in context.window.screen.areas:
  12. if view.type == 'VIEW_3D':
  13. return view.spaces[0].region_3d
  14. return None