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 )
{
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
@ DTYPE_BOOL
GV Bool. ID_GV_DATA_TYPE_BOOL.
Definition: lib_description.h:75
DynamicDescription * GetDynamicDescription()
BaseOverrideGroup * AddOverrideGroup()
BaseContainer GetCustomDataTypeDefault(Int32 type)
Definition: c4d_baselist.h:2173
@ AUTO
Auto override: the system overrides any edited parameter (similar to Auto Key).
Definition: lib_takesystem.h:180
RenderData * GetFirstRenderData(void)
Definition: c4d_baseobject.h:1253
Definition: c4d_baseobject.h:224
void InsertTake(BaseTake *takeToMove, BaseTake *destTake, Int32 insertMode)
Definition: lib_description.h:328
Definition: lib_takesystem.h:319
BaseMaterial * SearchMaterial(const maxon::String &str)
void AddToGroup(TakeData *takeData, BaseList2D *node)
void SetString(Int32 id, const maxon::String &s)
Definition: c4d_basecontainer.h:569
void SetRenderData(TakeData *takeData, RenderData *rData)
Definition: lib_takesystem.h:78
return OK
Definition: apibase.h:2546
BaseTake * AddTake(const String &name, BaseTake *parent, BaseTake *cloneFrom)
BaseTag * AddTag(TakeData *takeData, Int32 type, BaseMaterial *mat)
Int32 GetCount() const
Definition: c4d_baselist.h:1648
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:66
#define Ocamera
Camera - CameraObject.
Definition: ge_prepass.h:986
RenderData * GetNext(void)
Definition: c4d_basedocument.h:168
Definition: lib_takesystem.h:573
BaseTake * GetNext() const
Definition: lib_takesystem.h:338
void SetCamera(TakeData *takeData, BaseObject *camera)
Definition: c4d_string.h:38
Bool SetParameter(const DescID &id, const GeData &t_data, DESCFLAGS_SET flags)
BaseTake * GetCurrentTake()
#define INSERT_UNDER
Insert under.
Definition: customgui_listview.h:591
void GetActiveObjects(AtomArray &selection, GETACTIVEOBJECTFLAGS flags) const
Definition: c4d_gedata.h:82
Definition: c4d_baselist.h:1360
void SetName(const maxon::String &name)
Definition: c4d_baselist.h:2353
maxon::Int32 Int32
Definition: ge_sys_math.h:60
#define ApplicationOutput(formatString,...)
Definition: debugdiagnostics.h:208
#define Ttexture
Texture - TextureTag.
Definition: ge_prepass.h:1245
BaseOverride * OverrideNode(TakeData *takeData, BaseList2D *node, Bool deleteAnim)
void SetChecked(Bool status)
@ PRIM_SPHERE_RAD
Definition: osphere.h:6
Definition: ge_autoptr.h:36
static void Free(BaseObject *&bl)
@ DESC_NAME
String Name for standalone use.
Definition: lib_description.h:91
Definition: c4d_basedocument.h:136
maxon::Bool Bool
Definition: ge_sys_math.h:55
BaseObject * GetActiveObject(void)
String GetName() const
Definition: c4d_baselist.h:2347
BaseOverride * FindOverride(TakeData *takeData, BaseList2D *node)
Int32 GetType() const
Definition: c4d_baselist.h:1377
Definition: c4d_basematerial.h:27
Definition: lib_description.h:734
BaseTake * GetDown() const
Definition: lib_takesystem.h:356
DescID Alloc(const BaseContainer &datadescription)
void AutoTake(TakeData *takeData, BaseList2D *node, BaseList2D *undo)
Definition: c4d_basecontainer.h:46
C4DAtom * GetIndex(Int32 idx) const
Definition: c4d_baselist.h:1663