c4d.plugins.FalloffData
¶
This class is the base falloff class. Falloffs will appear in any falloff descriptions (unless the flag
PLUGIN_HIDE
is used during registration), and extend the functionality of tools such as effectors (or anything that uses the falloffs). Use
RegisterFalloffPlugin()
to register the plugin.
See also
Py-NoiseFalloff plugin example.
c4d.plugins.
FalloffData
¶
c4d.plugins.BaseData
FalloffData.
Init
(
self
,
falldata
,
bc
)
¶
Called when the falloff is first created.
Parameters: |
|
---|---|
Return type: |
bool |
Returns: |
True if successful, otherwise False . |
FalloffData.
InitFalloff
(
self
,
bc
,
falldata
)
¶
Called just before sampling. Allows you to set up any necessary data in falldata or bc .
Parameters: |
|
---|---|
Return type: |
bool |
Returns: |
True if successful, otherwise False . |
FalloffData.
Sample
(
self
,
p
,
data
)
¶
Called to sampe any point.
Note
To get
p
in world coordinates multiply it by
data.mat
.
Parameters: |
|
---|---|
Return type: |
float |
Returns: |
The falloff value. |
FalloffData.
FreeFalloff
(
self
,
falldata
)
¶
Called when the falloff object is freed.
Parameters: | falldata ( c4d.modules.mograph.FalloffDataData ) – Falloff data information. |
---|
FalloffData.
CheckDirty
(
self
,
bc
)
¶
Parameters: | bc ( c4d.BaseContainer ) – Falloff’s basecontainer; normally this is the owning object’s basecontainer. |
---|---|
Return type: | bool |
Returns: | Dirty state. |
FalloffData.
GetDVisible
(
self
,
id
,
bc
,
desc_bc
)
¶
Called to change the visibility of any element in the description; just return True or False for the id .
Parameters: |
|
---|---|
Return type: |
bool |
Returns: |
Visibility of id . |
FalloffData.
GetHandleCount
(
self
,
bc
,
data
)
¶
Called to get the number of handles the falloff has. Part of the automated handle interface.
Parameters: |
|
---|---|
Return type: |
int |
Returns: |
The number of handles. |
FalloffData.
GetHandle
(
self
,
bc
,
i
,
info
,
data
)
¶
Called to get the information for handle at index i . Part of the automated handle interface.
Parameters: |
|
---|---|
Return type: | |
Returns: |
The current local position of the handle with index i . |
FalloffData.
SetHandle
(
self
,
bc
,
i
,
p
,
data
)
¶
Parameters: |
|
---|
FalloffData.
Draw
(
self
,
data
,
drawpass
,
bd
,
bh
)
¶
For allowing you to draw the falloff in the viewport. You should use these predefined color constants:
FALLOFFCAGE | Default cage color. |
FALLOFFFALLOFF | Default falloff color. |
Note
This function is called in a thread context. Please see the important information about threading.
Parameters: |
|
||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return type: |
int |
||||||||||
Returns: |
Success of drawing into the editor view:
Changed in version R18.011: Changed to DRAWRESULT . Returning a bool is still supported for backward compatibility. |
FalloffData.
Message
(
self
,
type
,
bc
,
m_data
)
¶
Parameters: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: |
bool |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns: |
Depends on the message type. |