About
An AtomArray object is used to store multiple pointers to C4DAtom based elements. See C4DAtom Manual.
Access
An AtomArray is typically used to define a selection of scene elements:
See also BaseDocument Selections.
Allocation/Deallocation
An AtomArray object can be created with the usual tools.
Array Elements
Several functions can be used to edit the elements of the array:
if (selection == nullptr)
doc->GetSelection(selection);
for (
Int32 i = 0;
i < selection->GetCount(); ++
i)
{
{
}
}
Py_ssize_t i
Definition: abstract.h:645
Definition: ge_autoptr.h:37
Definition: c4d_baselist.h:2208
String GetName() const
Definition: c4d_baselist.h:2381
Definition: c4d_baselist.h:1395
maxon::Int32 Int32
Definition: ge_sys_math.h:60
#define atom
Definition: graminit.h:72
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:67
#define ApplicationOutput(formatString,...)
Definition: debugdiagnostics.h:210
#define Tbaselist2d
2D list.
Definition: ge_prepass.h:986
const char * doc
Definition: pyerrors.h:226
Objects of a certain type can be removed from the array:
const Int32 objCount = selection->GetCount();
static String IntToString(Int32 v)
Definition: c4d_string.h:495
#define NOTOK
Definition: ge_sys_math.h:267
#define Opoint
Point - PointObject.
Definition: ge_prepass.h:1081
Two AtomArray objects can be compared:
Drag and Drop
AtomArray objects are also often used to define arguments of drag and drop operations.
{
void* object = nullptr;
GetDragObject(
msg, &
type, &
object);
{
{
{
PrintName(draggedAtom);
}
PrintName(preferredAtom);
}
else
{
}
}
return false;
break;
}
PyObject * object
Definition: asdl.h:7
Definition: c4d_baselist.h:1651
Int32 GetUserID() const
Definition: c4d_baselist.h:1749
Int32 GetCount() const
Definition: c4d_baselist.h:1682
C4DAtom * GetPreferred() const
Definition: c4d_baselist.h:1780
C4DAtom * GetIndex(Int32 idx) const
Definition: c4d_baselist.h:1697
@ BFM_DRAG_FINISHED
Bool Drag finished.
Definition: gui.h:787
@ DRAGTYPE_ATOMARRAY
AtomArray.
Definition: gui.h:776
@ BFM_DRAGRECEIVE
Drag receive. (See DragAndDrop.)
Definition: gui.h:764
static const Int32 MOUSE_COPY
Copy cursor.
Definition: ge_prepass.h:2705
PyObject ** type
Definition: pycore_pyerrors.h:34
const char const char * msg
Definition: object.h:438
Copy
AtomArray objects can be copied with:
if (pointObjects == nullptr)
if (selection->CopyToFilter(pointObjects,
NOTOK,
Opoint))
{
const Int32 objCount = pointObjects->GetCount();
}
Further Reading