New in version R15.037.
A SculptLayer can contain one or more SculptLayerData children.
Get the first layer data for this layer. The Base Object layer will have more than one, other layers only have 1.
Return type: | SculptLayerData |
---|---|
Returns: | The first sculpt layer data. |
Get the currently used layer data. In the case of the Base Object layer it will get the data for the current subdivision level. For all other layers it will return the same as GetFirstSculptLayer().
Return type: | SculptLayerData |
---|---|
Returns: | The current sculpt layer data. |
Get the number of points this layer has. The point count will be the same as the number of points on the PolygonObject for the subdivision level that this layer is at.
Return type: | int |
---|---|
Returns: | The number of points. |
Get the offset value for the point index on the layer. This method will get the correct SculptLayerData for this layer and call the corresponding method for it.
Parameters: | index (int) – The index of the point on the layer. |
---|---|
Raises IndexError: | |
If the point index is out of range : 0<=index<GetPointCount(). | |
Return type: | Vector |
Returns: | The offset of the point. |
Set the offset vector for the given point on the layer. This method will get the correct SculptLayerData for this layer and call the corresponding method for it.
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<GetPointCount(). |
Add an offset vector to the existing offset for the given point on the layer. This method will get the correct SculptLayerData for this layer and call the corresponding method for it.
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<GetPointCount(). |
Get the mask value for the point (between 0 and 1). This method will get the correct SculptLayerData for this layer and call the corresponding method for it.
Parameters: | index (int) – The index of the point on the layer. |
---|---|
Raises IndexError: | |
If the point index is out of range : 0<=index<GetPointCount(). | |
Return type: | float |
Returns: | The mask value for the given point. |
Set the mask value for the point (between 0 and 1). This method will get the correct SculptLayerData for this layer and call the corresponding method for it.
Parameters: |
|
---|---|
Raises IndexError: | |
If the point index is out of range : 0<=index<GetPointCount(). |
Add to the existing mask value at this point (between 0 and 1). This method will get the correct SculptLayerData for this layer and call the corresponding method for it.
Parameters: |
|
---|---|
Raises IndexError: | |
If the point index is out of range : 0<=index<GetPointCount(). |
Check if this layer has a mask at the current subdivision level. This method will get the correct SculptLayerData for this layer and call the corresponding method for it.
Return type: | bool |
---|---|
Returns: | True if there is a mask, otherwise False. |
Clear the mask data for the layer. This method will get the correct SculptLayerData for this layer and call the corresponding method for it.
Clear all the offset data for this layer. This method will get the correct SculptLayerData for this layer and call the corresponding method for it.
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.
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.
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(). |
Mark 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(). |
Check if this layer is the Base Object layer in which case it will have more than one SculptLayerData children.
Return type: | bool |
---|---|
Returns: | True if this layer is the Base Object layer, False if it is a regular layer. |
Check if the mask is enabled for this layer at the current subdivision level. This method will get the correct SculptLayerData for this layer and call the corresponding method for it.
Return type: | bool |
---|---|
Returns: | True* if mask is enabled, otherwise False. |
Set the mask enabled state for the current layer data at this current subdivision level. This method will get the correct SculptLayerData for this layer and call the corresponding method for it.
Parameters: | state (bool) – The state of the mask. |
---|