-
首页
-
C4D R23.110 C++ SDK
#include <c4d_baselist.h>
详细描述
The base class of many classes within the API.
Represents an object that can be read from and written to disk, copied and that has a description for the Attribute Manager.
-
另请参阅
-
AtomArray
描述
|
Bool
|
GetDescription
(
描述
*description,
DESCFLAGS_DESC
flags)
|
Bool
|
GetParameter
(const
DescID
&id,
GeData
&t_data,
DESCFLAGS_GET
flags)
|
Bool
|
SetParameter
(const
DescID
&id, const
GeData
&t_data,
DESCFLAGS_SET
flags)
|
DynamicDescription
*
|
GetDynamicDescription
()
|
Bool
|
GetEnabling
(const
DescID
&id, const
GeData
&t_data,
DESCFLAGS_ENABLE
flags, const
BaseContainer
*itemdesc)
|
Bool
|
TranslateDescID
(const
DescID
&id,
DescID
&res_id,
C4DAtom
*&res_at)
|
构造函数 & 析构函数文档编制
◆
C4DAtom()
◆
~C4DAtom()
成员函数文档编制
◆
GetType()
Gets the type of the atom.
-
警告
-
This must be used to make sure that the derived object is really of the right type before casting it and accessing its members.
-
注意
-
Plugin nodes return their unique plugin IDs.
-
返回
-
The type, for example
Ocube
.
◆
GetRealType()
Int32
GetRealType
|
(
|
|
)
|
const
|
Gets the real type of the atom. This is similar to
GetType()
, but for multinodes the ID of the last linked part is returned.
E.g.
XPresso
nodes have the type
ID_GV_GROUPDATA
or
ID_GV_NODEDATA
but
GetRealType()
returns the ID of the operator.
-
返回
-
The type, for example
Ocube
.
◆
GetDiskType()
Int32
GetDiskType
|
(
|
|
)
|
const
|
Gets the atoms unique disk type ID.
-
注意
-
Normally this is the same as
GetType()
but there are exceptions.
-
返回
-
The type, for example
Ocube
.
◆
IsInstanceOf()
Checks if the atom is an instance of a base type.
-
注意
-
To check if an object is a spline, check
BaseList2D::GetInfo()
&
OBJECT_ISSPLINE
instead.
Be aware that generators like the Cloner or Alembic objects have the flag
OBJECT_ISSPLINE
set at registration, but calling
ToSpline()
would not return a valid
SplineObject
.
In the case of an Alembic generator representing a spline, get the cache and check the type of it.
-
参数
-
[in]
|
id
|
The base type ID, for example
Obase
.
|
-
返回
-
true
if the atom is an instance of the given type
id
, otherwise
false
.
◆
GetClassification()
Int32
GetClassification
|
(
|
|
)
|
const
|
Returns the base type of the atom; e.g.
Obase
for objects,
Tbase
for tags etc.
-
返回
-
The base type.
◆
Message()
Bool
消息
|
(
|
Int32
|
type
,
|
|
|
void *
|
data
=
nullptr
|
|
)
|
|
|
Sends a message to the atom only.
-
注意
-
Some notification messages are automatically passed along to branches:
MSG_POINTS_CHANGED
,
MSG_POLYGONS_CHANGED
and MSG_SEGMENTS_CHANGED.
This is for convenience and historical reasons.
-
参数
-
[in]
|
type
|
The message type, one of the following:
MSG
|
[in,out]
|
data
|
The message data. The sender owns the pointed data.
|
-
返回
-
Depends on the message
type
.
◆
MultiMessage()
Sends a message to the atom and to its children, parents or branches, depending on
flags
.
-
参数
-
[in]
|
flags
|
A combination of the following flags:
MULTIMSG_ROUTE
|
[in]
|
type
|
The message type, one of the following types:
MSG
|
[in,out]
|
data
|
The message data. The sender owns the pointed data.
|
-
返回
-
Depends on the message
type
.
◆
GetClone()
Retrieves a copy of the atom.
-
参数
-
[in]
|
flags
|
Flags for the clone:
COPYFLAGS
|
[in]
|
trn
|
An alias translator for the operation. Can be
nullptr
. The caller owns the pointed object.
|
-
返回
-
The cloned atom. The caller owns the pointed object.
◆
CopyTo()
Copies all values from
*this
to
*dst
.
-
警告
-
The atoms must be of the same type.
-
参数
-
[out]
|
dst
|
The destination. The caller owns the pointed object.
|
[in]
|
flags
|
Flags for the copy:
COPYFLAGS
|
[in]
|
trn
|
An alias translator for the operation. Can be
nullptr
. The caller owns the pointed object.
|
-
返回
-
true
if the atom was copied, otherwise
false
.
◆
Read()
Reads the atom from a
HyperFile
, manually specifying
id
and disk
level
.
-
注意
-
This is the function to use if the hyper has been opened manually and the object is read separately. If reading within a plugin function where
Cinema 4D
has passed the hyper file use
ReadObject()
.
-
Read()
,
Write()
,
ReadObject()
and
WriteObject()
are generally not recommended for plugins.
-
参数
-
[in]
|
hf
|
The hyper file to read from. The caller owns the pointed object.
|
[in]
|
id
|
The ID of the atom to read.
|
[in]
|
level
|
The disk level of the atom to read.
|
-
返回
-
true
if the atom was read, otherwise
false
.
◆
Write()
Writes the atom to a
HyperFile
.
-
注意
-
This is the function to use if the hyper has been opened manually and the object is written separately. If writing within a plugin function where
Cinema 4D
has passed the hyper file use
WriteObject()
.
-
警告
-
Read()
,
Write()
,
ReadObject()
and
WriteObject()
are generally not recommended for plugins.
-
参数
-
[in]
|
hf
|
The hyper file to write to. The caller owns the pointed object.
|
-
返回
-
true
if the atom was written, otherwise
false
.
◆
ReadObject()
Reads the atom from a
HyperFile
within another read operation.
-
注意
-
This is the function to use where
Cinema 4D
has passed the hyper file, for example in a plugin hook. Otherwise use
Read()
.
-
警告
-
Read()
,
Write()
,
ReadObject()
and
WriteObject()
are generally not recommended for plugins.
-
参数
-
[in]
|
hf
|
The hyper file to read from. The caller owns the pointed object.
|
[in]
|
readheader
|
Normally
true
. Should only be
false
if the file header is manually read.
|
-
返回
-
true
if the atom was read, otherwise
false
.
◆
WriteObject()
Writes the atom to a
HyperFile
, within another write operation.
-
注意
-
This is the function to use where
Cinema 4D
has passed the hyper file, for example in a plugin hook. Otherwise use
Write()
.
-
警告
-
Read()
,
Write()
,
ReadObject()
and
WriteObject()
are generally not recommended for plugins.
-
参数
-
[in]
|
hf
|
The hyper file to write to. The caller owns the pointed object.
|
-
返回
-
true
if the atom was written, otherwise
false
.
◆
GetDescription()
Gets the description for the atom.
-
参数
-
[out]
|
description
|
Filled with the atom's description. The caller owns the pointed object.
|
[in]
|
flags
|
Flags:
DESCFLAGS_DESC
|
-
返回
-
true
if the description was retrieved, otherwise
false
.
◆
GetParameter()
Gets a parameter of the atom.
-
参数
-
[in]
|
id
|
The ID of the parameter.
|
[out]
|
t_data
|
Assigned the parameter's data.
|
[in]
|
flags
|
Flags:
DESCFLAGS_GET
|
-
返回
-
true
if the parameter was retrieved, otherwise
false
.
◆
SetParameter()
Sets a parameter of the atom.
-
参数
-
[in]
|
id
|
The ID of the parameter.
|
[in]
|
t_data
|
The data to set.
|
[in]
|
flags
|
Flags:
DESCFLAGS_SET
|
-
返回
-
true
if the parameter was set, otherwise
false
.
◆
GetDynamicDescription()
Gets the dynamic description of the atom. (Also known as the user data part of the Attribute Manager.)
-
返回
-
The dynamic description. The atom owns the pointed object.
◆
GetEnabling()
Checks if a description parameter should be disabled or enabled.
-
参数
-
[in]
|
id
|
The ID of the parameter.
|
[out]
|
t_data
|
Assigned the current data.
|
[in]
|
flags
|
Flags:
DESCFLAGS_ENABLE
|
[out]
|
itemdesc
|
The parameter's description, encoded to a container as described in
描述
.
|
-
返回
-
true
if the parameter should be enabled, otherwise
false
.
◆
TranslateDescID()
Redirects description IDs between nodes.
-
参数
-
[in]
|
id
|
The description ID to redirect.
|
[in]
|
res_id
|
The target description ID.
|
[in]
|
res_at
|
The target node.
|
-
返回
-
true
if successful, otherwise
false
.
◆
GetDirty()
Gets the dirty checksum for the object. This can be used to check if the object has been changed.
-
另请参阅
-
GetHDirty()
-
参数
-
-
返回
-
The dirty checksum.
◆
SetDirty()
Sets the dirty checksum, the one returned by
GetDirty()
.
-
另请参阅
-
SetHDirty()
-
参数
-
◆
GetHDirty()
Gets the dirty bits for the specified mask.
-
另请参阅
-
GetDirty()
.
-
参数
-
-
返回
-
The dirty bits.
◆
SetHDirty()
Sets the dirty bits, the one returned by
GetHDirty()
.
-
另请参阅
-
SetDirty()
.
-
参数
-