feat: 初始化Easy Patch插件及依赖文件

- 添加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配置文件
This commit is contained in:
2026-03-03 19:24:57 +08:00
commit ab91b120e6
44 changed files with 17551 additions and 0 deletions

23
preference.py Normal file
View File

@@ -0,0 +1,23 @@
import bpy
from .utils.trans import t
from .utils import functions
class EasyPatchPrefs(bpy.types.AddonPreferences):
bl_idname = functions.get_package_name() # 設置爲package的名字否則不識別
desc_position_x: bpy.props.IntProperty(name=t("font_size"), default=5, min=0, max=100) # type: ignore
desc_position_y: bpy.props.IntProperty(name=t("font_size"), default=15, min=0, max=100) # type: ignore
# TODO:经典模式开关注意要在g建立一个变量确保一致性
def draw(self, context):
layout = self.layout
layout.label(text=t("hotkey_display_position"))
row = layout.row()
row.prop(self, "desc_position_x", text="x", expand=True)
row.prop(self, "desc_position_y", text="y", expand=True)
classes = (EasyPatchPrefs,)