About
A BaseVideoPost object represents a video post effect in the render settings. Such a video post can be a simple filter or a complete render engine. Custom video posts can be created using the VideoPostData class.
BaseVideoPost objects are an instance of VPbase
.
const Int watermarkID = 1025462;
RenderData*
const renderData =
doc->GetActiveRenderData();
BaseVideoPost* videoPost = renderData->GetFirstVideoPost();
BaseVideoPost* watermark = nullptr;
while (videoPost != nullptr)
{
if (videoPost->GetType() == watermarkID)
{
watermark = videoPost;
break;
}
videoPost = videoPost->GetNext();
}
if (watermark == nullptr)
{
watermark = BaseVideoPost::Alloc(watermarkID);
if (watermark == nullptr)
renderData->InsertVideoPost(watermark);
}
#define BIT_VPDISABLED
Videopost is disabled.
Definition: ge_prepass.h:926
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:69
maxon::Int Int
Definition: ge_sys_math.h:55
const char * doc
Definition: pyerrors.h:226
Access
BaseVideoPost elements are stored in an RenderData object:
- RenderData::GetFirstVideoPost(): Returns the first BaseVideoPost object.
See also RenderData Manual.
Allocation/Deallocation
BaseVideoPost object are created with the usual tools:
- BaseVideoPost::Alloc(): Creates a new BaseVideoPost object.
- BaseVideoPost::Free(): Deletes the given BaseVideoPost object.
Newly created BaseVideoPost objects can be added to the render settings by adding them to the RenderData object:
- RenderData::InsertVideoPost(): Adds the given BaseVideoPost element to the list.
- RenderData::InsertVideoPostLast(): Adds the given BaseVideoPost element as the last element to the list.
RenderData*
const renderData =
doc->GetActiveRenderData();
if (renderData == nullptr)
if (colorCorrection == nullptr)
renderData->InsertVideoPost(colorCorrection);
#define VPcolorcorrection
Color correction.
Definition: c4d_videopostdata.h:224
Navigation
BaseVideoPost objects are organized in a list. This list can be navigated with:
- BaseVideoPost::GetNext(): Returns the next BaseVideoPost in the list.
- BaseVideoPost::GetPred(): Returns the previous BaseVideoPost in the list.
RenderData*
const renderData =
doc->GetActiveRenderData();
BaseVideoPost* videoPost = renderData->GetFirstVideoPost();
while (videoPost != nullptr)
{
videoPost = videoPost->GetNext();
}
#define ApplicationOutput(formatString,...)
Definition: debugdiagnostics.h:204
Properties
The parameters of a video post can be accessed through C4DAtom::GetParameter() and C4DAtom::SetParameter(). The IDs of these parameters are defined in the header file of the specific video post like vpxmbsampler.h
, vppreviewhardware.h
, vpwatermark.h
etc.
Read-Only Properties
Not every video post can be combined with every render engine. It is needed to ask the BaseVideoPost object if it can be used with the given render engine.
- BaseVideoPost::RenderEngineCheck(): Returns true if the video post will work with the given render engine.
RenderData*
const renderData =
doc->GetActiveRenderData();
BaseContainer& bc = renderData->GetDataInstanceRef();
BaseVideoPost* watermark = BaseVideoPost::Alloc(1025462);
if (watermark == nullptr)
if (watermark->RenderEngineCheck(renderEngine))
{
renderData->InsertVideoPost(watermark);
}
else
{
BaseVideoPost::Free(watermark);
}
@ RDATA_RENDERENGINE
Definition: drendersettings.h:39
maxon::Int32 Int32
Definition: ge_sys_math.h:51
Stereo
A video post could also handle stereoscopic related functionality. By default the only existing video post that does handle stereoscopic images is the stereo video post (ID 450000225
). To check if a plugin video post handles stereo images check the flag PLUGINFLAG_VIDEOPOST_STEREO_RENDERING. The source and target bitmap data is stored as a BaseBitmap (see BaseBitmap Manual).
- BaseVideoPost::StereoMergeImages(): Merges the given images into a single stereo image.
- BaseVideoPost::StereoGetCameraCountEditor(): If PLUGINFLAG_VIDEOPOST_STEREO_EDITOR is set the video post returns the number of stereoscopic editor cameras.
- BaseVideoPost::StereoGetCameraCountRenderer(): The video post returns the number of stereoscopic cameras used for rendering.
- BaseVideoPost::StereoGetCameraInfo(): The video post returns the information structure for a stereoscopic camera.
AutoAlloc<BaseVideoPost> stereoVP { 450000225 };
if (stereoVP == nullptr)
BaseContainer settings;
NONE
Definition: asset_browser.h:1
PyObject * src
Definition: abstract.h:305
@ RDATA_STEREO_MODE_ANAGLYPH
Definition: drendersettings.h:430
@ RDATA_STEREO_MODE
Definition: drendersettings.h:429
Bool ShowBitmap(const Filename &fn)
See also CameraObject Manual.
Bits
If a videopost is enabed or not is controlled with a bit:
RenderData*
const rd =
doc->GetActiveRenderData();
if (rd == nullptr)
BaseVideoPost* const vp = rd->GetFirstVideoPost();
if (vp != nullptr)
Further Reading