MtFootageData Manual

内容表

关于

A MtFootageData object stores information on the video footage loaded by the parent MotionTrackerObject .

Access

The MtFootageData object is obtained from the parent MotionTrackerObject .

警告
The returned object is a copy owned by the caller.
// This example accesses the Motion Tracker object // to print the used footage filename to the console.

// check if an object is selected and if it is a Motion Tracker object BaseObject * const obj = doc-> GetActiveObject (); if (obj == nullptr || !obj-> IsInstanceOf ( Omotiontracker )) return maxon::IllegalArgumentError( MAXON_SOURCE_LOCATION );

const MotionTrackerObject * const moTrackObject = static_cast< MotionTrackerObject * > (obj);
MtFootageData * footage = moTrackObject-> GetFootageData (); if (footage == nullptr ) return maxon::UnexpectedError( MAXON_SOURCE_LOCATION ); const Filename footageName = footage-> GetFootageName (); ApplicationOutput ( "Footage: " + footageName. GetString ());

// do not forget to free the copy MtFootageData::Free (footage);

Footage Data

The MtFootageData object provides read-access to several properties of the loaded video footage.

General information on the loaded footage:

Video Resolution and Ratio of the loaded footage:

// This example prints various settings of the // used footage to the console window. MtFootageData * footage = moTrackObject-> GetFootageData (); if (footage == nullptr ) return maxon::UnexpectedError( MAXON_SOURCE_LOCATION );

// AutoFree takes ownership AutoFree<MtFootageData> freeFootage; freeFootage. 赋值 (footage);

// access and print footage filename const Filename footageName = footage-> GetFootageName (); ApplicationOutput ( "Footage: " + footageName. GetString ());

// access footage resolution const Int32 width = footage-> GetResolutionWidthPix ( true ); const Int32 height = footage-> GetResolutionHeightPix ( true );

// print result const String widthStr = String::IntToString (width); const String heightStr = String::IntToString (height); ApplicationOutput ( "Width: " + widthStr + ", Height: " + heightStr);

延伸阅读

AutoFree::Assign
void Assign(TYPE *p)
定义: ge_autoptr.h:225
BaseObject
定义: c4d_baseobject.h:224
Filename
Manages file and path names.
定义: c4d_file.h:93
AutoFree
定义: ge_autoptr.h:151
MtFootageData::GetResolutionWidthPix
Int32 GetResolutionWidthPix(Bool originalRes) const
MtFootageData::GetFootageName
Filename GetFootageName() const
MAXON_SOURCE_LOCATION
#define MAXON_SOURCE_LOCATION
定义: memoryallocationbase.h:66
Omotiontracker
#define Omotiontracker
Motion tracker.
定义: ge_prepass.h:1034
Filename::GetString
String GetString(void) const
String
定义: c4d_string.h:38
String::IntToString
static String IntToString(Int32 v)
定义: c4d_string.h:495
MotionTrackerObject::GetFootageData
MtFootageData * GetFootageData() const
MtFootageData
定义: lib_motiontracker.h:273
Int32
maxon::Int32 Int32
定义: ge_sys_math.h:58
ApplicationOutput
#define ApplicationOutput(formatString,...)
定义: debugdiagnostics.h:207
MtFootageData::GetResolutionHeightPix
Int32 GetResolutionHeightPix(Bool originalRes) const
BaseDocument::GetActiveObject
BaseObject * GetActiveObject(void)
C4DAtom::IsInstanceOf
Bool IsInstanceOf(Int32 id) const
定义: c4d_baselist.h:1373
MtFootageData::Free
static void Free(MtFootageData *&p)
MotionTrackerObject
定义: lib_motiontracker.h:357

Copyright  © 2014-2025 乐数软件    

工业和信息化部: 粤ICP备14079481号-1