-
首页
-
C4D R23.110 C++ SDK
EffectorData Class Reference
#include <c4d_baseeffectordata.h>
详细描述
A data class for creating effector plugins.
Effectors are objects that modifies motion data particles in the MoGraph module, and uses the same controls for deformation. (Effectors cannot run without the MoGraph module.)
-
注意
-
Effectors are executed by messaging them
MSG_EXECUTE_EFFECTOR
and passing an
Effector_PassData
structure. Use
RegisterEffectorPlugin()
to register an effector plugin.
Public Attributes
|
EffectorDataParameters *
|
edata
|
Inherited from NodeData/ObjectData
|
virtual
Bool
|
Init
(
GeListNode
*node)
|
virtual void
|
Free
(
GeListNode
*node)
|
virtual
Bool
|
GetDDescription
(
GeListNode
*node,
描述
*description,
DESCFLAGS_DESC
&flags)
|
virtual
DRAWRESULT
|
Draw
(
BaseObject
*op,
DRAWPASS
drawpass,
BaseDraw
*bd,
BaseDrawHelp
*bh)
|
virtual void
|
GetDimension
(
BaseObject
*op,
向量
*mp,
向量
*rad)
|
virtual
Bool
|
AddToExecution
(
BaseObject
*op,
PriorityList
*list)
|
virtual
EXECUTIONRESULT
|
Execute
(
BaseObject
*op,
BaseDocument
*doc,
BaseThread
*bt,
Int32
priority,
EXECUTIONFLAGS
flags)
|
virtual
Bool
|
ModifyObject
(
BaseObject
*mod,
BaseDocument
*doc,
BaseObject
*op, const
矩阵
&op_mg, const
矩阵
&mod_mg,
Float
lod,
Int32
flags,
BaseThread
*thread)
|
virtual
Bool
|
消息
(
GeListNode
*node,
Int32
type, void *t_data)
|
virtual
Int32
|
GetHandleCount
(
BaseObject
*op)
|
virtual void
|
GetHandle
(
BaseObject
*op,
Int32
i,
HandleInfo
&info)
|
virtual void
|
SetHandle
(
BaseObject
*op,
Int32
i,
向量
p, const
HandleInfo
&info)
|
virtual
Bool
|
CopyTo
(
NodeData
*dest,
GeListNode
*snode,
GeListNode
*dnode,
COPYFLAGS
flags,
AliasTrans
*trn)
|
virtual
Bool
|
IsInstanceOf
(const
GeListNode
*node,
Int32
type) const
|
virtual
Bool
|
GetDEnabling
(
GeListNode
*node, const
DescID
&id, const
GeData
&t_data,
DESCFLAGS_ENABLE
flags, const
BaseContainer
*itemdesc)
|
效应器
|
virtual
Bool
|
InitEffector
(
GeListNode
*node)
|
virtual void
|
FreeEffector
(
GeListNode
*node)
|
EffectorDataStruct
*
|
GetEffectorData
(void)
|
C4D_Falloff
*
|
GetFalloff
(void)
|
void
|
AddEffectorDependence
(
BaseObject
*op)
|
virtual
Int32
|
GetEffectorFlags
(void)
|
virtual
Bool
|
ModifyDDescription
(
GeListNode
*node,
描述
*description,
AtomArray
*ar)
|
virtual
Bool
|
ExecuteEffector
(
BaseObject
*op,
BaseDocument
*doc,
BaseObject
*gen,
MoData
*md,
Float
strength,
BaseThread
*thread)
|
virtual void
|
InitPoints
(
BaseObject
*op,
BaseObject
*gen,
BaseDocument
*doc,
EffectorDataStruct
*data,
MoData
*md,
BaseThread
*thread)
|
virtual void
|
ModifyPoints
(
BaseObject
*op,
BaseObject
*gen,
BaseDocument
*doc,
EffectorDataStruct
*data,
MoData
*md,
BaseThread
*thread)
|
virtual void
|
FreePoints
(void)
|
virtual void
|
CalcPlacebo
(
BaseObject
*op,
BaseObject
*gen,
BaseDocument
*doc,
EffectorDataStruct
*data,
Int32
index,
MoData
*md, const
向量
&globalpos,
Float
fall_weight)
|
virtual void
|
CalcPointValue
(
BaseObject
*op,
BaseObject
*gen,
BaseDocument
*doc,
EffectorDataStruct
*data,
Int32
index,
MoData
*md, const
向量
&globalpos,
Float
fall_weight)
|
virtual
向量
|
CalcPointColor
(
BaseObject
*op,
BaseObject
*gen,
BaseDocument
*doc,
EffectorDataStruct
*data,
Int32
index,
MoData
*md, const
向量
&globalpos,
Float
fall_weight)
|
FieldOutput
*
|
CalcFields
(
BaseDocument
*doc,
BaseObject
*generatorObject,
MoData
*md,
FIELDSAMPLE_FLAG
flags)
|
Additional Inherited Members
|
virtual
DRAWRESULT
|
DrawShadow
(
BaseObject
*op,
BaseDraw
*bd,
BaseDrawHelp
*bh)
|
virtual
Int32
|
DetectHandle
(
BaseObject
*op,
BaseDraw
*bd,
Int32
x,
Int32
y,
QUALIFIER
qualifier)
|
virtual
Bool
|
MoveHandle
(
BaseObject
*op,
BaseObject
*undo, const
向量
&mouse_pos,
Int32
hit_id,
QUALIFIER
qualifier,
BaseDraw
*bd)
|
virtual void
|
GetModelingAxis
(
BaseObject
*op,
BaseDocument
*doc,
矩阵
&axis)
|
virtual
BaseObject
*
|
GetVirtualObjects
(
BaseObject
*op,
HierarchyHelp
*hh)
|
virtual void
|
CheckDirty
(
BaseObject
*op,
BaseDocument
*doc)
|
virtual
SplineObject
*
|
GetContour
(
BaseObject
*op,
BaseDocument
*doc,
Float
lod,
BaseThread
*bt)
|
virtual void
|
ModifyParticles
(
BaseObject
*op,
Particle
*pp,
BaseParticle
*ss,
Int32
pcnt,
Float
diff)
|
|
NodeData
()
|
GeListNode
*
|
Get
(void) const
|
virtual void
|
GetBubbleHelp
(
GeListNode
*node,
maxon::String
&str)
|
virtual
BaseDocument
*
|
GetDocument
(
GeListNode
*node)
|
virtual
Int32
|
GetBranchInfo
(
GeListNode
*node,
BranchInfo
*info,
Int32
max,
GETBRANCHINFO
flags)
|
virtual
Bool
|
IsDocumentRelated
(const
GeListNode
*node,
Bool
&docrelated) const
|
virtual
Bool
|
读取
(
GeListNode
*node,
HyperFile
*hf,
Int32
level)
|
virtual
Bool
|
Write
(
GeListNode
*node,
HyperFile
*hf)
|
virtual
Bool
|
GetDParameter
(
GeListNode
*node, const
DescID
&id,
GeData
&t_data,
DESCFLAGS_GET
&flags)
|
virtual
Bool
|
SetDParameter
(
GeListNode
*node, const
DescID
&id, const
GeData
&t_data,
DESCFLAGS_SET
&flags)
|
virtual
Bool
|
TranslateDescID
(
GeListNode
*node, const
DescID
&id,
DescID
&res_id,
C4DAtom
*&res_at)
|
|
BaseData
()
|
virtual
|
~BaseData
(void)
|
void
|
Destructor
(void)
|
GeListNode
*
|
private_link
|
成员函数文档编制
◆
Init()
Called when a new instance of the node data is allocated.
Allocate and initialize member variables of the node data class here. Fill also the container of the node data and connected nodes with default values:
Bool
BlinkerKey::Init(
GeListNode
*node)
{
BaseKey *op = (BaseKey*) node;
BaseContainer
*data = op->GetDataInstance();
data->
SetFloat
(BLINKERKEY_NUMBER, 1.0);
data->
SetFloat
(BLINKERKEY_STRENGTH, 1.0);
data->
SetBool
(BLINKERKEY_SOFT,
false
);
return
true
;
}
-
注意
-
If the node data class has a constructor it is called as usual before, but at that time there is no
GeListNode
link established.
-
参数
-
[in]
|
node
|
The
GeListNode
connected with the
NodeData
instance. Equal to
Get()
. Provided for speed and convenience.
Cinema 4D
owns the pointed node.
|
-
返回
-
true
若
node
was initialized, otherwise
false
.
Reimplemented from
NodeData
.
◆
Free()
Called when a node data instance is deallocated.
Deallocate member variables of the node data class here.
-
注意
-
If the node data class has a destructor it is called as usual after.
-
参数
-
[in]
|
node
|
The
GeListNode
connected with the
NodeData
instance. Equal to
Get()
. Provided for speed and convenience.
Cinema 4D
owns the pointed node.
|
Reimplemented from
NodeData
.
◆
GetDDescription()
Called to add parameters to the description for the node.
Modify the passed
description
as needed, set the appropriate
flags
and then make sure to include a call to the parent at the end:
return
SUPER::GetDDescription(data, description, flags, parentdescription);
-
注意
-
If only a description resource is used it is not needed to overload
GetDDescription
.
-
参数
-
[in]
|
node
|
The
GeListNode
connected with the
NodeData
instance. Equal to
Get()
. Provided for speed and convenience.
Cinema 4D
owns the pointed node.
|
[in,out]
|
description
|
The node's description to add the parameters to.
Cinema 4D
owns the pointed description.
|
[in,out]
|
flags
|
The flags for the description operation:
DESCFLAGS_DESC
|
-
返回
-
true
if successful, otherwise
false
. It is recommended to include a call to the parent function as last return.
Reimplemented from
NodeData
.
◆
Draw()
Called to draw additional information for the object in the editor view.
Be sure to call the parent version as last return:
return
SUPER::Draw(op, drawpass, bd, bh);
-
注意
-
Generator objects are automatically drawn as
GetVirtualObjects()
returns the polygonal data already.
-
警告
-
Only draw in
DRAWPASS::HIGHLIGHTS
if you really know what you are doing. Otherwise always check the
drawpass
and then do not draw if it is DRAWPASS::HIGHLIGHTS.
Only draw the object in
DRAWPASS::OBJECT
. The object's appearance may change if the same object is drawn in multiple passes.
-
参数
-
[in]
|
op
|
The
BaseObject
connected with the
ObjectData
instance. Equal to
static_cast
<
BaseObject
*>
Get()
. Provided for speed and convenience.
Cinema 4D
owns the pointed object.
|
[in]
|
drawpass
|
The draw pass:
DRAWPASS
|
[in]
|
bd
|
The editor's view. The caller owns the pointed view.
|
[in]
|
bh
|
The helper for the editor's view. The caller owns the pointed view helper.
|
-
返回
-
The result of drawing into the editor view:
DRAWRESULT
Reimplemented from
ObjectData
.
◆
GetDimension()
Called to get the boundaries of the object.
-
注意
-
GetDimension()
should be implemented for objects of types
Opolygon
,
Opoint
,
Oline
and
Ospline
. Furthermore it may be implemented to override
Cinema 4D
's default handling of bounding boxes.
-
参数
-
[in]
|
op
|
The
BaseObject
connected with the
ObjectData
instance. Equal to
static_cast
<
BaseObject
*>
Get()
. Provided for speed and convenience.
Cinema 4D
owns the pointed object.
|
[out]
|
mp
|
Assign the center point of the bounding box.
|
[out]
|
rad
|
Assign the XYZ bounding box radius.
|
Reimplemented from
ObjectData
.
◆
AddToExecution()
Called to add execution priorities.
By default returns
false
. In that case
Cinema 4D
will call
Execute()
at the priority specified by the user in the
EXPRESSION_PRIORITY
parameter of the container.
If overridden then insert points of execution in the list and return
true
. Heres is an example:
list->Add(op,
EXECUTIONPRIORITY_ANIMATION
,
EXECUTIONFLAGS::NONE
);
list->Add(op,
EXECUTIONPRIORITY_GENERATOR
,
EXECUTIONFLAGS::NONE
);
Cinema 4D
will then call
Execute()
2 times.
-
参数
-
[in]
|
op
|
The
BaseObject
connected with the
ObjectData
instance. Equal to
static_cast
<
BaseObject
*>
Get()
. Provided for speed and convenience.
Cinema 4D
owns the pointed object.
|
[in]
|
list
|
The priority list to add execution points to.
Cinema 4D
owns the pointed priority list.
|
-
返回
-
true
if priority was added to the execution list, otherwise
false
.
Reimplemented from
ObjectData
.
◆
Execute()
Called at the point in the priority pipeline specified by
AddToExecution
, or the lack thereof.
-
注意
-
This function is called in a thread context. See the
important information
about threading.
-
参数
-
[in]
|
op
|
The
BaseObject
connected with the
ObjectData
instance. Equal to
static_cast
<
BaseObject
*>
Get()
. Provided for speed and convenience.
Cinema 4D
owns the pointed object.
|
[in]
|
doc
|
The host document of the object.
Cinema 4D
owns the pointed document.
|
[in]
|
bt
|
The calling thread. Can be
nullptr
.
Cinema 4D
owns the pointed thread.
|
[in]
|
priority
|
The priority of the call to
Execute()
in the pipeline:
EXECUTIONPRIORITY
|
[in]
|
flags
|
The execution flags:
EXECUTIONFLAGS
|
-
返回
-
The execution result:
EXECUTIONRESULT
Reimplemented from
ObjectData
.
◆
ModifyObject()
Called to modify the passed object.
-
注意
-
This function is called in a thread context. See the
important information
about threading.
-
警告
-
Must not be overridden for non-modifier objects.
-
参数
-
[in]
|
mod
|
The
BaseObject
connected with the
ObjectData
instance. Equal to
static_cast
<
BaseObject
*>
Get()
. Provided for speed and convenience.
Cinema 4D
owns the pointed object.
|
[in]
|
doc
|
The document containing the object to modify.
Cinema 4D
owns the pointed document.
|
[in,out]
|
op
|
The object to modify.
Cinema 4D
owns the pointed object.
|
[in]
|
op_mg
|
The object's world matrix.
|
[in]
|
mod_mg
|
The modifier object's world matrix.
|
[in]
|
lod
|
The level of detail.
|
[in]
|
flags
|
Currently unused.
|
[in]
|
thread
|
The calling thread. Can be
nullptr
.
Cinema 4D
owns the pointed thread.
|
-
返回
-
true
if the object was modified, otherwise
false
.
Reimplemented from
ObjectData
.
◆
Message()
Called when a node receives messages.
-
另请参阅
-
C4DAtom::Message
-
注意
-
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]
|
node
|
The
GeListNode
connected with the
NodeData
instance. Equal to
Get()
. Provided for speed and convenience.
Cinema 4D
owns the pointed node.
|
[in]
|
type
|
The message type:
MSG
|
[in,out]
|
data
|
The message data. The sender owns the pointed data.
|
-
返回
-
true
or
false
depending on the message
type
.
Reimplemented from
NodeData
.
◆
GetHandleCount()
Called to get the number of handles the object has.
Part of the automated handle interface.
-
另请参阅
-
HandleInfo
.
-
参数
-
[in]
|
op
|
The
BaseObject
connected with the
ObjectData
instance. Equal to
static_cast
<
BaseObject
*>
Get()
. Provided for speed and convenience.
Cinema 4D
owns the pointed object.
|
-
返回
-
The number of handles for the object.
Reimplemented from
ObjectData
.
◆
GetHandle()
Called to get the information for handle
i
.
Part of the automated handle interface.
-
另请参阅
-
HandleInfo
.
-
参数
-
[in]
|
op
|
The
BaseObject
connected with the
ObjectData
instance. Equal to
static_cast
<
BaseObject
*>
Get()
. Provided for speed and convenience.
Cinema 4D
owns the pointed object.
|
[in]
|
i
|
The handle index.
|
[in,out]
|
info
|
Fill with the handle information.
|
Reimplemented from
ObjectData
.
◆
SetHandle()
Called to set the information for handle
i
.
Called when the user has moved handle
i
to position
p
. Update the object's internal data accordingly (e.g. parameter values etc.).
Part of the automated handle interface.
-
另请参阅
-
HandleInfo
.
-
参数
-
[in]
|
op
|
The
BaseObject
connected with the
ObjectData
instance. Equal to
static_cast
<
BaseObject
*>
Get()
. Provided for speed and convenience.
Cinema 4D
owns the pointed object.
|
[in]
|
i
|
The handle index.
|
[in]
|
p
|
The handle's position.
|
[in]
|
info
|
The handle information.
|
Reimplemented from
ObjectData
.
◆
CopyTo()
Called when a node is duplicated.
-
警告
-
If at least one of
Read()
,
Write()
and
CopyTo()
is implemented, it is recommended to implement all three, otherwise data might be lost.
Copy any member variable for the node plugin. Simply transfer from
this
to
dest
and/or
snode
to
dnode
:
dest->offset = offset;
dest->object_access = object_access;
-
注意
-
Init()
is called for the destination node before.
-
警告
-
It is recommended to store as much as possible in the node's container as
Cinema 4D
handles the copying of those values automatically. Only use member variables when necessary.
-
参数
-
[out]
|
dest
|
The destination node data.
Cinema 4D
owns the pointed node.
|
[in]
|
snode
|
The source node. Equal to
Get()
. Provided for speed and convenience.
Cinema 4D
owns the pointed node.
|
[out]
|
dnode
|
The destination node.
Cinema 4D
owns the pointed node.
|
[in]
|
flags
|
The copy flags:
COPYFLAGS
|
[in]
|
trn
|
An alias translator for the operation. Can be
nullptr
. The sender owns the pointed alias translator.
|
-
返回
-
true
若
node
was copied, otherwise
false
.
Reimplemented from
NodeData
.
◆
IsInstanceOf()
Called to check if the
node
is an instance of a base
type
.
-
另请参阅
-
C4DAtom::IsInstanceOf
.
-
参数
-
[in]
|
node
|
The
GeListNode
connected with the
NodeData
instance. Equal to
Get()
. Provided for speed and convenience.
Cinema 4D
owns the pointed node.
|
[in]
|
type
|
The type to check.
|
-
返回
-
true
若
node
is an instance of the given
type
, otherwise
false
.
Reimplemented from
NodeData
.
◆
GetDEnabling()
Called to decide which description parameters should be enabled or disabled.
Can be used both for parameters that are stored in the node's description and for dynamic parameters.
Read the passed
t_data
if the right
id
was provided, and return
true
to enable the parameter or
false
to disable it. Then make sure to include a call to the parent at the end:
return
SUPER::GetDEnabling(data,
id
, t_data, flags, itemdesc);
-
参数
-
[in]
|
node
|
The
GeListNode
connected with the
NodeData
instance. Equal to
Get()
. Provided for speed and convenience.
Cinema 4D
owns the pointed node.
|
[in]
|
id
|
The ID of the parameter.
|
[in]
|
t_data
|
The parameter data.
Cinema 4D
owns the pointed data.
|
[in]
|
flags
|
Not used.
|
[in]
|
itemdesc
|
The parameter's description, encoded to a container as described in
描述
.
|
-
返回
-
true
if the parameter should be enabled, otherwise
false
. It is recommended to include a call to the parent function as last return.
Reimplemented from
NodeData
.
◆
InitEffector()
Called to initialize the effector. Replacement
NodeData::Init
function for effectors.
Called when effector is first created.
-
注意
-
It is not needed to call
SUPER
::
InitEffector()
-
参数
-
[in]
|
node
|
Equal to
Get()
. Provided for speed and convenience.
Cinema 4D
owns the pointed node.
|
-
返回
-
true
if the node was initialized, otherwise
false
.
◆
FreeEffector()
Called to free the effector. Replacement
NodeData::Free
function for effectors.
Called when effector is deleted.
-
注意
-
It is not needed to call
SUPER
::
FreeEffector()
-
参数
-
[in]
|
node
|
Equal to
Get()
. Provided for speed and convenience.
Cinema 4D
owns the pointed node.
|
◆
GetEffectorData()
Gets the effector's internal data.
-
注意
-
The effector data structure only gets filled after
ExecuteEffector()
has been called (which normally fills it).
-
返回
-
The effector data structure.
◆
GetFalloff()
Gets the falloff of the effector, this may be null if the effector is using Fields instead, in which case make use of CalcFields.
-
注意
-
EFFECTORFLAGS_HASFALLOFF
needs to be set.
-
返回
-
The falloff.
◆
AddEffectorDependence()
Adds a dependence on another object's dirty state to the effector.
This way if the other object becomes dirty then the effector will be forced to update.
Normally used in either ExecuteEffector or InitPoints. (See
DropEffector
SDK example.)
-
参数
-
[in]
|
op
|
The object to add a dependency on. The caller owns the pointed object.
|
◆
GetEffectorFlags()
virtual
Int32
GetEffectorFlags
|
(
|
void
|
|
)
|
|
|
virtual
|
Called to get the effector flags.
-
返回
-
The effectors flags:
EFFECTORFLAGS
◆
ModifyDDescription()
Called to modify the description of the effector.
Convenience function so it is not needed to overload
NodeData::GetDDescription
to show/hide elements or change the description.
-
参数
-
[in]
|
node
|
Equal to
Get()
. Provided for speed and convenience.
Cinema 4D
owns the pointed node.
|
[in,out]
|
description
|
The description to modify.
Cinema 4D
owns the pointed description.
|
[in]
|
ar
|
The atom array to pass along.
Cinema 4D
owns the pointed atom array.
|
-
返回
-
true
if successful, otherwise
false
.
◆
ExecuteEffector()
Called to execute the effector.
Called first of all in the effector execution pipeline. Fill the
EffectorDataStruct
and call
InitPoints()
.
-
警告
-
Do not override unless strictly necessary.
-
注意
-
Needs to call
SUPER
::
ExecuteEffector()
as last return.
-
参数
-
[in]
|
op
|
The effector object.
Cinema 4D
owns the pointed object.
|
[in]
|
doc
|
The document.
Cinema 4D
owns the pointed document.
|
[in]
|
gen
|
The object that owns the
MoData
(motion particle generator).
Cinema 4D
owns the pointed object.
Can sometimes be the same as the effector, mostly used for matrix, internally used to get
MoData
when no
MoData
is sent.
|
[in]
|
md
|
The motion data sent to the effector, may be
nullptr
.
Cinema 4D
owns the pointed motion data.
|
[in]
|
strength
|
The strength value.
|
[in]
|
thread
|
The thread the effector is being executed in.
Cinema 4D
owns the pointed thread.
|
-
返回
-
true
if successful, otherwise
false
.
◆
InitPoints()
Called to initialize the points/particles just before the effector body is calculated in ModifyPoints.
Allows to setup and retrieve any necessary data from the effector's container.
-
参数
-
[in]
|
op
|
The effector object.
Cinema 4D
owns the pointed object.
|
[in]
|
gen
|
The object that owns the
MoData
(motion particle generator).
Cinema 4D
owns the pointed object.
Can sometimes be the same as the effector, mostly used for matrix, internally used to get
MoData
when no
MoData
is sent.
|
[in]
|
doc
|
The document.
Cinema 4D
owns the pointed document.
|
[in]
|
data
|
The effector's internal data, filled in.
Cinema 4D
owns the pointed data.
|
[in]
|
md
|
The
MoData
the effector will modify.
Cinema 4D
owns the pointed motion data.
|
[in]
|
thread
|
The thread the effector is being executed in.
Cinema 4D
owns the pointed thread.
|
◆
ModifyPoints()
Called to modify the
MoData
particles.
All falloff values should be evaluated if overridden using the falloff of the effector (retrieved with
GetFalloff
).
DropEffector
SDK example shows how to overload
ModifyPoints
correctly.
-
注意
-
If overridden then
CalcPlacebo()
,
CalcPointValue()
and
CalcPointColor()
will not get called (unless the effector explicitly calls them).
-
参数
-
[in]
|
op
|
The effector object.
Cinema 4D
owns the pointed object.
|
[in]
|
gen
|
The object that owns the
MoData
(motion particle generator).
Cinema 4D
owns the pointed object.
Can be sometimes the same as the effector, mostly used for matrix, internally used to get
MoData
when no
MoData
is sent.
|
[in]
|
doc
|
The document.
Cinema 4D
owns the pointed document.
|
[in]
|
data
|
The effector's internal data, filled in.
Cinema 4D
owns the pointed data.
|
[in]
|
md
|
The
MoData
the effector will modify.
Cinema 4D
owns the pointed motion data.
|
[in]
|
thread
|
The thread the effector is being executed in.
Cinema 4D
owns the pointed thread.
|
◆
FreePoints()
virtual void FreePoints
|
(
|
void
|
|
)
|
|
|
virtual
|
Called to free the points/particles.
Called after the particles have been modified; clear any data at this point.
◆
CalcPlacebo()
Called in a value driven effector for each point/particle that is not needed (where
ModifyPoints
has not been override).
Called when a
MoData
index should not be calculated/evaluated itself, but certain values may be needed to be incremented internally.
For instance if a "random" value is used, makes sure it is called the same number of times as particles (to avoid skipping/jumping around values).
-
参数
-
[in]
|
op
|
The effector object.
Cinema 4D
owns the pointed object.
|
[in]
|
gen
|
The object that owns the
MoData
(motion particle generator).
Cinema 4D
owns the pointed object.
Can sometimes be the same as the effector, mostly used for matrix, internally used to get
MoData
when no
MoData
is sent.
|
[in]
|
doc
|
The document.
Cinema 4D
owns the pointed document.
|
[in]
|
data
|
The effector's internal data, filled in.
Cinema 4D
owns the pointed data.
|
[in]
|
index
|
The current point/particle index.
|
[in]
|
md
|
The
MoData
.
Cinema 4D
owns the pointed motion data.
|
[in]
|
globalpos
|
The global space position of the current point/particle.
|
[in]
|
fall_weight
|
The falloff strength for the current particle.
|
◆
CalcPointValue()
Called in a value driven effector for each point/particle that is needed (where
ModifyPoints
has not been override).
Assign the
EffectorDataStruct
's
strengths
(见
NoiseEffector
SDK example) to set the values that drive the effector.
-
参数
-
[in]
|
op
|
The effector object.
Cinema 4D
owns the pointed object.
|
[in]
|
gen
|
The object that owns the
MoData
(motion particle generator).
Cinema 4D
owns the pointed object.
Can sometimes be the same as the effector, mostly used for matrix, internally used to get
MoData
when no
MoData
is sent.
|
[in]
|
doc
|
The document.
Cinema 4D
owns the pointed document.
|
[in]
|
data
|
The effector's internal data, filled in.
Cinema 4D
owns the pointed data.
|
[in]
|
index
|
The current point/particle index.
|
[in]
|
md
|
The
MoData
.
Cinema 4D
owns the pointed motion data.
|
[in]
|
globalpos
|
The global space position of the current point/particle.
|
[in]
|
fall_weight
|
The falloff strength for the current point.
|
◆
CalcPointColor()
Called in a value driven effector for each point/particle that is needed (where
ModifyPoints
has not been override).
-
注意
-
Only has an effect when the effector is set to change the point/particle's color.
-
参数
-
[in]
|
op
|
The effector object.
Cinema 4D
owns the pointed object.
|
[in]
|
gen
|
The object that owns the
MoData
(motion particle generator).
Cinema 4D
owns the pointed object.
Can sometimes be the same as the effector, mostly used for matrix, internally used to get
MoData
when no
MoData
is sent.
|
[in]
|
doc
|
The document.
Cinema 4D
owns the pointed document.
|
[in]
|
data
|
The effector's internal data, filled in.
Cinema 4D
owns the pointed data.
|
[in]
|
index
|
The current point/particle index.
|
[in]
|
md
|
The
MoData
.
Cinema 4D
owns the pointed motion data.
|
[in]
|
globalpos
|
The global space position of the current point/particle.
|
[in]
|
fall_weight
|
The falloff strength for the current particle.
|
-
返回
-
The color for a point.
◆
CalcFields()
Retrieves the FieldResult calculation from an Effector. This if there is no C4DFalloff then this should be used instead.
-
参数
-
[in]
|
doc
|
The active document.
|
[in]
|
generatorObject
|
The generator object calling the Effector.
|
[in]
|
md
|
The
MoData
that you want to sample.
|
[in]
|
flags
|
The FEILDSAMPLE_FLAG flags that determine what will be sampled.
|
-
返回
-
Null if it fails, else a
FieldOutput
structure pointer (Effector owns the data) containing sampled values for the passed
MoData
matrices.
Member Data Documentation
◆
edata
EffectorDataParameters* edata
|
Private
.
Internal
.
#define EXECUTIONPRIORITY_ANIMATION
Animation.
定义:
ge_prepass.h:3623
#define EXECUTIONPRIORITY_GENERATOR
Generators.
定义:
ge_prepass.h:3627
void SetBool(Int32 id, Bool b)
定义:
c4d_basecontainer.h:498
Represents a C4DAtom that resides in a 4D list.
定义:
c4d_baselist.h:1767
void SetFloat(Int32 id, Float r)
定义:
c4d_basecontainer.h:533
maxon::Bool Bool
定义:
ge_sys_math.h:53
定义:
c4d_basecontainer.h:46