About
A BaseTake object represents a take of the Take System. It stores BaseOverride objects that define how a specific entity is changed in the given take.
Access
BaseTake objects are returned from the BaseDocument via the TakeData object.
if (takeData == nullptr )
if (mainTake == nullptr )
Allocation/Deallocation
A BaseTake is created and deleted using the TakeData object:
if (mainTake == nullptr )
BaseTake *
const newTake = takeData->
AddTake (
"this is a new take" ,
nullptr ,
nullptr );
if (newTake == nullptr )
Note Always use TakeData::AddTake() to clone a take.
Navigation
Like many other entities takes are organized in a BaseList2D tree. One can use the typical functions to navigate that tree.
while (take != nullptr )
{
}
Marked
Takes can be marked in the Take Manager. This allows to render just a subset of all takes. The API allows to manage this marked state:
while (take != nullptr )
{
}
Utility
Overrides
BaseOverride
A BaseOverride defines the parameter changes for a specific object in a BaseTake . BaseOverrides are managed using methods of BaseTake :
if (object == nullptr )
if (baseOverride != nullptr )
{
}
Overrides can also be created automatically:
if (activeObject == nullptr )
BaseTake *
const newTake = takeData->
AddTake (
"this is a new take" ,
nullptr ,
nullptr );
if (newTake == nullptr )
if (activeObjectOverride == nullptr )
BaseTake::AutoTake() is especially useful to create the proper overrides when "Auto Take" is enabled. Just an unaltered clone of the changed object or the reference object from the undo stack is required:
if (undoObject == nullptr )
{
if (currentTake && !currentTake->
IsMain ())
{
currentTake->
AutoTake (takeData, sphereObject, undoObject);
}
}
BaseOverrideGroup
Override groups act like virtual null objects. They allow to add certain tags to a selection of objects.
if (selectedObjects == nullptr )
BaseTake *
const take = takeData->
AddTake (
"Green Objects" ,
nullptr ,
nullptr );
if (take == nullptr )
if (group == nullptr )
group->
SetName (
"Green Material" _s);
if (mat != nullptr )
{
}
Camera
Takes also manage the camera currently in use. These functions allow to set and get the camera used for a certain take:
BaseTake::GetCamera() : Returns the camera used by this take which could also be the default camera or nullptr
if the parent take's camera should be used.
BaseTake::GetEffectiveCamera() : Returns the camera that is effectively used by the given take.
BaseTake::SetCamera() : Sets the camera used for this take. nullptr
means the parent take's settings should apply.
if (selectedObjects == nullptr )
{
if (element == nullptr )
{
CameraObject *
const camera = static_cast<CameraObject*>(element);
const String takeName {
"Take for camera " + camera->
GetName () };
BaseTake *
const cameraTake = takeData->
AddTake (takeName,
nullptr ,
nullptr );
if (cameraTake == nullptr )
}
}
Render Settings
Takes also manage render settings. As with the camera, it is possible to assign specific render settings to each take.
while (renderData != nullptr )
{
const String takeName =
"Take for RenderData " + renderDataName;
BaseTake *
const renderDataTake = takeData->
AddTake (takeName,
nullptr ,
nullptr );
if (renderDataTake == nullptr )
renderData = renderData->
GetNext ();
}
Userdata
A BaseTake can host userdata that can help to identify the take along the production pipeline. This userdata is managed using the default BaseList2D methods:
See also DynamicDescription Manual .
Utility
Further Reading
GV Bool. ID_GV_DATA_TYPE_BOOL.
Definition: lib_description.h:71
DynamicDescription * GetDynamicDescription()
BaseOverrideGroup * AddOverrideGroup()
BaseContainer GetCustomDataTypeDefault(Int32 type)
Definition: c4d_baselist.h:2100
Auto override: the system overrides any edited parameter (similar to Auto Key).
Definition: lib_takesystem.h:176
RenderData * GetFirstRenderData(void)
Definition: c4d_baseobject.h:1179
Definition: c4d_baseobject.h:220
void InsertTake(BaseTake *takeToMove, BaseTake *destTake, Int32 insertMode)
Definition: lib_description.h:315
Definition: lib_takesystem.h:315
BaseMaterial * SearchMaterial(const maxon::String &str)
void AddToGroup(TakeData *takeData, BaseList2D *node)
void SetString(Int32 id, const maxon::String &s)
Definition: c4d_basecontainer.h:565
void SetRenderData(TakeData *takeData, RenderData *rData)
Definition: lib_takesystem.h:74
return OK
Definition: apibase.h:2462
BaseTake * AddTake(const String &name, BaseTake *parent, BaseTake *cloneFrom)
BaseTag * AddTag(TakeData *takeData, Int32 type, BaseMaterial *mat)
Int32 GetCount() const
Definition: c4d_baselist.h:1575
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:66
#define Ocamera
Camera - CameraObject.
Definition: ge_prepass.h:970
RenderData * GetNext(void)
Definition: c4d_basedocument.h:141
Definition: lib_takesystem.h:569
BaseTake * GetNext() const
Definition: lib_takesystem.h:334
void SetCamera(TakeData *takeData, BaseObject *camera)
Definition: c4d_string.h:36
Bool SetParameter(const DescID &id, const GeData &t_data, DESCFLAGS_SET flags)
BaseTake * GetCurrentTake()
#define INSERT_UNDER
Insert under.
Definition: customgui_listview.h:584
void GetActiveObjects(AtomArray &selection, GETACTIVEOBJECTFLAGS flags) const
Definition: c4d_gedata.h:77
Definition: c4d_baselist.h:1287
void SetName(const maxon::String &name)
Definition: c4d_baselist.h:2265
maxon::Int32 Int32
Definition: ge_sys_math.h:45
#define ApplicationOutput(formatString,...)
Definition: debugdiagnostics.h:209
#define Ttexture
Texture - TextureTag.
Definition: ge_prepass.h:1229
BaseOverride * OverrideNode(TakeData *takeData, BaseList2D *node, Bool deleteAnim)
void SetChecked(Bool status)
Definition: ge_autoptr.h:32
static void Free(BaseObject *&bl)
String Name for standalone use.
Definition: lib_description.h:87
Definition: c4d_basedocument.h:109
maxon::Bool Bool
Definition: ge_sys_math.h:40
BaseObject * GetActiveObject(void)
String GetName() const
Definition: c4d_baselist.h:2259
BaseOverride * FindOverride(TakeData *takeData, BaseList2D *node)
Int32 GetType() const
Definition: c4d_baselist.h:1304
Definition: c4d_basematerial.h:23
Definition: lib_description.h:722
BaseTake * GetDown() const
Definition: lib_takesystem.h:352
DescID Alloc(const BaseContainer &datadescription)
void AutoTake(TakeData *takeData, BaseList2D *node, BaseList2D *undo)
Definition: c4d_basecontainer.h:42
C4DAtom * GetIndex(Int32 idx) const
Definition: c4d_baselist.h:1590