2025-02-09 21:35:41 +08:00
|
|
|
|
#!/usr/bin/env python
|
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
2025-02-09 23:46:33 +08:00
|
|
|
|
import os
|
|
|
|
|
import sys
|
|
|
|
|
from . import config
|
|
|
|
|
|
|
|
|
|
# 确保PYDNA_PATH在sys.path中
|
|
|
|
|
if config.PYDNA_PATH not in sys.path:
|
2025-02-11 00:04:32 +08:00
|
|
|
|
sys.path.insert(0, config.PYDNA_PATH)
|
2025-02-09 23:46:33 +08:00
|
|
|
|
|
|
|
|
|
# 先导入dna模块
|
|
|
|
|
try:
|
|
|
|
|
import dna
|
|
|
|
|
except ImportError as e:
|
2025-02-11 00:04:32 +08:00
|
|
|
|
print(f"DNA模块导入失败: {str(e)}")
|
2025-02-09 23:46:33 +08:00
|
|
|
|
raise
|
|
|
|
|
|
2025-02-11 00:04:32 +08:00
|
|
|
|
# 修改为绝对导入
|
2025-02-09 23:46:33 +08:00
|
|
|
|
from .api import build_meshes, build_rig
|
|
|
|
|
from .builder.config import Config, RigConfig
|
|
|
|
|
from .builder.maya.skin_weights import (
|
|
|
|
|
get_skin_weights_from_scene,
|
|
|
|
|
set_skin_weights_to_scene,
|
|
|
|
|
)
|
|
|
|
|
from .dnalib.dnalib import DNA
|
|
|
|
|
from .dnalib.layer import Layer
|
2025-02-11 00:04:32 +08:00
|
|
|
|
from .MetaFusion import show # 改为绝对导入
|
2025-02-09 23:46:33 +08:00
|
|
|
|
from .config import __version__
|
|
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
|
"DNA",
|
|
|
|
|
"build_rig",
|
|
|
|
|
"build_meshes",
|
|
|
|
|
"show",
|
|
|
|
|
"get_skin_weights_from_scene",
|
|
|
|
|
"set_skin_weights_to_scene",
|
|
|
|
|
"Config",
|
|
|
|
|
"RigConfig",
|
|
|
|
|
"Layer",
|
|
|
|
|
"__version__",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|