OMC::Column Class Reference

Detailed Description

Represents and provides the methods for a column in a scene.

Columns are provided and created from the column list of the scene (OMC::Scene::columns). These columns are attached to attributes and are used to provide the attributes with animated values.
Different types of attributes require different types of columns; these columns have their own subclasses in order to provide type-specific functionality:



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 Bezier Column
new_column = columns.create( "BEZIER", "NEW_BEZIER_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

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

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

◆ get_entry()

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

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.

◆ set_entry()

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

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
Inheritance diagram for OMC::Column:
Collaboration diagram for OMC::Column: