diff --git a/cocos/core/3d/framework/mesh-renderer.ts b/cocos/core/3d/framework/mesh-renderer.ts index 79648b5ceb..b78e813616 100644 --- a/cocos/core/3d/framework/mesh-renderer.ts +++ b/cocos/core/3d/framework/mesh-renderer.ts @@ -31,7 +31,7 @@ import { Texture2D } from '../../assets'; import { Material } from '../../assets/material'; import { Mesh } from '../../assets/mesh'; -import { ccclass, help, executeInEditMode, executionOrder, menu, tooltip, visible, type, formerlySerializedAs, serializable, editable } from 'cc.decorator'; +import { ccclass, help, executeInEditMode, executionOrder, menu, tooltip, visible, type, formerlySerializedAs, serializable, editable, disallowAnimation } from 'cc.decorator'; import { Vec4 } from '../../math'; import { scene, models } from '../../renderer'; import { Root } from '../../root'; @@ -165,6 +165,7 @@ export class MeshRenderer extends RenderableComponent { @serializable @editable + @disallowAnimation public lightmapSettings = new ModelLightmapSettings(); @serializable @@ -182,6 +183,7 @@ export class MeshRenderer extends RenderableComponent { */ @type(ModelShadowCastingMode) @tooltip('i18n:model.shadow_casting_model') + @disallowAnimation get shadowCastingMode () { return this._shadowCastingMode; } @@ -197,6 +199,7 @@ export class MeshRenderer extends RenderableComponent { */ @type(ModelShadowReceivingMode) @tooltip('i18n:model.shadow_receiving_model') + @disallowAnimation get receiveShadow () { return this._shadowReceivingMode; } @@ -239,6 +242,7 @@ export class MeshRenderer extends RenderableComponent { this.mesh.struct.morph.subMeshMorphs.some((subMeshMorph) => !!subMeshMorph) ); }) + @disallowAnimation get enableMorph () { return this._enableMorph; } diff --git a/cocos/core/components/component.ts b/cocos/core/components/component.ts index f279a634ce..d62ce62ffd 100644 --- a/cocos/core/components/component.ts +++ b/cocos/core/components/component.ts @@ -32,7 +32,7 @@ */ import { Script } from '../assets/scripts'; -import { ccclass, tooltip, displayName, type, serializable } from 'cc.decorator'; +import { ccclass, tooltip, displayName, type, serializable, disallowAnimation} from 'cc.decorator'; import { CCObject } from '../data/object'; import IDGenerator from '../utils/id-generator'; import { getClassName, value } from '../utils/js'; @@ -95,6 +95,7 @@ class Component extends CCObject { @displayName('Script') @type(Script) @tooltip('i18n:INSPECTOR.component.script') + @disallowAnimation get __scriptAsset () { return null; } /**