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)
Definition: lib_takesystem.h:335
Definition: lib_takesystem.h:589
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:67
const char * doc
Definition: pyerrors.h:226
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)
BaseTake * AddTake(const String &name, BaseTake *parent, BaseTake *cloneFrom)
void InsertTake(BaseTake *takeToMove, BaseTake *destTake, Int32 insertMode)
#define INSERT_UNDER
Insert under.
Definition: customgui_listview.h:597
- 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)
{
}
String GetName() const
Definition: c4d_baselist.h:2544
BaseTake * GetNext() const
Definition: lib_takesystem.h:353
BaseTake * GetDown() const
Definition: lib_takesystem.h:371
#define ApplicationOutput(formatString,...)
Definition: debugdiagnostics.h:204
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)
{
}
void SetChecked(Bool status)
maxon::Bool Bool
Definition: ge_sys_math.h:51
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)
{
}
Definition: c4d_baseobject.h:248
Definition: lib_takesystem.h:79
BaseOverride * FindOverride(TakeData *takeData, BaseList2D *node)
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)
BaseOverride * OverrideNode(TakeData *takeData, BaseList2D *node, Bool deleteAnim)
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);
}
}
static void Free(BaseObject *&bl)
void AutoTake(TakeData *takeData, BaseList2D *node, BaseList2D *undo)
Definition: c4d_gedata.h:83
BaseTake * GetCurrentTake() const
@ AUTO
Auto override: the system overrides any edited parameter (similar to Auto Key).
#define ConstDescID(...)
Definition: lib_description.h:594
@ PRIM_SPHERE_RAD
Definition: osphere.h:6
Represents a level within a DescID.
Definition: lib_description.h:298
BaseOverrideGroup
Override groups act like virtual null objects. They allow to add certain tags to a selection of objects.
if (selectedObjects == nullptr)
if (selectedObjects->GetCount() == 0)
BaseTake*
const take = takeData->
AddTake(
"Green Objects",
nullptr,
nullptr);
if (take == nullptr)
if (group == nullptr)
group->
SetName(
"Green Material"_s);
if (mat != nullptr)
for (
Int32 i = 0;
i < selectedObjects->GetCount(); ++
i)
{
}
Py_ssize_t i
Definition: abstract.h:645
Definition: ge_autoptr.h:37
Definition: c4d_baselist.h:2377
void SetName(const maxon::String &name, Bool setDirty=true)
Definition: c4d_baselist.h:2550
Definition: c4d_basematerial.h:28
Definition: lib_takesystem.h:196
BaseTag * AddTag(TakeData *takeData, Int32 type, BaseMaterial *mat)
void AddToGroup(TakeData *takeData, BaseList2D *node)
BaseOverrideGroup * AddOverrideGroup()
maxon::Int32 Int32
Definition: ge_sys_math.h:56
return OK
Definition: apibase.h:2735
#define Ttexture
Texture - TextureTag.
Definition: ge_prepass.h:1412
PyObject * element
Definition: unicodeobject.h:1016
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)
for (
Int32 i = 0;
i < selectedObjects->GetCount(); ++
i)
{
{
const String takeName {
"Take for camera " + camera->
GetName() };
BaseTake*
const cameraTake = takeData->
AddTake(takeName,
nullptr,
nullptr);
if (cameraTake == nullptr)
}
}
void SetCamera(TakeData *takeData, BaseObject *camera)
Definition: c4d_baselist.h:1521
Definition: c4d_baseobject.h:1407
Definition: c4d_string.h:41
#define Ocamera
Camera - CameraObject.
Definition: ge_prepass.h:1046
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();
}
void SetRenderData(TakeData *takeData, RenderData *rData)
Definition: c4d_basedocument.h:143
RenderData * GetNext()
Definition: c4d_basedocument.h:174
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:
BaseContainer GetCustomDataTypeDefault(Int32 type)
Definition: c4d_basecontainer.h:48
void SetString(Int32 id, const maxon::String &s)
Definition: c4d_basecontainer.h:651
Bool SetParameter(const DescID &id, const GeData &t_data, DESCFLAGS_SET flags)
DynamicDescription * GetDynamicDescriptionWritable()
Definition: lib_description.h:355
Definition: lib_description.h:828
void * userData
Definition: fileobject.h:20
@ DESC_NAME
String Name for standalone use.
Definition: lib_description.h:91
@ DTYPE_BOOL
GV Bool. ID_GV_DATA_TYPE_BOOL.
Definition: lib_description.h:75
PyStructSequence_Desc * desc
Definition: structseq.h:26
See also DynamicDescription Manual.
Utility
Further Reading