OMC::ElementColumn Class Reference

Detailed Description

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

The Element column provides the timing and element ID for an ElementAttribute or DrawingAttribute. This element column is linked to an Element id, which sources its drawings from storage local to the scene. The column also provides a timing of these ElementDrawings, in order to expose certain ElementDrawings at certain times.

Public Member Functions

OMC::Elementattach_new_element (const QString &name, const QString &scanType, double fieldChart, const QString &fileFormat, const QString &vectorFormat)
 Insert and attach an element to the drawing column. More...
 
QVariant drawing_duplicate (int frameNumber)
 Duplicates the drawing at the specified frame in the specified column. More...
 
void drawing_delete (int framerange)
 Deletes the drawing at the specified frame in the specified column. More...
 
ElementDrawingdrawing (double atFrame)
 Returns the element drawing object at the given frame. More...
 
QString drawing_type (double atFrame)
 
void set_drawing_type (double atFrame, QString drawingType)
 Sets the drawing type at the given frame. More...
 
double key_exposure_next (double startFrame, const QVariant &flags)
 Returns the next key drawing in a drawing column. More...
 
void key_exposure_add (int frame)
 Adds a key drawing exposure at the specified frame in the specified column. More...
 
void key_exposure_remove (int frame)
 Removes a key drawing exposure at the specified frame in the specified column. More...
 
void key_exposure_remove_duplicate (int frameNumber)
 Removes duplicate key drawing exposure at the specified frame in the specified column. More...
 
void fill_empty (int startFrame, int endFrame)
 Fill with previous exposed drawings for the given range of frame. More...
 
int drawing_version (const QString &name) const
 Get the version of the drawing being used in the drawing column.
 
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::ElementDrawingoperator[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...
 
OMC::ElementDrawingListdrawings
 Get the list of drawings belonging to the drawing column and its element.
 
QStringList drawing_names
 Get the list of drawing names belonging to the drawing column and its element.
 
OMC::Elementelement
 Get/set the element attached to the drawing 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

◆ attach_new_element()

OMC::Element* OMC::ElementColumn::attach_new_element ( const QString &  name,
const QString &  scanType,
double  fieldChart,
const QString &  fileFormat,
const QString &  vectorFormat 
)

Insert and attach an element to the drawing column.

Adds an element to the project, and attaches the element id to the column, overriding any other element that may already be assigned to it.

◆ drawing()

ElementDrawing* OMC::ElementColumn::drawing ( double  atFrame)

Returns the element drawing object at the given frame.

Parameters
atFrame: The frame number.
Returns
Returns the element drawing object at the given frame.

◆ drawing_delete()

void OMC::ElementColumn::drawing_delete ( int  framerange)

Deletes the drawing at the specified frame in the specified column.

Parameters
framerange: The frame number or list of frames or a map of properties If a frame maps is provided, 2 properties from each of the following list must be provided: start frame list: "from", "start", "begin", "FROM", "START", "BEGIN" end frame list: "to", "end", "finish", "TO", "END", "FINISH"

◆ drawing_duplicate()

QVariant OMC::ElementColumn::drawing_duplicate ( int  frameNumber)

Duplicates the drawing at the specified frame in the specified column.

Parameters
frameNumberThe frame number.

◆ drawing_type()

QString OMC::ElementColumn::drawing_type ( double  atFrame)

Returns the drawing type in the drawing column at the given frame. K = key drawings, I = inbetween, B = breakdown

Parameters
atFrame: The frame number.
Returns
Returns the drawing type in the drawing column at the given frame.

◆ fill_empty()

void OMC::ElementColumn::fill_empty ( int  startFrame,
int  endFrame 
)

Fill with previous exposed drawings for the given range of frame.

Parameters
startFrame: The starting frame.
endFrame: The ending frame, just after the last filled frame.

◆ 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.

◆ key_exposure_add()

void OMC::ElementColumn::key_exposure_add ( int  frame)

Adds a key drawing exposure at the specified frame in the specified column.

Parameters
frame: The frame number.

◆ key_exposure_next()

double OMC::ElementColumn::key_exposure_next ( double  startFrame,
const QVariant &  flags 
)

Returns the next key drawing in a drawing column.

Parameters
startFrame: The frame number that specifies the search start point.
flags: The flags to filter for when searching for the next exposure.
Returns
Returns the starting frame of the next key drawing in a drawing column.

◆ key_exposure_remove()

void OMC::ElementColumn::key_exposure_remove ( int  frame)

Removes a key drawing exposure at the specified frame in the specified column.

Parameters
frame: The frame number.

◆ key_exposure_remove_duplicate()

void OMC::ElementColumn::key_exposure_remove_duplicate ( int  frameNumber)

Removes duplicate key drawing exposure at the specified frame in the specified column.

Parameters
frameNumber: The frame number.

◆ set_drawing_type()

void OMC::ElementColumn::set_drawing_type ( double  atFrame,
QString  drawingType 
)

Sets the drawing type at the given frame.

K = key drawings, I = inbetween, B = breakdown

Parameters
atFrame: The frame number.
drawingType: K = key drawings, I = inbetween, B = breakdown.

◆ 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::ElementDrawing* OMC::ElementColumn::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["ELEMENT_COLUMN_NAME"]
for n in range( 1, scene.frame_count ):
print( "Value at %s : %s"%(n, bez_col[n].name ) )
Inheritance diagram for OMC::ElementColumn:
Collaboration diagram for OMC::ElementColumn: