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:2460
Definition: c4d_baseobject.h:248
A unique marker that identifies an object.
Definition: c4d_baselist.h:1321
Int32 Compare(const GeMarker &m) const
Definition: c4d_baselist.h:1358
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:1396
C4DAtom * GetClone(COPYFLAGS flags, AliasTrans *trn) const
Definition: c4d_baselist.h:1481
Bool IsEqual(const GeMarker &m) const
Definition: c4d_baselist.h:1351
#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:497
BaseDocument * GetNext()
Definition: c4d_basedocument.h:533
Filename GetDocumentName() const
Read and Write
GeMarker objects can be stored in a HyperFile.
Further Reading