c4d.modules.mograph.C4D_Falloff
¶
New in version R19.
Represents a falloff and allows to sample falloffs. It is very simple in use: allocate it, call
C4D_Falloff.InitFalloff()
first then
C4D_Falloff.Sample()
or
C4D_Falloff.MultiSample()
.
NodeData
/
ObjectData
/
ToolData
plugins and should be called within their likewise counterparts.
For instance
C4D_Falloff.Draw()
should be called from within the corresponding
ObjectData
/
ToolData
Draw()
implementation, then the falloff will be drawn in the viewport.
C4D_Falloff
normally needs a container, this is usually the object’s container. From this container it gets and sets its own parameters for the description, though they can be set directly using the helper functions.
c4d.modules.mograph.
C4D_Falloff
¶
C4D_Falloff.
__init__
(
)
¶
Creates a new
C4D_Falloff
.
Return type: | c4d.modules.mograph.C4D_Falloff |
---|---|
Returns: | A new falloff. |
C4D_Falloff.
InitFalloff
(
[
bc=None
,
doc=None
,
op=None
]
)
¶
Initializes the falloff.
Warning
Always call before the sample routines.
Note
It is recommended to pass at least one of the parameters, however not compulsory.
Parameters: |
|
---|---|
Return type: |
bool |
Returns: |
True if successful, otherwise False . |
C4D_Falloff.
Sample
(
point
[
,
usespline=True
,
weight=0.0
]
)
¶
Samples the falloff for any point in space.
Parameters: |
|
---|---|
Return type: |
float |
Returns: |
The sampled value. |
C4D_Falloff.
MultiSample
(
points
[
,
usespline=True
,
weight=0.0
]
)
¶
Samples the falloff for an array of points in space.
Parameters: |
|
---|---|
Return type: |
list of float |
Returns: |
The sampled values. |
C4D_Falloff.
AddFalloffToDescription
(
description
[
,
bc=None
]
)
¶
Adds the falloff to a description.
Note
Use this function within the implementation of
NodeData.GetDDescription()
.
Parameters: |
|
---|---|
Return type: |
bool |
Returns: |
True if successful, otherwise False . |
C4D_Falloff.
Message
(
id
[
,
bc=None
,
data=None
]
)
¶
Sends messages to the falloff.
Note
Use this function from within the implementation of
NodeData.Message()
to pass all messages to the falloff.
Parameters: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: |
bool |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns: |
True if successful, otherwise False . |
C4D_Falloff.
GetHandleCount
(
[
bc=None
]
)
¶
Returns the number of handles for the falloff.
Note
Use this function from within the implementation of
ObjectData.GetHandleCount()
.
Parameters: | bc ( c4d.BaseContainer ) – Optionally pass the container of the object owning the falloff. |
---|---|
Return type: | int |
Returns: | The handle count. |
C4D_Falloff.
GetHandle
(
index
,
bc
,
info
)
¶
Returns a handle for the falloff.
Note
Use this function from within the implementation of
ObjectData.GetHandle()
.
Parameters: |
|
---|
C4D_Falloff.
SetHandle
(
index
,
point
,
bc
,
info
)
¶
Set a handle for the falloff.
Note
Use this function from within the implementation of
ObjectData.SetHandle()
.
Parameters: |
|
---|
C4D_Falloff.
Draw
(
bd
,
bh
,
drawpass
[
,
bc=None
]
)
¶
Draws the falloff into a view.
Note
Use this function from within the implementation of
ObjectData.Draw()
or
ToolData.Draw()
.
Parameters: |
|
||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return type: |
bool |
||||||||||
Returns: |
True if successful, otherwise False . |
C4D_Falloff.
CopyTo
(
dest
)
¶
Copies the falloff to another falloff.
Note
Use this function from within the implementation of
NodeData.CopyTo()
. Necessary for handles to work correctly with the undo system.
Parameters: | dest ( c4d.modules.mograph.C4D_Falloff ) – The destination falloff. |
---|---|
Return type: | bool |
Returns: | True if successful, otherwise False . |
C4D_Falloff.
SetDirty
(
)
¶
Sets the falloff dirty.
C4D_Falloff.
GetDirty
(
[
bc=None
]
)
¶
Returns the falloff dirty value.
Note
Useful to check if the falloff needs to be resampled.
Parameters: | bc ( c4d.BaseContainer ) – Optionally pass the container of the object owning the falloff. |
---|---|
Return type: | int |
Returns: | The dirty value. |
C4D_Falloff.
SetMg
(
mg
)
¶
Sets the falloff’s matrix.
Parameters: | mg ( c4d.Matrix ) – The new falloff’s matrix. |
---|
C4D_Falloff.
GetMg
(
)
¶
Returns the falloff’s matrix.
Return type: | c4d.Matrix |
---|---|
Returns: | The matrix. |
C4D_Falloff.
SetData
(
data
)
¶
Sets the falloff’s data directly.
Parameters: | data ( c4d.modules.mograph.FalloffDataData ) – The new falloff’s data. |
---|
C4D_Falloff.
GetData
(
)
¶
Returns the falloff’s data.
Return type: | c4d.modules.mograph.FalloffDataData |
---|---|
Returns: | The falloff’s data. |
C4D_Falloff.
GetContainerInstance
(
)
¶
Returns the last container the falloff should try to use.
Note
If the falloff has not been given a container at any point it will generate one internally.
Return type: | c4d.BaseContainer |
---|---|
Returns: | The falloff’s container instance. Guaranteed to be always valid. |
C4D_Falloff.
SetMode
(
type
[
,
bc=None
]
)
¶
Sets the falloff mode.
Parameters: |
|
---|---|
Return type: |
bool |
Returns: |
True if successful, otherwise False . |
C4D_Falloff.
GetMode
(
)
¶
Returns the falloff mode.
Return type: | int |
---|---|
Returns: | The falloff’s mode. See ofalloff_panel.h . |
C4D_Falloff.
SetTime
(
time
[
,
bc=None
]
)
¶
Sets the current falloff time.
Note
Used only for the animated Spline GUI offset, not for any other values currently.
Parameters: |
|
---|