Update
This commit is contained in:
@@ -490,34 +490,20 @@ class RiggingUI(ui_utils.BaseUI):
|
||||
#======================================= FUNCTIONS ======================================
|
||||
def create_connections(self):
|
||||
"""
|
||||
创建信号连接,设置UI控件的交互行为(风格参考definition.py)
|
||||
创建信号连接,设置UI控件的交互行为
|
||||
"""
|
||||
# 主要功能按钮直接连接
|
||||
if "add_joint_btn" in self.buttons:
|
||||
self.buttons["add_joint_btn"].clicked.connect(utils_rigging.add_joint)
|
||||
if "remove_joint_btn" in self.buttons:
|
||||
self.buttons["remove_joint_btn"].clicked.connect(utils_rigging.remove_joint)
|
||||
if "duplicate_joint_btn" in self.buttons:
|
||||
self.buttons["duplicate_joint_btn"].clicked.connect(utils_rigging.duplicate_joint)
|
||||
if "add_controller_btn" in self.buttons:
|
||||
self.buttons["add_controller_btn"].clicked.connect(utils_rigging.add_controller)
|
||||
if "remove_controller_btn" in self.buttons:
|
||||
self.buttons["remove_controller_btn"].clicked.connect(utils_rigging.remove_controller)
|
||||
if "duplicate_controller_btn" in self.buttons:
|
||||
self.buttons["duplicate_controller_btn"].clicked.connect(utils_rigging.duplicate_controller)
|
||||
if "import_dna_btn" in self.buttons:
|
||||
self.buttons["import_dna_btn"].clicked.connect(utils_rigging.import_dna)
|
||||
if "export_dna_btn" in self.buttons:
|
||||
self.buttons["export_dna_btn"].clicked.connect(utils_rigging.export_dna)
|
||||
if "calibrate_dna_btn" in self.buttons:
|
||||
self.buttons["calibrate_dna_btn"].clicked.connect(utils_rigging.calibrate_dna)
|
||||
# 导入绑定工具函数
|
||||
from scripts.utils import utils_rigging
|
||||
|
||||
# 预设导入和导出按钮
|
||||
self.buttons["export_presets"].clicked.connect(utils_rigging.export_dna)
|
||||
self.buttons["import_presets"].clicked.connect(utils_rigging.import_dna)
|
||||
|
||||
# 其它已创建按钮
|
||||
if "browse_path" in self.buttons:
|
||||
self.buttons["browse_path"].clicked.connect(lambda: utils_rigging.browse_file(self, "项目路径", self.controls["project_path_input"]))
|
||||
if "browse_dna" in self.buttons:
|
||||
self.buttons["browse_dna"].clicked.connect(lambda: utils_rigging.browse_file(self, "DNA文件", self.controls["presets_dna_input"], "dna"))
|
||||
if "export_presets" in self.buttons:
|
||||
self.buttons["export_presets"].clicked.connect(utils_rigging.export_presets)
|
||||
if "import_presets" in self.buttons:
|
||||
self.buttons["import_presets"].clicked.connect(utils_rigging.import_presets)
|
||||
# 浏览文件按钮连接
|
||||
self.buttons["browse_path"].clicked.connect(lambda: utils_rigging.browse_file(self, "项目路径", self.controls["project_path_input"]))
|
||||
self.buttons["browse_dna"].clicked.connect(lambda: utils_rigging.browse_file(self, "DNA文件", self.controls["presets_dna_input"], "dna"))
|
||||
|
||||
# 底部按钮连接
|
||||
self.buttons["remove_all"].clicked.connect(utils_rigging.remove_all)
|
||||
self.buttons["import_skeleton"].clicked.connect(utils_rigging.import_skeleton)
|
||||
self.buttons["build_rigging"].clicked.connect(utils_rigging.build_rigging)
|
Reference in New Issue
Block a user