c4d.GeListNode
¶
The base class of many other classes. This class is also a linked list which enables you to link several objects with each other.
c4d.
GeListNode
¶
GeListNode.InsertBefore()
GeListNode.InsertAfter()
GeListNode.InsertUnder()
GeListNode.InsertUnderLast()
GeListNode.GetNext()
GeListNode.GetPred()
GeListNode.GetUp()
GeListNode.GetDown()
GeListNode.GetDownLast()
GeListNode.GetChildren()
GeListNode.Remove()
GeListNode.GetDocument()
GeListNode.GetListHead()
GeListNode.GetBranchInfo()
NEW
GeListNode.IsDocumentRelated()
c4d.C4DAtom
GeListNode.
__setitem__
(
self
,
key
,
value
)
¶
Uses a description ID as a key into the container, and stores the specified data.
Note
Has to be used to set an object’s parameters data. Its corresponding function of the C++ API is C4DAtom::SetParameter() .
See also
Parameters: |
|
---|
GeListNode.
__getitem__
(
self
,
key
)
¶
Uses a description ID as a key into the container, and retrieves the stored data.
Note
Has to be used to get an object’s parameters data. Its corresponding function of the C++ API is C4DAtom::GetParameter() .
See also
Parameters: |
key
(int, list or
DescID
) – The description ID.
|
---|---|
Return type: | any |
Returns: |
See
__setitem__()
|
GeListNode.
InsertBefore
(
obj
)
¶
Insert self before obj .
Note
Take care
obj
is a correct type. For example it is not possible to insert a document under a
BaseObject
. Check this using
C4DAtom.GetClassification()
and
C4DAtom.GetType()
.
Warning
Forbidden to call in expressions (tags/nodes). Changing the document structure while an expression is evaluated will crash the application! See Threading Information .Parameters: | obj ( c4d.GeListNode ) – The object to insert before. |
---|
GeListNode.
InsertAfter
(
obj
)
¶
Insert self after obj .
Note
Take care
obj
is a correct type. For example it is not possible to insert a document under a
BaseObject
. Check this using
C4DAtom.GetClassification()
and
C4DAtom.GetType()
.
Warning
Forbidden to call in expressions (tags/nodes). Changing the document structure while an expression is evaluated will crash the application! See Threading Information .Parameters: | obj ( c4d.GeListNode ) – The object to insert after. |
---|
GeListNode.
InsertUnder
(
obj
)
¶
Insert self under obj .
Note
Please take care,
obj
is a correct type. For example you cannot insert a document under an BaseObject. You can check it by calling
C4DAtom.GetClassification()
and
C4DAtom.GetType()
.
Parameters: | obj ( c4d.GeListNode ) – The object to insert under. |
---|
GeListNode.
InsertUnderLast
(
obj
)
¶
Insert self as the last child of obj .
Note
Take care
obj
is a correct type. For example it is not possible to insert a document under a
BaseObject
. Check this using
C4DAtom.GetClassification()
and
C4DAtom.GetType()
.
Warning
Forbidden to call in expressions (tags/nodes). Changing the document structure while an expression is evaluated will crash the application! See Threading Information .Parameters: | obj ( c4d.GeListNode ) – The object to insert under. |
---|
GeListNode.
GetNext
(
)
¶
Returns the next object in the list.
Return type: | c4d.GeListNode or None |
---|---|
Returns: | The next object. |
GeListNode.
GetPred
(
)
¶
Returns the previous object in the list.
Return type: | c4d.GeListNode or None |
---|---|
Returns: | The previous object. |
GeListNode.
GetUp
(
)
¶
Returns the parent object.
Return type: | c4d.GeListNode or None |
---|---|
Returns: | The parent object. |
GeListNode.
GetDown
(
)
¶
Returns the first child of this object in the list.
Return type: | c4d.GeListNode or None |
---|---|
Returns: | The first child object. |
GeListNode.
GetDownLast
(
)
¶
Returns the last child of this object in the list.
Return type: | c4d.GeListNode or None |
---|---|
Returns: | The first child object. |
GeListNode.
GetChildren
(
)
¶
Returns children in a list (not grandchild).
Return type: |
list of type
GeListNode
|
---|---|
Returns: | All children in a list. |
GeListNode.
Remove
(
)
¶
Removes this node from a list.
Warning
Forbidden to call in expressions (tags/nodes). Changing the document structure while an expression is evaluated will crash the application! See Threading Information .
GeListNode.
GetDocument
(
)
¶
Get the document for this node.
Return type: | c4d.documents.BaseDocument |
---|---|
Returns: | The document. |
GeListNode.
GetListHead
(
)
¶
Returns the list head.
Return type: | c4d.GeListHead |
---|---|
Returns: |
The list head, or
None
if the node is not attached to one.
Changed in version R19:
The function now returns a
|
GeListNode.
GetBranchInfo
(
[
flags=GETBRANCHINFO_0
]
)
¶
New in version R19.
Returns information about which other nodes the node contains. For example objects contain tags.
Parameters: |
flags
(
int
) –
The flags:
|
||||||||
---|---|---|---|---|---|---|---|---|---|
Return type: | list of dict{‘head’, ‘name’, ‘id’, ‘flags’} | ||||||||
Returns: |
A list of dictionaries (
None
if the function failed) with the following information:
’head’:
c4d.GeListHead
: Either a
c4d.GeListNode
or a
c4d.GeListHead
for the branch, depending on
flags
.
’name’:
str
: The human readable name of the branch.
’id’:
int
: The base ID of the branch. For example
VPbase
,
Mbase
or
Obase
.
’flags’:
int
: The flags for the branch:
|
GeListNode.
IsDocumentRelated
(
)
¶
Checks if the node is of a type that can be inserted into a
BaseDocument
Return type: | bool |
---|---|
Returns: | True if the node is document related, otherwise False . |
GeListNode.
GetNBit
(
bit
)
¶
Raw access to a 64-bit bitfield, containing information about the node state.
Parameters: |
bit
(
int
) –
Bit index:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: | bool | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns: | Bit state. |
GeListNode.
ChangeNBit
(
bit
,
bitmode
)
¶
Sets bits in the 64-bit bitfield of the node.
Parameters: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: |
bool |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns: |
Bit state. |