About
A Mt2dTrackData object stores information on 2D tracks created with the Motion Tracker object. It provides access to Mt2dTrack objects that represent such tracks. Spacial information is represented by MtData objects.
Access
The Mt2dTrackData object is obtained from the parent MotionTrackerObject.
- Warning
- The returned object is a copy owned by the caller.
if (trackData == nullptr)
Definition: lib_motiontracker.h:71
Int32 GetTrackCount() const
static void Free(Mt2dTrackData *&p)
static String IntToString(Int32 v)
Definition: c4d_string.h:495
maxon::Int32 Int32
Definition: ge_sys_math.h:60
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:67
#define ApplicationOutput(formatString,...)
Definition: debugdiagnostics.h:210
Access Tracks
The Mt2dTrackData object provides access to 2D tracks:
A copy of a track has to be freed with:
if (trackData == nullptr)
{
if (track == nullptr)
}
Py_ssize_t i
Definition: abstract.h:645
Definition: ge_autoptr.h:155
void Assign(TYPE *p)
Definition: ge_autoptr.h:234
Mt2dTrack * GetTrackByIndex(Int32 idx) const
Definition: lib_motiontracker.h:156
Definition: c4d_string.h:39
Access Track Data
A Mt2dTrack object stores several properties:
A valid status is:
A track may only be valid for certain frames. This validity is stored in a BaseSelect object:
if (frameRange == nullptr)
freeFrames.
Assign(frameRange);
{
ApplicationOutput(trackName +
" contains data for the range " + segmentBeginStr +
" to " + segmentEndStr);
}
Definition: c4d_baseselect.h:32
Bool GetRange(Int32 seg, Int32 maxElements, Int32 *a, Int32 *b) const
Definition: apibasemath.h:34
BaseSelect * GetFramesWithTrackData() const
Position Data
The information on the position of the track for a given frame is stored in a MtData object. Such an object is returned by the Mt2dTrack:
Spacial information is obtained from that MtData object:
const Int32 firstFrame = footage->GetFirstFrameNumber();
const Int32 lastFrame = footage->GetLastFrameNumber();
{
{
if (frameData == nullptr)
}
}
Bool IsSelected(Int32 num) const
Definition: c4d_baseselect.h:162
MtData * GetDataForFrame(Int32 frameNum) const
Definition: lib_motiontracker.h:223
Vector GetPixelPosition(MtFootageData *sdkFh, Bool originalRes) const
static String VectorToString(const Vector32 &v, Int32 nnk=-1)
Definition: c4d_string.h:571
void Py_ssize_t * pos
Definition: dictobject.h:50
PyFrameObject * frame
Definition: pycore_traceback.h:92
Further Reading