bl_info = {
    'category': '3D View',
    "version" : (1, 0, 0),
    "blender" : (2, 93, 0),
    "author" : "Canaan jcw",
    "name" : "CharacterDriven-Canaan-K230",
    "location": "View 3D > Tool Shelf > CDCK",
    "description" : "An Addon for Driving 3D Character by Canaan K230",
    'wiki_url': 'jiangchengwei@canaan-creative.com',
}

import bpy
from . import ops
from .panel import *

CLASS = [
    PlayPanel,
    ops.PlayAnimation,
]

PROS = [
    ('character_name',bpy.props.StringProperty(name='armature_name', default='Armature')),
    ('armature_name',bpy.props.StringProperty(name='character_name', default='Armature')),
    ('ip',bpy.props.StringProperty(name='ip', default='127.0.0.1')),
    ('port',bpy.props.StringProperty(name='port', default='10006')),
    ('fps',bpy.props.IntProperty(name='fps', default=24)),
    ('insert_keyframe',bpy.props.BoolProperty(name='insert_keyframe', default=True)),
    ('insert_interval',bpy.props.IntProperty(name='insert_interval', default=1)),
    ('gpu',bpy.props.BoolProperty(name='gpu', default=True)),
    ('translation',bpy.props.BoolProperty(name='translation', default=True)),
    ('quality',bpy.props.IntProperty(name='quality', default=60)),
    ('width',bpy.props.IntProperty(name='width', default=640)),
    ('height',bpy.props.IntProperty(name='height', default=480)),
]

def register():
    for (pro_name, pro_val) in PROS:
        setattr(bpy.types.Scene, pro_name, pro_val)

    for class_ in CLASS:
        bpy.utils.register_class(class_)

def unregister():
    for (pro_name, _) in PROS:
        delattr(bpy.types.Scene, pro_name)

    for class_ in CLASS:
        bpy.utils.unregister_class(class_)