Update
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# -*- coding: UTF-8 -*-
|
||||
from ngSkinTools2 import signal
|
||||
from ngSkinTools2.api import PaintMode, PaintModeSettings, flood_weights
|
||||
from ngSkinTools2.api.log import getLogger
|
||||
@@ -70,14 +71,14 @@ def build_ui(parent):
|
||||
toolbar.addAction(a)
|
||||
|
||||
t = QtWidgets.QToolBar()
|
||||
create_mode_button(t, PaintMode.replace, "Replace", "")
|
||||
create_mode_button(t, PaintMode.add, "Add", "")
|
||||
create_mode_button(t, PaintMode.scale, "Scale", "")
|
||||
create_mode_button(t, PaintMode.replace, "替换", "")
|
||||
create_mode_button(t, PaintMode.add, "添加", "")
|
||||
create_mode_button(t, PaintMode.scale, "减少", "")
|
||||
row.addWidget(t)
|
||||
|
||||
t = QtWidgets.QToolBar()
|
||||
create_mode_button(t, PaintMode.smooth, "Smooth", "")
|
||||
create_mode_button(t, PaintMode.sharpen, "Sharpen", "")
|
||||
create_mode_button(t, PaintMode.smooth, "平滑", "")
|
||||
create_mode_button(t, PaintMode.sharpen, "锐化", "")
|
||||
row.addWidget(t)
|
||||
|
||||
actions[model.current_settings.mode].setChecked(True)
|
||||
@@ -109,20 +110,20 @@ def build_ui(parent):
|
||||
model.current_settings.iterations = iterations.value()
|
||||
update_ui()
|
||||
|
||||
fixed_influences = QtWidgets.QCheckBox("Only adjust existing vertex influences")
|
||||
fixed_influences = QtWidgets.QCheckBox("仅调整顶点现有影响物,防止周围权重扩散")
|
||||
fixed_influences.setToolTip(
|
||||
"When this option is enabled, smooth will only adjust existing influences per vertex, "
|
||||
"and won't include other influences from nearby vertices"
|
||||
"启用此选项后,平滑-将仅调整每个顶点的现有影响物, "
|
||||
"而不会包含来自附近顶点的影响物,防止周围权重扩散"
|
||||
)
|
||||
|
||||
volume_neighbours = QtWidgets.QCheckBox("Smooth across gaps and thin surfaces")
|
||||
volume_neighbours = QtWidgets.QCheckBox("平滑间隙和薄表面")
|
||||
volume_neighbours.setToolTip(
|
||||
"Use all nearby neighbours, regardless if they belong to same surface. "
|
||||
"This will allow for smoothing to happen across gaps and thin surfaces."
|
||||
"使用所有附近相邻的面,无论它们是否属于同一个曲面."
|
||||
"这将允许在间隙和薄曲面之间进行平滑."
|
||||
)
|
||||
|
||||
limit_to_component_selection = QtWidgets.QCheckBox("Limit to component selection")
|
||||
limit_to_component_selection.setToolTip("When this option is enabled, smoothing will only happen between selected components")
|
||||
limit_to_component_selection = QtWidgets.QCheckBox("在选择的组件中平滑")
|
||||
limit_to_component_selection.setToolTip("启用此选项后,仅在选定组件之间进行平滑")
|
||||
|
||||
@qt.on(fixed_influences.stateChanged)
|
||||
@ui_lock.skip_if_updating
|
||||
@@ -154,16 +155,16 @@ def build_ui(parent):
|
||||
volume_neighbours.setChecked(model.current_settings.use_volume_neighbours)
|
||||
volume_neighbours.setEnabled(model.current_settings.mode == PaintMode.smooth)
|
||||
|
||||
settings_group = QtWidgets.QGroupBox("Mode Settings")
|
||||
settings_group = QtWidgets.QGroupBox("模式设置")
|
||||
layout = QtWidgets.QVBoxLayout()
|
||||
|
||||
layout.addLayout(createTitledRow("Mode:", mode_row()))
|
||||
layout.addLayout(createTitledRow("Intensity:", intensity.layout()))
|
||||
layout.addLayout(createTitledRow("Iterations:", iterations.layout()))
|
||||
layout.addLayout(createTitledRow("Influences limit:", influences_limit.layout()))
|
||||
layout.addLayout(createTitledRow("Weight bleeding:", fixed_influences))
|
||||
layout.addLayout(createTitledRow("Volume smoothing:", volume_neighbours))
|
||||
layout.addLayout(createTitledRow("Isolation:", limit_to_component_selection))
|
||||
layout.addLayout(createTitledRow("模式:", mode_row()))
|
||||
layout.addLayout(createTitledRow("强度:", intensity.layout()))
|
||||
layout.addLayout(createTitledRow("迭代次数:", iterations.layout()))
|
||||
layout.addLayout(createTitledRow("影响物限制:", influences_limit.layout()))
|
||||
layout.addLayout(createTitledRow("平滑辅助:", fixed_influences))
|
||||
layout.addLayout(createTitledRow("体积平滑:", volume_neighbours))
|
||||
layout.addLayout(createTitledRow("隔离选中组件:", limit_to_component_selection))
|
||||
settings_group.setLayout(layout)
|
||||
|
||||
update_ui()
|
||||
@@ -173,7 +174,7 @@ def build_ui(parent):
|
||||
def common_settings():
|
||||
layout = QtWidgets.QVBoxLayout()
|
||||
|
||||
mirror = QtWidgets.QCheckBox("Mirror")
|
||||
mirror = QtWidgets.QCheckBox("镜像")
|
||||
layout.addLayout(createTitledRow("", mirror))
|
||||
|
||||
@qt.on(mirror.stateChanged)
|
||||
@@ -182,8 +183,8 @@ def build_ui(parent):
|
||||
for _, v in model.presets.items():
|
||||
v.mirror = mirror.isChecked()
|
||||
|
||||
redistribute_removed_weight = QtWidgets.QCheckBox("Distribute to other influences")
|
||||
layout.addLayout(createTitledRow("Removed weight:", redistribute_removed_weight))
|
||||
redistribute_removed_weight = QtWidgets.QCheckBox("分配给其它影响物")
|
||||
layout.addLayout(createTitledRow("移除的权重:", redistribute_removed_weight))
|
||||
|
||||
@qt.on(redistribute_removed_weight.stateChanged)
|
||||
def redistribute_removed_weight_changed():
|
||||
@@ -195,7 +196,7 @@ def build_ui(parent):
|
||||
mirror.setChecked(model.current_settings.mirror)
|
||||
redistribute_removed_weight.setChecked(model.current_settings.distribute_to_other_influences)
|
||||
|
||||
group = QtWidgets.QGroupBox("Common Settings")
|
||||
group = QtWidgets.QGroupBox("常用设置")
|
||||
group.setLayout(layout)
|
||||
|
||||
update_ui()
|
||||
@@ -203,8 +204,8 @@ def build_ui(parent):
|
||||
return group
|
||||
|
||||
def apply_button():
|
||||
btn = QtWidgets.QPushButton("Apply")
|
||||
btn.setToolTip("Apply selected operation to vertex")
|
||||
btn = QtWidgets.QPushButton("应用")
|
||||
btn.setToolTip("将设定操作应用于选中顶点")
|
||||
|
||||
@qt.on(btn.clicked)
|
||||
def clicked():
|
||||
|
||||
Reference in New Issue
Block a user