🚨 Latest Research:Tanstack npm Packages Compromised in Ongoing Mini Shai-Hulud Supply-Chain Attack.Learn More →
Socket
Book a DemoSign in
Socket

ae-lib

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ae-lib

Helper functions for After Effects

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

ae-lib

Utility functions and prototype patches for After Effects

What's included:

// work with a PropertyGroup as if it's an array
interface PropertyGroup {
  forEach: (cb: (property: PropertyBase, index: number, self: PropertyGroup) => void) => void
  map: <T = any>(cb: (property: PropertyBase, index: number, self: PropertyGroup) => T) => T[]
  filter: (cb: (property: PropertyBase, index: number, self: PropertyGroup) => boolean) => PropertyBase[]
  toArray: () => PropertyBase[]
}

// work with a LayerCollection as if it's an array
interface LayerCollection {
  forEach: (cb: (property: Layer, index: number, self: LayerCollection) => void) => void
  map: <T = any>(cb: (property: Layer, index: number, self: LayerCollection) => T) => T[]
  filter: (cb: (property: Layer, index: number, self: LayerCollection) => boolean) => Layer[]
  toArray: () => Layer[]
}

// some utility functions, they will become available on the global "utils" variable
interface Utils {
  // take the current selection and store it in an array
  serializeSelection(): string[]
  // restore the selection by providing the serialized variant provided by the method above
  restoreSelection(serializedSelection: string[]): void
  // add a marker to a layer
  tag(layer: Layer, tag: number, value: string): void
  // retrieve the marker's value on a layer at a given time
  getTag(layer: Layer, tag: number): string
  // check if a layer has a marker at given time
  hasTag(layer: Layer, tag: number): boolean
  // get a unique path for a property, for example: ['ADBE Transform', 'ADBE Rotation']
  toPropertyPath(property: PropertyBase, pretty?: boolean): string[]
  // get a property on a layer by providing a path, see the example of a path above
  getPropertyAtPath(layer: Layer, propertyPath: string[]): PropertyBase | null
  // get a unique name for a layer or property
  getUniqueName(collection: any, prefix: string): string
}

interface Global {
  utils: Utils
}

declare var utils: Utils

More info soon...

FAQs

Package last updated on 20 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts