# 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/common.py
# class Reference:
#     __slots__ = (
#         "blender_type",
#         "blender_name",
#         "source",
#         "prop",
#         "value",
#     )
# 
#     def __init__(self, blender_type, blender_name, source, prop):
#         self.blender_type = blender_type
#         self.blender_name = blender_name
#         self.source = source
#         self.prop = prop
#         self.value = None
# 
#     def __str__(self):
#         return json.dumps([self.blender_type, self.blender_name, self.value])
# 
# class SimpleID:
#     def __init__(self, name, data=None):
#         self.name = name
#         self.data = data


from distutils.version import StrictVersion as Version
from .base import BaseExporter
from .common import (
    Reference,
    SimpleID,
)
import bpy
                gltf_sampler['wrapT'] = GL_REPEAT
        elif blender_data.extension in ('CLIP', 'CLIP_CUBE'):
            gltf_sampler['wrapS'] = GL_CLAMP_TO_EDGE
            gltf_sampler['wrapT'] = GL_CLAMP_TO_EDGE
        else:
            print('Warning: Unknown texture extension option:', blender_data.extension)

        # Handle minFilter and magFilter
        if blender_data.use_mipmap:
            gltf_sampler['minFilter'] = GL_LINEAR_MIPMAP_LINEAR
            gltf_sampler['magFilter'] = GL_LINEAR
        else:
            gltf_sampler['minFilter'] = GL_NEAREST
            gltf_sampler['magFilter'] = GL_NEAREST

        return gltf_sampler

    @classmethod
    def export(cls, state, blender_data):
        gltf_texture = {
            'name': blender_data.name,
        }

        gltf_sampler = cls.export_sampler(blender_data)
        state['input']['samplers'].append(SimpleID(blender_data.name))
        state['samplers'].append(gltf_sampler)

        gltf_texture['sampler'] = Reference('samplers', blender_data.name, gltf_texture, 'sampler')
        state['references'].append(gltf_texture['sampler'])


# 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/common.py
# class Reference:
#     __slots__ = (
#         "blender_type",
#         "blender_name",
#         "source",
#         "prop",
#         "value",
#     )
# 
#     def __init__(self, blender_type, blender_name, source, prop):
#         self.blender_type = blender_type
#         self.blender_name = blender_name
#         self.source = source
#         self.prop = prop
#         self.value = None
# 
#     def __str__(self):
#         return json.dumps([self.blender_type, self.blender_name, self.value])
# 
# class SimpleID:
#     def __init__(self, name, data=None):
#         self.name = name
#         self.data = data


# Path: blendergltf/exporters/texture.py
from distutils.version import StrictVersion as Version
from .base import BaseExporter
from .common import (
    Reference,
    SimpleID,
)
import bpy

                gltf_sampler['wrapT'] = GL_REPEAT
        elif blender_data.extension in ('CLIP', 'CLIP_CUBE'):
            gltf_sampler['wrapS'] = GL_CLAMP_TO_EDGE
            gltf_sampler['wrapT'] = GL_CLAMP_TO_EDGE
        else:
            print('Warning: Unknown texture extension option:', blender_data.extension)

        # Handle minFilter and magFilter
        if blender_data.use_mipmap:
            gltf_sampler['minFilter'] = GL_LINEAR_MIPMAP_LINEAR
            gltf_sampler['magFilter'] = GL_LINEAR
        else:
            gltf_sampler['minFilter'] = GL_NEAREST
            gltf_sampler['magFilter'] = GL_NEAREST

        return gltf_sampler

    @classmethod
    def export(cls, state, blender_data):
        gltf_texture = {
            'name': blender_data.name,
        }

        gltf_sampler = cls.export_sampler(blender_data)
        state['input']['samplers'].append(SimpleID(blender_data.name))
        state['samplers'].append(gltf_sampler)

        gltf_texture['sampler'] = Reference('samplers', blender_data.name, gltf_texture, 'sampler')
        state['references'].append(gltf_texture['sampler'])


        gltf_texture['source'] = Reference(