SculptModifierInterface
¶
New in version R16.021.
This interface lets apply the affects of a sculpting modifier to any Polygon Object.
It allows to use the same algorithms outside of the sculpting system itself and deform a Polygon Object using the same brush algorithms that the sculpt brushes use.
See also
Py-SculptModifierDeformer
plugin example showing how to use
SculptModifierInterface
in a deformer implementation.
c4d.modules.sculpting.
SculptModifierInterface
¶
SculptModifierInterface.Init()
SculptModifierInterface.Clear()
SculptModifierInterface.GetDefaultData()
SculptModifierInterface.GetModifierCount()
SculptModifierInterface.GetModifierInfo()
SculptModifierInterface.SetData()
SculptModifierInterface.ApplyModifier()
SculptModifierInterface.ApplyModifierExact()
SculptModifierInterface.
Init
(
poly
)
¶
Initializes the interface so that you can apply modifiers to the given Polygon Object.
Parameters: | poly ( c4d.PolygonObject ) – The Polygon Object that you wish to apply modifiers to. |
---|---|
Return type: | bool |
Returns: | True if successfully initialized. |
SculptModifierInterface.
Clear
(
)
¶
Clears the interface. This will free up any internal data that was required to apply modifiers to the initialized
PolygonObject
in
Init()
.
SculptModifierInterface.
GetDefaultData
(
)
¶
Gets the default brush data setting. These settings can be found in toolsculptbrushbase.h .
Return type: | c4d.BaseContainer |
---|---|
Returns: | The container containing all the default brush settings. |
SculptModifierInterface.
GetModifierCount
(
)
¶
Gets the number of available modifiers that are currently registered and able to be used.
Return type: | int |
---|---|
Returns: | The number of Modifiers. |
SculptModifierInterface.
GetModifierInfo
(
index
)
¶
Gets the information about a modifier given its index .
Parameters: |
index
(
int
) – The index into the list of available modifiers.
GetModifierCount()
returns the number of modifiers.
|
---|---|
Return type: | dict{ id : int, name : str} |
Returns: | The modifier information. |
SculptModifierInterface.
SetData
(
brushData
,
modifierData
)
¶
ApplyModifier()
. This will initialize any time consuming data before you make repeated calls to
ApplyModifier()
.
Operations that take time are things such as enabling stamps, changing a stamps texture, calculation of the falloff values etc…
Parameters: |
|
---|---|
Return type: |
bool |
Returns: |
True if the data was correctly set. |
SculptModifierInterface.
ApplyModifier
(
modifierId
,
vertex
,
brushData
,
modifierData
[
,
respectselections=False
]
)
¶
Applies a modifier to the Polygon Object near the specified vertex .
Parameters: |
|
---|---|
Return type: |
bool |
Returns: |
True if the modifier was successfully applied. |
SculptModifierInterface.
ApplyModifierExact
(
modifierId
,
vertex
,
brushData
,
modifierData
,
hitpoint
,
lasthitpoint
[
,
respectselections=False
]
)
¶
Exactly applies a modifier to the Polygon Object near the specified vertex using the given hitpoint .
Parameters: |
|
---|---|
Return type: |
bool |
Returns: |
True if the modifier was successfully applied. |