# Path: third_party/xiuminglib/xiuminglib/imprt.py
# def preset_import(name):
#     """A unified importer for both regular and ``google3`` modules, according
#     to specified presets/profiles (e.g., ignoring ``ModuleNotFoundError``).
#     """
#     if name in ('cv2', 'opencv'):
#         try:
#             # BUILD dep:
#             # "//third_party/py/cvx2",
#             from cvx2 import latest as mod
#             # Or
#             # BUILD dep:
#             # "//third_party/OpenCVX:cvx2",
#             # from google3.third_party.OpenCVX import cvx2 as cv2
#         except ModuleNotFoundError:
#             mod = import_module_404ok('cv2')
#         # TODO: Below is cleaner, but doesn't work
#         # mod = import_module_404ok('cvx2.latest')
#         # if mod is None:
#         #    mod = import_module_404ok('cv2')
#         return mod
# 
#     if name in ('tf', 'tensorflow'):
#         mod = import_module_404ok('tensorflow')
#         return mod
# 
#     if name == 'gfile':
#         # BUILD deps:
#         # "//pyglib:gfile",
#         # "//file/colossus/cns",
#         mod = import_module_404ok('google3.pyglib.gfile')
#         return mod
# 
#     if name in ('bpy', 'bmesh', 'OpenEXR', 'Imath'):
#         # BUILD deps:
#         # "//third_party/py/Imath",
#         # "//third_party/py/OpenEXR",
#         mod = import_module_404ok(name)
#         return mod
# 
#     if name in ('Vector', 'Matrix', 'Quaternion'):
#         mod = import_module_404ok('mathutils')
#         cls = _get_module_class(mod, name)
#         return cls
# 
#     if name == 'BVHTree':
#         mod = import_module_404ok('mathutils.bvhtree')
#         cls = _get_module_class(mod, name)
#         return cls
# 
#     raise NotImplementedError(name)
# 
# Path: third_party/xiuminglib/xiuminglib/log.py
# def get_logger(level=None):
#     """Creates a logger for functions in the library.
# 
#     Args:
#         level (str, optional): Logging level. Defaults to ``logging.INFO``.
# 
#     Returns:
#         logging.Logger: Logger created.
#     """
#     logging.basicConfig(level=logging.INFO)
#     logger = logging.getLogger()
#     return logger


from os.path import basename
from ..imprt import preset_import
from ..log import get_logger
import numpy as np
"""Add functions in this module usually provide no setter for the lamp's 3D
rotation, because one usually implicitly sets the rotation by pointing the
light to an object (and specifying an up vector), by using
:func:`point_light_to`.
"""


bpy = preset_import('bpy')

# Path: third_party/xiuminglib/xiuminglib/imprt.py
# def preset_import(name):
#     """A unified importer for both regular and ``google3`` modules, according
#     to specified presets/profiles (e.g., ignoring ``ModuleNotFoundError``).
#     """
#     if name in ('cv2', 'opencv'):
#         try:
#             # BUILD dep:
#             # "//third_party/py/cvx2",
#             from cvx2 import latest as mod
#             # Or
#             # BUILD dep:
#             # "//third_party/OpenCVX:cvx2",
#             # from google3.third_party.OpenCVX import cvx2 as cv2
#         except ModuleNotFoundError:
#             mod = import_module_404ok('cv2')
#         # TODO: Below is cleaner, but doesn't work
#         # mod = import_module_404ok('cvx2.latest')
#         # if mod is None:
#         #    mod = import_module_404ok('cv2')
#         return mod
# 
#     if name in ('tf', 'tensorflow'):
#         mod = import_module_404ok('tensorflow')
#         return mod
# 
#     if name == 'gfile':
#         # BUILD deps:
#         # "//pyglib:gfile",
#         # "//file/colossus/cns",
#         mod = import_module_404ok('google3.pyglib.gfile')
#         return mod
# 
#     if name in ('bpy', 'bmesh', 'OpenEXR', 'Imath'):
#         # BUILD deps:
#         # "//third_party/py/Imath",
#         # "//third_party/py/OpenEXR",
#         mod = import_module_404ok(name)
#         return mod
# 
#     if name in ('Vector', 'Matrix', 'Quaternion'):
#         mod = import_module_404ok('mathutils')
#         cls = _get_module_class(mod, name)
#         return cls
# 
#     if name == 'BVHTree':
#         mod = import_module_404ok('mathutils.bvhtree')
#         cls = _get_module_class(mod, name)
#         return cls
# 
#     raise NotImplementedError(name)
# 
# Path: third_party/xiuminglib/xiuminglib/log.py
# def get_logger(level=None):
#     """Creates a logger for functions in the library.
# 
#     Args:
#         level (str, optional): Logging level. Defaults to ``logging.INFO``.
# 
#     Returns:
#         logging.Logger: Logger created.
#     """
#     logging.basicConfig(level=logging.INFO)
#     logger = logging.getLogger()
#     return logger


# Path: third_party/xiuminglib/xiuminglib/blender/light.py
from os.path import basename
from ..imprt import preset_import
from ..log import get_logger
import numpy as np

"""Add functions in this module usually provide no setter for the lamp's 3D
rotation, because one usually implicitly sets the rotation by pointing the
light to an object (and specifying an up vector), by using
:func:`point_light_to`.
"""


bpy = preset_import('bpy')

Vector = preset_import('Vector')