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:2428
Definition: c4d_baseobject.h:225
A unique marker that identifies an object.
Definition: c4d_baselist.h:1320
Int32 Compare(const GeMarker &m) const
Definition: c4d_baselist.h:1357
Definition: c4d_string.h:39
#define ApplicationOutput(formatString,...)
Definition: debugdiagnostics.h:210
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:1395
C4DAtom * GetClone(COPYFLAGS flags, AliasTrans *trn)
Definition: c4d_baselist.h:1480
Bool IsEqual(const GeMarker &m) const
Definition: c4d_baselist.h:1350
#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:55
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:498
BaseDocument * GetNext()
Definition: c4d_basedocument.h:534
Filename GetDocumentName()
Read and Write
GeMarker objects can be stored in a HyperFile.
Further Reading