Lens Scripting API
    Preparing search index...

    Class AnimationPropertyLayer

    A layer containing different properties. Examples include position, rotation, scale or any other arbitrary properties a user would like to add and sample from.

    The name of the layer.

    //@input Component.AnimationPlayer player

    var animationTarget = script.getSceneObject()
    var animationAsset = AnimationAsset.create();
    var animationLayer = AnimationPropertyLayer.create();

    xCurve = AnimationCurve.createEasingCurve(0.0, 0.0, 0.83, 0, 0.17, 1);
    yCurve = AnimationCurve.createEasingCurve(0.0, 0.0, 0.83, 0, 0.17, 1);
    zCurve = AnimationCurve.createEasingCurve(0.0, 1.57, 0.83, 0, 0.17, 1);

    var rotTrack = AnimationPropertyTrack.createQuatFromCurves(xCurve, yCurve, zCurve);

    animationLayer.setProperty(AnimationPropertyLayer.TransformRotation, rotTrack);

    animationAsset.addLayer(animationTarget.name, animationLayer);

    var clip = script.player.getClip("Test");
    clip.animation = animationAsset;

    Hierarchy (View Summary)

    Index

    Properties

    BlendShapes: string

    Accessor string for BlendsShapes. In order to access a BlendShape track, use the accessor + the track name. Ex. "BlendShapes.JNT_4_HEAD". The delimiter "." separates the accessor and the property name.

    TransformPosition: string

    Accessor string for Transform Position property.

    TransformRotation: string

    Accessor string for Transform Rotation property.

    TransformScale: string

    Accessor string for Transform Scale property.

    VertexCache: string

    Accessor string for VertexCache.

    Visibility: string

    Accessor string for Visibility.

    Methods

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean

    • Deletes a property that exists in the layer.

      Parameters

      • name: string

      Returns void

    • Renames a property that already exists in the layer.

      Parameters

      • oldName: string
      • newName: string

      Returns void

    • Sets a custom property for a layer.

      Parameters

      Returns void