# Path: blendergltf/exporters/base.py
# class BaseExporter:
#     gltf_key = ''
#     blender_key = ''
# 
#     @classmethod
#     def get_custom_properties(cls, blender_data):
#         custom_props = {
#             key: value.to_list() if hasattr(value, 'to_list') else value
#             for key, value in blender_data.items()
#             if key not in _IGNORED_CUSTOM_PROPS
#         }
# 
#         custom_props = {
#             key: value for key, value in custom_props.items()
#             if _is_serializable(value)
#         }
# 
#         return custom_props
# 
#     @classmethod
#     def check(cls, state, blender_data):
#         return True
# 
#     @classmethod
#     def default(cls, state, blender_data):
#         return {
#             'name': blender_data.name
#         }
# 
#     @classmethod
#     def export(cls, state, blender_data):
#         return {}


from .base import BaseExporter


class CameraExporter(BaseExporter):
    gltf_key = 'cameras'
    blender_key = 'cameras'

    @classmethod
    def export(cls, state, blender_data):
        camera_gltf = {}
        if blender_data.type == 'ORTHO':
            xmag = 0.5 * blender_data.ortho_scale
            ymag = xmag * state['aspect_ratio']

# Path: blendergltf/exporters/base.py
# class BaseExporter:
#     gltf_key = ''
#     blender_key = ''
# 
#     @classmethod
#     def get_custom_properties(cls, blender_data):
#         custom_props = {
#             key: value.to_list() if hasattr(value, 'to_list') else value
#             for key, value in blender_data.items()
#             if key not in _IGNORED_CUSTOM_PROPS
#         }
# 
#         custom_props = {
#             key: value for key, value in custom_props.items()
#             if _is_serializable(value)
#         }
# 
#         return custom_props
# 
#     @classmethod
#     def check(cls, state, blender_data):
#         return True
# 
#     @classmethod
#     def default(cls, state, blender_data):
#         return {
#             'name': blender_data.name
#         }
# 
#     @classmethod
#     def export(cls, state, blender_data):
#         return {}


# Path: blendergltf/exporters/camera.py
from .base import BaseExporter



class CameraExporter(BaseExporter):
    gltf_key = 'cameras'
    blender_key = 'cameras'

    @classmethod
    def export(cls, state, blender_data):
        camera_gltf = {}
        if blender_data.type == 'ORTHO':
            xmag = 0.5 * blender_data.ortho_scale
            ymag = xmag * state['aspect_ratio']

            camera_gltf = {