OMC::QuaternionColumn Class Reference

Detailed Description

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

The quaternion column is a column type that provides a quaternion rotation value. For more information see OMC::Path3DColumn.

Public Member Functions

QList< OMC::Column * > convert_to_separate (QString conversionAlgo)
 Converts a 3D Path to a Separate, tuple of three beziers, and select it. More...
 
void create_point (double frame, double x, double y, double z, double tension, double continuity, double bias)
 Adds a keyframe to a 3D Path and sets the X, Y and Z value, as well as the tension, continuity and bias. More...
 
void remove_point (int pointIndex)
 Used to remove either a key frame, or a control point. 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::Path3DColumnValueoperator[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.
 
OMC::Columnvelocity_column
 Get the velocity column of the 3D Path.
 
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.
 

Properties

OMC::Obj velocity_column
 

Member Function Documentation

◆ convert_to_separate()

QList<OMC::Column*> OMC::Path3DColumn::convert_to_separate ( QString  conversionAlgo)
inherited

Converts a 3D Path to a Separate, tuple of three beziers, and select it.

The example below converts a 3D Path to a Separate with the chosen algorithm. Then links to the Separate beziers (node.linkAttr).

function TB_ConvertToSeparate()
{
var conversionAlgo = "TRANSFORM_MATRIX";
var selectedNode = selection.selectedNode(0);
if(selectedNode == "" || node.type(selectedNode) != "READ")
return;
var path3dColumn = node.linkedColumn(selectedNode, "offset.attr3dpath");
scene.beginUndoRedoAccum("Convert 3D Path to Separate with " + conversionAlgo);
var beziers = func.convertToSeparate(path3dColumn, conversionAlgo);
var offsetAttrType = node.getAttr(selectedNode, frame.current, "offset.separate");
offsetAttrType.setValueAt(true, frame.current);
if (offsetAttrType.boolValue())
{
node.unlinkAttr(selectedNode, "offset.x");
node.unlinkAttr(selectedNode, "offset.y");
node.unlinkAttr(selectedNode, "offset.z");
}
node.linkAttr(selectedNode, "offset.x", beziers[0]);
node.linkAttr(selectedNode, "offset.y", beziers[1]);
node.linkAttr(selectedNode, "offset.z", beziers[2]);
scene.endUndoRedoAccum();
}

With conversionAlgo = "TRANSFORM_MATRIX" : returns a identical spline except for the frame rate, i.e. there will be a slight change on frame's positions on the spline. When using "TRANSFORM_MATRIX" the velocity information is not preserved. With conversionAlgo = "BEZIER_FITTER" : Prioritize frame rate and velocity changes over spline's integrity.

Parameters
conversionAlgo: The name of the conversion method used. Either "TRANSFORM_MATRIX" or "BEZIER_FITTER".
Returns
Returns a list of the names of the resulting functions as separated beziers.

◆ create_point()

void OMC::Path3DColumn::create_point ( double  frame,
double  x,
double  y,
double  z,
double  tension,
double  continuity,
double  bias 
)
inherited

Adds a keyframe to a 3D Path and sets the X, Y and Z value, as well as the tension, continuity and bias.

Parameters
frame: Frame number for the point.
x: X value for the point.
y: Y value for the point.
z: Z value for the point.
tension: The tension value of the keyframe.
continuity: The continuity value of the keyframe.
bias: The bias value of the keyframe.

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

◆ remove_point()

void OMC::Path3DColumn::remove_point ( int  pointIndex)
inherited

Used to remove either a key frame, or a control point.

Parameters
point: The number of the point on the curve, from 0 to n-1, where n is the total number of points.

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