About
A GeMarker object contains an unique ID. It is used to identify BaseList2D based objects.
- Warning
- These markers change when the source object is copied or when the document is re-loaded.
Access
const String objectName =
object->GetName();
const GeMarker& marker =
object->GetMarker();
const BaseObject*
const foundObject =
doc->SearchObject(objectName);
if (foundObject != nullptr)
{
if (foundObjectMarker.
Compare(marker) == 0)
else
}
const GeMarker & GetMarker() const
Definition: c4d_baselist.h:2590
Definition: c4d_baseobject.h:248
A unique marker that identifies an object.
Definition: c4d_baselist.h:1445
Int32 Compare(const GeMarker &m) const
Definition: c4d_baselist.h:1482
Definition: c4d_string.h:41
#define ApplicationOutput(formatString,...)
Definition: debugdiagnostics.h:204
const char * doc
Definition: pyerrors.h:226
The marker of a copy is different than the marker of the original object:
const GeMarker& originalMarker =
object->GetMarker();
if (clone == nullptr)
doc->InsertObject(clone,
nullptr,
nullptr);
if (cloneMarker.
IsEqual(originalMarker) ==
false)
Definition: c4d_baselist.h:1520
C4DAtom * GetClone(COPYFLAGS flags, AliasTrans *trn) const
Definition: c4d_baselist.h:1605
Bool IsEqual(const GeMarker &m) const
Definition: c4d_baselist.h:1475
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:67
See also BaseList2D Marker.
Allocation/Deallocation
GeMarker objects can be created with the usual tools:
const Bool invalidMarkerA = markerA ==
nullptr;
const Bool invalidMarkerB = markerB ==
nullptr;
if (invalidMarkerA || invalidMarkerB)
if (markerA->IsEqual(*markerB) == false)
Definition: ge_autoptr.h:37
maxon::Bool Bool
Definition: ge_sys_math.h:51
Functionality
GeMarker objects can be handled with:
if (activeDocument == nullptr)
while (document != nullptr)
{
if (docMarker.
IsEqual(activeDocMarker))
{
}
else
{
}
}
BaseDocument * GetActiveDocument()
BaseDocument * GetFirstDocument()
Definition: c4d_basedocument.h:497
const BaseDocument * GetNext() const
Definition: c4d_basedocument.h:533
Filename GetDocumentName() const
Read and Write
GeMarker objects can be stored in a HyperFile.
Further Reading