disallowAnimation of some property (#7791)

This commit is contained in:
zheng han
2020-11-18 14:50:45 +08:00
committed by GitHub
parent c3c83dbfde
commit 9872a49fb1
2 changed files with 7 additions and 2 deletions
+5 -1
View File
@@ -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;
}
+2 -1
View File
@@ -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; }
/**