Class: oColumn

$. oColumn

Columns are the objects that hold all the animation information of an attribute. Any animated value in Harmony is so thanks to a column linked to the attribute representing the node parameter. Columns can be added from the scene class, or are directly created when giving a non 1 value when setting an attribute.

new $.oColumn(uniqueName, oAttributeObject)

openHarmony/openHarmony_column.js, line 86
The constructor for the $.oColumn class.
Name Type Description
uniqueName string The unique name of the column.
oAttributeObject $.oAttribute The oAttribute thats connected to the column.
Properties:
Name Type Description
uniqueName string The unique name of the column.
attributeObject $.oAttribute The attribute object that the column is attached to.
Example
// You can get the entirety of the columns in the scene by calling:
var doc = $.scn;
var allColumns = doc.columns;

// However, to get a specific column, you can retrieve it from its linked attribute:

var myAttribute = doc.nodes[0].attributes.position.x
var mycolumn = myAttribute.column;

// once you have the column, you can do things like remove duplicates keys to simplify an animation;
myColumn.removeDuplicateKeys();

// you can extract all the keys to be able to iterate over it:
var keyFrames = myColumn.getKeyFrames();

for (var i in keyFrames){
  $.log (keyFrames[i].frameNumber);
}

// you can also link a given column to more than one attribute so they share the same animated values:

doc.nodes[0].attributes.position.y.column = myColumn;  // now position.x and position.y will share the same animation on the node.

Members

readonlyframesArray.<$.oFrame>

An array of the oFrame objects provided by the column.

readonlykeyframesArray.<$.oFrame>

An array of the keyframes provided by the column.

namestring

The name of the column.

selectedbool

Whether the column is selected.

stepSectionobject

An object with three int values : start, end and step, representing the value of the stepped section parameter (interpolation with non linear "step" parameter).

readonlysubColumnsobject

Provides the available subcolumns, based on the type of the column.

readonlysubColumnsobject

The type of easing used by the column

readonlytypestring

The type of the column. There are nine column types: drawing (DRAWING), sound (SOUND), 3D Path (3DPATH), Bezier Curve (BEZIER), Ease Curve (EASE), Expression (EXPR), Timing (TIMING) for timing columns, Quaternion path (QUATERNIONPATH) for 3D rotation and Annotation (ANNOTATION) for annotation columns.

Methods

duplicate(newAttribute){$.oColumn}

openHarmony/openHarmony_column.js, line 336
Duplicates a column. Because of the way Harmony works, specifying an attribute the column will be connected to ensures higher value fidelity between the original and the copy.
Name Type Description
newAttribute $.oAttribute optional An attribute to link the column to upon duplication.
Returns:
Type Description
$.oColumn The column generated.

extendExposures(exposures, amount, replace)

openHarmony/openHarmony_column.js, line 278
Extends the exposure of the drawing's keyframes given the provided arguments.
Name Type Description
exposures Array.<$.oFrame> The exposures to extend. If UNDEFINED, extends all keyframes.
amount int The amount to extend.
replace bool Setting this to false will insert frames as opposed to overwrite existing ones.
Deprecated
  • Use oDrawingColumn.extendExposures instead.

    getKeyframes(){Array.<$.oFrame>}

    openHarmony/openHarmony_column.js, line 375
    Filters out only the keyframes from the frames array.
    Returns:
    Type Description
    Array.<$.oFrame> Provides the array of frames from the column.

    getKeyFrames(){Array.<$.oFrame>}

    openHarmony/openHarmony_column.js, line 402
    Filters out only the keyframes from the frames array.
    Deprecated
    • For case consistency, keyframe will never have a capital F
      Returns:
      Type Description
      Array.<$.oFrame> Provides the array of frames from the column.

      getTimelineLayer(timeline){int}

      openHarmony/openHarmony_column.js, line 466
      Retrieves the nodes index in the timeline provided.
      Name Type Description
      timeline oTimeline optional Optional: the timeline object to search the column Layer. (by default, grabs the current timeline)
      Returns:
      Type Description
      int The index within that timeline.

      getValue(frame){various}

      openHarmony/openHarmony_column.js, line 413
      Gets the value of the column at the given frame.
      Name Type Default Description
      frame int 1 optional The frame at which to get the value
      Returns:
      Type Description
      various The value of the column, can be different types depending on column type.

      interpolateValueAtFrame(percentage, frameNumber)

      openHarmony/openHarmony_column.js, line 494
      Create/Set a key at the given percentage between the surrounding keys. Requires the column to contain at least 2 keys.
      Name Type Description
      percentage int a value between 0 and 100 representing the position between first and second key
      frameNumber int the frame number to place the new value.
      Example
      // grab the current node and create a key at the current frame halfway between existing keys on all linked columns for this node.
      var selectedNode = $.scn.selectedNodes[0];
      var columns = _node.linkedColumns;
      var percentage = 50;
      var frameNumber = $.scn.currentFrame();
      
      for (var i in columns){
        try{
      	   columns[i].interpolateValueAtFrame(percentage, frameNumber); // ommitting the arguments will create a key at 50% on current frame by default.
        }catch(e){
          // will output errors for columns with less than 2 keys or which type don't support interpolation (for ex, DRAWING)
          $.log(e);
        }
      }

      remove()

      openHarmony/openHarmony_column.js, line 265
      Deletes the column from the scene. The column must be unlinked from any attribute first.

      removeDuplicateKeys()

      openHarmony/openHarmony_column.js, line 294
      Removes concurrent/duplicate keys from drawing layers.

      setValue(newValue, frame)

      openHarmony/openHarmony_column.js, line 438
      Sets the value of the column at the given frame.
      Name Type Default Description
      newValue various The new value to set the column to
      frame int 1 optional The frame at which to get the value