- 添加Blender插件核心文件:__init__.py、ui.py、property.py、preference.py - 添加插件工具模块:g.py、loop.py、generate_loop.py、const.py、op.py - 添加翻译工具:utils/trans.py - 添加PuLP线性规划库及其依赖文件,包括CBC求解器二进制文件 - 添加.gitignore和VSCode配置文件
46 lines
1.1 KiB
Python
46 lines
1.1 KiB
Python
bl_info = {
|
|
"name": "Easy Patch",
|
|
"author": "oimoyu",
|
|
"version": (2, 1, 0),
|
|
"blender": (3, 2, 0),
|
|
"location": "View3D > Sidebar > Easy Patch",
|
|
"description": "Easy Patch",
|
|
"category": "Object",
|
|
}
|
|
|
|
|
|
import bpy
|
|
from .ui import classes as ui_classes
|
|
from .op import classes as op_classes
|
|
from .preference import classes as preference_classes
|
|
from .property import property_classes, EasyPatchProperty
|
|
from .utils.trans import t
|
|
from . import const
|
|
|
|
|
|
classes = ui_classes + op_classes + property_classes + preference_classes
|
|
|
|
|
|
def register():
|
|
# # delete when release
|
|
bpy.app.debug = False
|
|
|
|
for cls in classes:
|
|
bpy.utils.register_class(cls)
|
|
|
|
bpy.types.Scene.easy_patch_properties = bpy.props.PointerProperty(
|
|
type=EasyPatchProperty
|
|
)
|
|
|
|
# for i in bpy.context.preferences.addons:
|
|
# print(i)
|
|
|
|
# print(bpy.context.preferences.addons["blender-easy-patch-2"].preferences)
|
|
|
|
|
|
def unregister():
|
|
for cls in reversed(classes):
|
|
bpy.utils.unregister_class(cls)
|
|
|
|
del bpy.types.Scene.easy_patch_properties
|