From fccaa94938630d741ada61349ef5ad7c4f94aafe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=A3=AE=E6=96=8C?= Date: Fri, 22 Sep 2023 16:42:23 +0800 Subject: [PATCH] set some assets not need to preview when editing property (#16312) --- editor/inspector/contributions/node.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/editor/inspector/contributions/node.js b/editor/inspector/contributions/node.js index 171a1093c3b..d0437f39422 100644 --- a/editor/inspector/contributions/node.js +++ b/editor/inspector/contributions/node.js @@ -249,15 +249,13 @@ exports.listeners = { } /** - * Hackļ¼šstop preview - * For the reason: preview-set-property and cancel-preview-set-property is command machining. - * Changes between component properties are not controlled to be strictly reversible. - * So stop preview some properties. + * Some assets don`t need to preview, like: + * cc.AnimationClip */ - const stopPreviewOnTheseTooltips = [ - 'i18n:ENGINE.animation.default_clip', + const notNeedToPreview = [ + 'cc.AnimationClip', ]; - if (stopPreviewOnTheseTooltips.includes(dump.tooltip)) { + if (notNeedToPreview.includes(dump.type)) { return; }