OMC::EaseColumn Class Reference

Detailed Description

A column providing an interpolated value from an easy curve defined by control points.


Generate an Example Column

from ToonBoom import harmony #Import the Harmony Module
sess = harmony.session() #Get access to the Harmony session, this class.
proj = sess.project #Get the active session's currently loaded project.
scene = proj.scene #Get the top scene in the project.
proj.history.begin( "Generating Test Column" )
columns = scene.columns #The overall node list of the scene.
#Create the new Ease Column
new_column = columns.create( "EASE", "NEW_EASE_COLUMN" )
value_incremental = 0
#Add a keyframe value every 10 frames.
for frame in range(1,60)[::10]:
print( "Setting Key Value at %s : %s"%(frame, value_incremental) )
new_column[frame] = value_incremental
value_incremental = value_incremental + 1
proj.history.end()

Public Member Functions

void create_point (double frame, double value, double easeIn, double angleEaseIn, double easeOut, double angleEaseOut, bool constSeg, QString continuity)
 Sets the values of a point on an Ease column. More...
 
void keyframes_clear (int startFrame=1, int endFrame=-1)
 Removes the keyframe(s) located at the given range. More...
 
bool keyframe_exists (QList< int > frame)
 Returns true if the column has a keyframe at the given argument. More...
 
QVariant keyframe_create (QList< int > frame)
 Set or add a keyframe at the given frame. More...
 
void keyframe_remove (QList< int > frame)
 Remove the keyframe at the given frame, if any.
 
QList< int > keyframe_list () const
 Returns the list of frames at which there's a keyframe. More...
 
QVariant get_entry (double atFrame, int subColumnIndex=-1) const virtual QVariant getEntry(double atFrame
 Returns the value of a cell in a column. More...
 
void set_entry (double atFrame, QVariant value, int subColumnIndex=-1)
 Sets the value of a cell in a column. More...
 
void scale (double scale_factor)
 Scales the values in a column by a scaling factor.
 

Public Attributes

OMC::EaseColumnValueoperator[int idx]
 The column object is is iterable and can provide values at given frames with the list operator. The frame value can be get and set from this interface. More...
 
double tension_ease
 The tension of the ease, 0 if the given column isn't an ease column.
 
int hold_start
 The start value of the hold.
 
int hold_stop
 The stop value of the hold.
 
int hold_step
 The step value of the hold.
 
int control_point_size
 The number of control points in the column.
 
OMC::ControlPointListcontrol_points
 Get the controlpoints in the column.
 
QString name
 Get/set the name of the column. This is the internal name of the column which is used as a unique identifier.
 
QString display_name
 Get/Set the displayable name of the column (like it would appear in the xSheet view).
 
QString type
 Get the type of the node.
 
QString anonymous
 Get/set the anonymous state of the column.
 
QList< OMC::Node * > linked_nodes
 Identifies nodes that are linked to the column.
 
QList< OMC::Attribute * > linked_attributes
 Identifies attributes that are linked to the column.
 

Member Function Documentation

◆ create_point()

void OMC::EaseColumn::create_point ( double  frame,
double  value,
double  easeIn,
double  angleEaseIn,
double  easeOut,
double  angleEaseOut,
bool  constSeg,
QString  continuity 
)

Sets the values of a point on an Ease column.

Parameters
frame: Frame number for the point.
value: Y value for the point.
easeIn: The number of frames in the ease-in.
angleEaseIn: The angle of the ease-in handle.
easeOut: The number of frames in the ease-out.
angleEaseOut: The angle of the ease-out handle.
constSeg: Boolean expression (with a true or false value) to indicate whether the segment is constant or interpolated.
continuity: String value for the continuity of the point. The string must be in all upper-case. The following are the acceptable values: STRAIGHT, SMOOTH and CORNER.

◆ get_entry()

QVariant OMC::Column::get_entry ( double  atFrame,
int  subColumnIndex = -1 
) const
inherited

Returns the value of a cell in a column.

Parameters
atFrame: The frame number at which to retrieve the value from.
subColumnIndex: The index of the sub-column. Only 3D Path columns support sub-column. They have sub-columns for the X, Y, Z and velocity values on the 3D Path. Each sub-column has an index:
  • X = 1
  • Y = 2
  • Z = 3
  • Velocity = 4
Returns
Returns the value of a cell in a column.

◆ keyframe_create()

QVariant OMC::KeyframeableColumn::keyframe_create ( QList< int >  frame)
inherited

Set or add a keyframe at the given frame.

The value evaluated at the given frame will be the keyframe's value.

Parameters
frame: The frame number or list of frame numbers to retrieve the value from.

◆ keyframe_exists()

bool OMC::KeyframeableColumn::keyframe_exists ( QList< int >  frame)
inherited

Returns true if the column has a keyframe at the given argument.

Parameters
frame: The frame number or list of frame numbers to retrieve the value from.
Returns
Returns true there is a keyframe at the given frame.

◆ keyframe_list()

QList<int> OMC::KeyframeableColumn::keyframe_list ( ) const
inherited

Returns the list of frames at which there's a keyframe.

Returns
Returns the list of frames at which there's a keyframe

◆ keyframes_clear()

void OMC::KeyframeableColumn::keyframes_clear ( int  startFrame = 1,
int  endFrame = -1 
)
inherited

Removes the keyframe(s) located at the given range.

Parameters
startFrame: The starting frame number of the range, inclusive.
endFrame: The ending frame number of the range, inclusive.

◆ set_entry()

void OMC::Column::set_entry ( double  atFrame,
QVariant  value,
int  subColumnIndex = -1 
)
inherited

Sets the value of a cell in a column.

Parameters
atFrameThe frame number at which to set the value to.
value: the new value
subColumnIndex: The index of the sub-column. Only 3D Path columns support sub-column. They have sub-columns for the X, Y, Z and velocity values on the 3D Path. Each sub-column has an index:
  • X = 1
  • Y = 2
  • Z = 3
  • Velocity = 4

Member Data Documentation

◆ operator[int idx]

OMC::EaseColumnValue* OMC::EaseColumn::operator[int idx]

The column object is is iterable and can provide values at given frames with the list operator. The frame value can be get and set from this interface.


Print Column Values

from ToonBoom import harmony #Import the Harmony Module
sess = harmony.session() #Get access to the Harmony session, this class.
proj = sess.project #Get the active session's currently loaded project.
scene = proj.scene #Get the top scene in the project.
columns = scene.columns #The overall column list of the scene.
bez_col = columns["EASE_COLUMN_NAME"]
for n in range( 1, scene.frame_count ):
print( "Value at %s : %s"%(n, bez_col[n].value ) )
Inheritance diagram for OMC::EaseColumn:
Collaboration diagram for OMC::EaseColumn: