This documentation is for the free plugin Py4D in CINEMA 4D R11.5 and not for the C4DSDK of Python in CINEMA 4D R12. For R12, please visit PluginCafe.com

c4d.C4DAtom – an important base class

The base class of many other classes.

class c4d.C4DAtom

SubClass

GeListNode CKey

Methods

C4DAtom.__eq__(self, other)
C4DAtom.__ne__(self, other)

Check if two different references point to the same object.

Note

Does not compare if two different objects are equal.

C4DAtom.CheckOwnership()

Returns the ownership. Normally you don’t need this method.

Return type:bool
Returns:True if Py4D owns the object, False if CINEMA 4D owns it.
C4DAtom.SetDirty(flags)

Sets the dirty checksum, the one returned by GetDirty().

Parameter:flags (int) –

Flags

DIRTY_MATRIX Matrix changed.
DIRTY_DATA Container changed.
DIRTY_SELECT Checks all valid selections of the object, e.g. points, edge, polys.
DIRTY_CACHE Checks if the cache of an object has been changed (rebuilt).
DIRTY_CHILDREN Checks if the children are dirty.
C4DAtom.GetDirty(flags)

Gets the dirty checksum for the object. This can be used to check if the object has been changed.

Parameter:flags (int) –

Flags

DIRTY_MATRIX Matrix changed.
DIRTY_DATA Container changed.
DIRTY_SELECT Checks all valid selections of the object, e.g. points, edge, polys.
DIRTY_CACHE Checks if the cache of an object has been changed (rebuilt).
DIRTY_CHILDREN Checks if the children are dirty.
Return type:int
Returns:The checksum.
C4DAtom.IsAlive()

Even though a reference still exists while the ref count is greater than 0, its no garantuee that the object is still alive. Imagine you have a reference and the object is freed by an user interaction outside Py4D, so a method will raise an exception.

Return type:bool
Returns:Returns True if the object is still alive, otherwise False
C4DAtom.CheckType(id)

Checks if this atom is an instance of a base type.

Parameter:id (int) – The type, for example Ocube.
Return type:int
Returns:True if the atom is an instance of the type id, otherwise False.
C4DAtom.GetType()

Get the type of the atom. This must be used to make sure that the derived object really is of the right type before trying to access its members.

Return type:int
Returns:The type, for example Ocube.
C4DAtom.GetClassification()

Returns the base type of the object, e.g. for all objects Obase,*Mmat* for all tags Tbase etc.

Return type:int
Returns:The base type.
C4DAtom.CopyTo(dst, flags)

Copies all values from self to dst. The atoms must be of the same type!

Parameters:
  • dst (C4DAtom) –
  • flags (int) –
    COPY_NO_HIERARCHY Copy without children.
    COPY_NO_ANIMATION Copy without tracks, sequences or keys.
    COPY_NO_BITS Don’t copy BaseList2D bits.
    COPY_NO_BRANCHES Don’t copy branches, for example tags on an object. Automatically implies COPY_NO_ANIMATION, as animation is a branch.
    COPY_NO_INTERNALS This flag means that just the source object’s data is transfered to the destination (without modifying the source).
    COPY_DOCUMENT This is a read-only flag that’s set when a complete document is copied.
    COPY_NONGONS Don’t copy N-gons.
Return type:

bool

Returns:

True if the atom was copied.

C4DAtom.GetClone([flags=0])

Clones the object and returns the reference.

Parameter:flags (int) –

Flags for the clone.

COPY_NO_HIERARCHY Copy without children.
COPY_NO_ANIMATION Copy without tracks, sequences or keys.
COPY_NO_BITS Don’t copy BaseList2D bits.
COPY_NO_BRANCHES Don’t copy branches, for example tags on an object. Automatically implies COPY_NO_ANIMATION, as animation is a branch.
COPY_NO_INTERNALS This flag means that base links aren’t transfered to the new cloned object, so that they still point at the source object.
COPY_DOCUMENT This is a read-only flag that’s set when a complete document is copied.
COPY_NONGONS Don’t copy N-gons.
Return type:C4DAtom
Returns:Minimum of type atom.

Table Of Contents

This Page