SculptLayerData
¶
New in version R15.037.
A
SculptLayerData
node contains all the offset data and mask data for that layer at its subdivision level.
c4d.modules.sculpting.
SculptLayerData
¶
SculptLayerData.GetMask()
SculptLayerData.SetMask()
SculptLayerData.AddToMask()
SculptLayerData.HasMask()
c4d.BaseList2D
SculptLayerData.
GetSubdivisionLevel
(
)
¶
Get the level that this layer contains data for.
Return type: | int |
---|---|
Returns: | The subdivision level. |
SculptLayerData.
GetPointCount
(
)
¶
Get the number of points on the polygon object that this layer has.
Return type: | int |
---|---|
Returns: | Number of points on the polygon object. |
SculptLayerData.
GetOffset
(
index
)
¶
Get the offset for the given point index on the layer.
Parameters: | index ( int ) – Index of the point on the polygon object. |
---|---|
Raises: |
IndexError
– If the point
index
is out of range :
0<=index<
GetPointCount()
.
|
Return type: | c4d.Vector |
Returns: | The offset of the point. |
SculptLayerData.
SetOffset
(
index
,
offset
)
¶
Set the offset for the given point index .
Note
Be sure to call
SculptObject.Update()
after all changes to the offets have been made. This will update the
SculptObject
display.
Parameters: |
|
---|---|
Raises: |
IndexError
– If the point
index
is out of range :
0<=index<
|
SculptLayerData.
AddOffset
(
index
,
offset
)
¶
Add to the existing offset value at the given point index .
Note
Be sure to call
SculptObject.Update()
after all changes to the offets have been made. This will update the
SculptObject
display.
Parameters: |
|
---|---|
Raises: |
IndexError
– If the point
index
is out of range :
0<=index<
|
SculptLayerData.
GetMask
(
index
)
¶
Get the value (between 0 and 1) of the mask at the given point index .
Parameters: | index ( int ) – Index of the point on the polygon object. |
---|---|
Raises: |
IndexError
– If the point
index
is out of range :
0<=index<
GetPointCount()
.
|
Return type: | float |
Returns: | The mask value for the given point, or None if there was no mask value at that point. |
SculptLayerData.
SetMask
(
index
,
mask
)
¶
Set the mask at the given point. The value will be clamped between 0 and 1.
Parameters: |
|
---|---|
Raises: |
IndexError
– If the point
index
is out of range :
0<=index<
|
SculptLayerData.
AddToMask
(
index
,
mask
)
¶
Adds the mask at the given point. The value will be clamped between 0 and 1.
Parameters: |
|
---|---|
Raises: |
IndexError
– If the point
index
is out of range :
0<=index<
|
SculptLayerData.
HasMask
(
)
¶
Check if this Layer has a mask applied to it.
Return type: | bool |
---|---|
Returns: | True if if there is mask data, otherwise False . |
SculptLayerData.
ClearMask
(
)
¶
Clear all the mask data for this layer.
SculptLayerData.
ClearLayer
(
)
¶
Clear all the offsets for this layer.
SculptLayerData.
InitializeAllPointData
(
)
¶
Make sure all the data has been allocated to store all the point data.
Note
If you are going to call
SetOffset()
or
AddOffset()
from multiple threads then the data needs to be initialized before these calls are made.
Note
If you are not using multiple threads the calls to
SetOffset()
and
AddOffset()
will only allocate data if required.
SculptLayerData.
InitializeAllMaskData
(
)
¶
Make sure all the data has been allocated to store all the mask data.
Note
If you are going to call
SetMask()
or
AddToMask()
from multiple threads then the data needs to be initialized before these calls are made.
Note
If you are not using multiple threads the calls to
SetMask()
and
AddToMask()
will only allocate data if required.
SculptLayerData.
TouchPointForUndo
(
index
)
¶
Mark the point so that any modifications to it can be undone.
Note
Must be called after
SculptObject.StartUndo()
.
Warning
This method cannot be called from multiple threads.
Parameters: | index ( int ) – The index of the point on the layer. |
---|---|
Raises: |
IndexError
– If the point
index
is out of range :
0<=index<
GetPointCount()
.
|
SculptLayerData.
TouchMaskForUndo
(
index
)
¶
Marks the masked point so that any modifications to the mask can be undone.
Note
Must be called after
SculptObject.StartUndo()
.
Warning
This method cannot be called from multiple threads.
Parameters: | index ( int ) – The index of the point on the layer. |
---|---|
Raises: |
IndexError
– If the point
index
is out of range :
0<=index<
GetPointCount()
.
|