mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
optimize mesh tooltips of editing fbx (#14277)
* hide smart link checkbox * optimize mesh tooltip
This commit is contained in:
@@ -294,7 +294,7 @@ module.exports = {
|
||||
},
|
||||
meshOptimizer: {
|
||||
name: 'Mesh Optimizer',
|
||||
title: 'Mesh Optimizer',
|
||||
title: 'Mesh Optimizer is used to simplify imported mesh.<br>Use it when you need to reduce model face count.<br>In some cases, face reduction could lead to various model defect. <br>Tweak properties and try again in those cases.',
|
||||
simplification: {
|
||||
name: 'Simplification',
|
||||
title: 'Simplification',
|
||||
@@ -339,7 +339,7 @@ module.exports = {
|
||||
simplify:{
|
||||
targetRatio: {
|
||||
name: 'Ratio',
|
||||
title: 'Target Ratio',
|
||||
title: 'The target face count ratio after face reduction. <br>0 means reduce to minimum, and 1 means no face reduction at all. ',
|
||||
},
|
||||
preserveSurfaceCurvature: {
|
||||
name: 'Surface Curvature',
|
||||
@@ -357,17 +357,13 @@ module.exports = {
|
||||
name: 'UV Foldover Edges',
|
||||
title: 'Preserve UV Foldover Edges',
|
||||
},
|
||||
enableSmartLink: {
|
||||
name: 'Smart Link',
|
||||
title: 'Enable Smart Link',
|
||||
},
|
||||
agressiveness: {
|
||||
name: 'Agressiveness',
|
||||
title: 'Agressiveness',
|
||||
title: 'Face reduction algorithm aggressiveness. <br>The higher it sets, the more aggressive the face reduction algorithm tries to delete faces. <br>High aggressiveness setting is more likely to cause defects in result.',
|
||||
},
|
||||
maxIterationCount: {
|
||||
name: 'Max Iteration Count',
|
||||
title: 'Max Iteration Count',
|
||||
title: 'The max iteration counts that the algorithm tries to further reduce faces of a model. <br>High iteration count is more likely to reach face reduction target, yet it is more likely to take more time and has higher chance to cause mistakes.',
|
||||
},
|
||||
},
|
||||
gltfpack: {
|
||||
|
||||
@@ -292,7 +292,7 @@ module.exports = {
|
||||
},
|
||||
meshOptimizer: {
|
||||
name: 'Mesh 优化',
|
||||
title: 'Mesh Optimizer',
|
||||
title: 'Mesh 优化可以被用来简化导入的模型,可以在需要模型减面时使用。<br>在一些少数情况下减面后的模型可能会出现显示异常,如发生这种情况请尝试调整参数并重试。',
|
||||
simplification: {
|
||||
name: 'Simplification',
|
||||
title: 'Simplification',
|
||||
@@ -337,7 +337,7 @@ module.exports = {
|
||||
simplify: {
|
||||
targetRatio: {
|
||||
name: 'LOD 压缩比例',
|
||||
title: 'Target Ratio',
|
||||
title: '减面之后的目标面数比例,0 代表减面至最少,1 代表没有减面的原模型。',
|
||||
},
|
||||
preserveSurfaceCurvature: {
|
||||
name: '保留表面曲率',
|
||||
@@ -355,17 +355,13 @@ module.exports = {
|
||||
name: '保留 UV 折叠边',
|
||||
title: 'Preserve UV Foldover Edges',
|
||||
},
|
||||
enableSmartLink: {
|
||||
name: '防止破面',
|
||||
title: 'Smart Link',
|
||||
},
|
||||
agressiveness: {
|
||||
name: '误差距离',
|
||||
title: 'Agressiveness',
|
||||
title: '模型减面算法的激进程度。<br>当设置数值越高时,算法的减免策略会越激进,但是过于激进的策略更有可能导致结果错误。',
|
||||
},
|
||||
maxIterationCount: {
|
||||
name: '计算迭代次数',
|
||||
title: 'Max Iteration Count',
|
||||
title: '最大重复计数代表减面算法运行的重复次数。<br>高数值可以使算法运行结果更接近目标,但也会增加运行时间和结果错误的概率。',
|
||||
},
|
||||
},
|
||||
gltfpack: {
|
||||
|
||||
@@ -111,10 +111,6 @@ exports.template = /* html */`
|
||||
<ui-label slot="label" value="i18n:ENGINE.assets.fbx.meshOptimizer.simplify.preserveUVFoldoverEdges.name" tooltip="i18n:ENGINE.assets.fbx.meshOptimizer.simplify.preserveUVFoldoverEdges.title"></ui-label>
|
||||
<ui-checkbox slot="content" class="meshOptimizer-preserveUVFoldoverEdges-checkbox"></ui-checkbox>
|
||||
</ui-prop>
|
||||
<ui-prop>
|
||||
<ui-label slot="label" value="i18n:ENGINE.assets.fbx.meshOptimizer.simplify.enableSmartLink.name" tooltip="i18n:ENGINE.assets.fbx.meshOptimizer.simplify.enableSmartLink.title"></ui-label>
|
||||
<ui-checkbox slot="content" class="meshOptimizer-enableSmartLink-checkbox"></ui-checkbox>
|
||||
</ui-prop>
|
||||
<ui-prop>
|
||||
<ui-label slot="label" value="i18n:ENGINE.assets.fbx.meshOptimizer.simplify.agressiveness.name" tooltip="i18n:ENGINE.assets.fbx.meshOptimizer.simplify.agressiveness.title"></ui-label>
|
||||
<ui-slider slot="content" class="meshOptimizer-agressiveness-slider" min="5" max="20" step="1"></ui-slider>
|
||||
@@ -185,7 +181,6 @@ exports.$ = {
|
||||
meshOptimizerPreserveBorderEdgesCheckbox: '.meshOptimizer-preserveBorderEdges-checkbox',
|
||||
meshOptimizerPreserveUVSeamEdgesCheckbox: '.meshOptimizer-preserveUVSeamEdges-checkbox',
|
||||
meshOptimizerPreserveUVFoldoverEdgesCheckbox: '.meshOptimizer-preserveUVFoldoverEdges-checkbox',
|
||||
meshOptimizerEnableSmartLinkCheckbox: '.meshOptimizer-enableSmartLink-checkbox',
|
||||
meshOptimizerAgressivenessSlider: '.meshOptimizer-agressiveness-slider',
|
||||
meshOptimizerMaxIterationCountSlider: '.meshOptimizer-maxIterationCount-slider',
|
||||
};
|
||||
@@ -558,23 +553,6 @@ const Elements = {
|
||||
updateElementReadonly.call(panel, panel.$.meshOptimizerTargetRatioSlider);
|
||||
},
|
||||
},
|
||||
enableSmartLink: {
|
||||
ready() {
|
||||
const panel = this;
|
||||
panel.$.meshOptimizerEnableSmartLinkCheckbox.addEventListener('change', panel.setProp.bind(panel, 'meshOptimizer.simplifyOptions.enableSmartLink', 'boolean'));
|
||||
panel.$.meshOptimizerEnableSmartLinkCheckbox.addEventListener('confirm', () => {
|
||||
panel.dispatch('snapshot');
|
||||
});
|
||||
},
|
||||
update() {
|
||||
const panel = this;
|
||||
|
||||
panel.$.meshOptimizerEnableSmartLinkCheckbox.value = getPropValue.call(panel, panel.meta.userData, true, 'meshOptimizer.simplifyOptions.enableSmartLink');
|
||||
|
||||
updateElementInvalid.call(panel, panel.$.meshOptimizerEnableSmartLinkCheckbox, 'meshOptimizer.simplifyOptions.enableSmartLink');
|
||||
updateElementReadonly.call(panel, panel.$.meshOptimizerEnableSmartLinkCheckbox);
|
||||
},
|
||||
},
|
||||
preserveSurfaceCurvature: {
|
||||
ready() {
|
||||
const panel = this;
|
||||
|
||||
Reference in New Issue
Block a user