Files
blender-easy-patch/preference.py
小煜 ab91b120e6 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配置文件
2026-03-03 19:24:57 +08:00

24 lines
807 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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,)