diff --git a/cocos/3d/skeletal-animation/skeletal-animation.ts b/cocos/3d/skeletal-animation/skeletal-animation.ts
index 62f980eb51c..a53df4e3ffc 100644
--- a/cocos/3d/skeletal-animation/skeletal-animation.ts
+++ b/cocos/3d/skeletal-animation/skeletal-animation.ts
@@ -23,7 +23,7 @@
*/
import {
- ccclass, executeInEditMode, executionOrder, help, menu, tooltip, type, serializable, editable,
+ ccclass, executeInEditMode, executionOrder, help, menu, type, serializable, editable,
} from 'cc.decorator';
import { SkinnedMeshRenderer } from '../skinned-mesh-renderer';
import { Mat4, cclegacy, js, assertIsTrue } from '../../core';
@@ -107,7 +107,7 @@ export class SkeletalAnimation extends Animation {
* 当前动画组件维护的挂点数组。要挂载自定义节点到受动画驱动的骨骼上,必须先在此注册挂点。
*/
@type([Socket])
- @tooltip('i18n:animation.sockets')
+ @editable
get sockets (): Socket[] {
return this._sockets;
}
@@ -131,7 +131,7 @@ export class SkeletalAnimation extends Animation {
* 是否使用预烘焙动画,默认启用,可以大幅提高运行效时率,但所有动画效果会被彻底固定,不支持任何形式的编辑和混合。
* 运行时动态修改此选项会在播放下一条动画片段时生效。
*/
- @tooltip('i18n:animation.use_baked_animation')
+ @editable
get useBakedAnimation (): boolean {
return this._useBakedAnimation;
}
diff --git a/cocos/animation/animation-component.ts b/cocos/animation/animation-component.ts
index 0c1045fc680..ced9b78886e 100644
--- a/cocos/animation/animation-component.ts
+++ b/cocos/animation/animation-component.ts
@@ -22,7 +22,7 @@
THE SOFTWARE.
*/
-import { ccclass, executeInEditMode, executionOrder, help, menu, tooltip, type, serializable } from 'cc.decorator';
+import { ccclass, executeInEditMode, executionOrder, help, menu, type, serializable, editable } from 'cc.decorator';
import { EDITOR_NOT_IN_PREVIEW, TEST } from 'internal:constants';
import { Component } from '../scene-graph/component';
import { Eventify, warnID, js, cclegacy } from '../core';
@@ -60,7 +60,6 @@ export class Animation extends Eventify(Component) {
* 设置时,已有剪辑关联的动画状态将被停止;若默认剪辑不在新的动画剪辑中,将被重置为空。
*/
@type([AnimationClip])
- @tooltip('i18n:animation.clips')
get clips (): (AnimationClip | null)[] {
return this._clips;
}
@@ -103,7 +102,6 @@ export class Animation extends Eventify(Component) {
* @see [[playOnLoad]]
*/
@type(AnimationClip)
- @tooltip('i18n:animation.default_clip')
get defaultClip (): AnimationClip | null {
return this._defaultClip;
}
@@ -131,7 +129,7 @@ export class Animation extends Eventify(Component) {
* 注意,若在组件开始运行前调用了 `crossFade` 或 `play()`,此字段将不会生效。
*/
@serializable
- @tooltip('i18n:animation.play_on_load')
+ @editable
public playOnLoad = false;
/**
diff --git a/editor/i18n/en/animation.js b/editor/i18n/en/animation.js
index 7d5f7e45433..055ec951478 100644
--- a/editor/i18n/en/animation.js
+++ b/editor/i18n/en/animation.js
@@ -18,7 +18,47 @@ module.exports = {
classes: {
'cc': {
+ 'Animation': {
+ 'properties': {
+ 'clips': {
+ displayName: 'Clips',
+ tooltip: 'All clips this component governs.',
+ },
+ 'defaultClip': {
+ displayName: 'Default Clip',
+ tooltip: 'The default clip to play.',
+ },
+ 'playOnLoad': {
+ displayName: 'Play On Load',
+ tooltip: 'Whether automatically play the default clip after component loaded.',
+ },
+ },
+ },
+ 'SkeletalAnimation': {
+ 'properties': {
+ __extends__: 'classes.cc.Animation.properties',
+ 'sockets': {
+ displayName: 'Sockets',
+ tooltip: 'The joint sockets this animation component maintains. ' +
+ 'Sockets have to be registered here before attaching custom nodes to animated joints.',
+ },
+ 'useBakedAnimation': {
+ displayName: 'Use Baked Animation',
+ tooltip: `Whether to bake animations. Default to true, ` +
+ `which substantially increases performance while making all animations completely fixed.` +
+ `Dynamically changing this property will take effect when playing the next animation clip.`,
+ },
+ },
+ },
'animation': {
+ 'AnimationController': {
+ properties: {
+ 'graph': {
+ displayName: 'Graph',
+ tooltip: 'The animation graph or animation graph variant associated with this animation controller.',
+ },
+ },
+ },
'PoseGraphOutputNode': {
displayName: 'Output Pose',
},
diff --git a/editor/i18n/zh/animation.js b/editor/i18n/zh/animation.js
index 08fe6073151..a164ef8588a 100644
--- a/editor/i18n/zh/animation.js
+++ b/editor/i18n/zh/animation.js
@@ -18,7 +18,44 @@ module.exports = {
classes: {
'cc': {
+ 'Animation': {
+ 'properties': {
+ 'clips': {
+ displayName: '剪辑列表',
+ tooltip: '此组件管理的所有剪辑。',
+ },
+ 'defaultClip': {
+ displayName: '默认剪辑',
+ tooltip: '默认播放的剪辑。',
+ },
+ 'playOnLoad': {
+ displayName: '加载后播放',
+ tooltip: '是否在组件加载完成后自动播放默认剪辑。',
+ },
+ },
+ },
+ 'SkeletalAnimation': {
+ 'properties': {
+ __extends__: 'classes.cc.Animation.properties',
+ 'sockets': {
+ displayName: '挂点列表',
+ tooltip: '当前动画组件维护的挂点列表。要挂载自定义节点到受动画驱动的骨骼上,必须先在此注册挂点。',
+ },
+ 'useBakedAnimation': {
+ displayName: '预烘培动画',
+ tooltip: '是否预烘焙动画,默认启用,可以大幅提高运行效时率,但所有动画效果会被彻底固定,不支持任何形式的编辑和混合。',
+ },
+ },
+ },
'animation': {
+ 'AnimationController': {
+ properties: {
+ 'graph': {
+ displayName: '图',
+ tooltip: '此动画控制器所关联的动画图或动画图变体。',
+ },
+ },
+ },
'PoseGraphOutputNode': {
displayName: '输出姿态',
},
diff --git a/editor/i18n/zh/localization.js b/editor/i18n/zh/localization.js
index 2e51cd91d3d..ae59472f96f 100755
--- a/editor/i18n/zh/localization.js
+++ b/editor/i18n/zh/localization.js
@@ -225,13 +225,6 @@ module.exports = link(mixin({
shadowMapSize: '阴影贴图分辨率,目前支持 Low_256x256、Medium_512x512、High_1024x1024、Ultra_2048x2048 四种精度的纹理',
maxReceived: '产生阴影的有效光源数量',
},
- animation: {
- default_clip: '在勾选自动播放或调用 play() 时默认播放的动画 clip。',
- clips: '通过脚本可以访问并播放的 AnimationClip 列表',
- play_on_load: '是否在运行游戏后自动播放默认动画 clip。',
- use_baked_animation: '是否使用预烘焙动画,默认启用,可以大幅提高运行效时率,
但所有动画效果会被彻底固定,不支持任何形式的编辑',
- sockets: '当前动画组件维护的挂点数组。要挂载自定义节点到受动画驱动的骨骼上,必须先在此注册挂点',
- },
audio: {
clip: '通过该组件播放的默认 AudioClip 引用',
volume: '音频的音量',