A class for paint textures, can contain layers and may represent channel of a material.
-
class c4d.modules.bodypaint.PaintTexture
- PaintTexture.CreateNewTexture()
- PaintTexture.GetTextureDefaults()
- PaintTexture.SetSelected_Texture()
- PaintTexture.GetSelectedTexture()
Methods
-
PaintTexture.GetFirstLayer()
Get the first layer of the paint texture.
| Return type: | PaintLayer |
| Returns: | The first layer of the paint texture, or None if there is none. |
-
PaintTexture.GetLastLayer()
Get the last layer of the paint texture.
| Return type: | PaintLayer |
| Returns: | The last layer of the paint texture, or None if there is none. |
-
PaintTexture.AddLayerBmp([insertafter=None][, layerset=None][, mode=MODE_RGBA][, useundo=True][, activate=True])
Get the paint texture if possible.
| Parameters: |
|
| Return type: | PaintLayerBmp
|
| Returns: | The added bitmap layer.
|
-
PaintTexture.AddLayerFolder([insertafter=None][, insertunder=None][, useundo=True][, activate=True])
Get the paint texture if possible.
| Parameters: |
- insertafter (PaintLayer) – The layer insertion point.
- insertunder (PaintLayer) – Parent layer folder.
- useundo (bool) – True to create an undo on the undo stack, otherwise False.
- activate (bool) – Select the layer folder.
|
| Return type: | PaintLayerBmp
|
| Returns: | The added layer folder.
|
-
PaintTexture.SetActiveLayer(layer, activatetexture[, show=True])
Select a layer.
| Parameters: |
- layer (PaintLayer) – The layer to select.
- activatetexture (bool) – Select the texture.
- show (True) – Show the texture.
|
-
PaintTexture.GetActive()
Get the selected layer, or None if there is none.
| Return type: | PaintLayer |
| Returns: | The selected layer. |
-
PaintTexture.GetLinkLayers(addfolders)
Get linked layers.
| Parameter: | addfolders (bool) – If True the layer hierarchy is taken into account (see layer folders), otherwise False. |
| Return type: | list of PaintLayer |
| Returns: | The list containing the linked layers. |
-
PaintTexture.SetColorMode(newcolormode, doundo)
Change the color mode of the paint texture.
| Parameters: |
- newcolormode (int) –
The new color mode:
| MODE_ALPHA |
Only 8-bit alpha channel. |
| MODE_GREY8 |
8-bit greyscale channel. |
| MODE_GREYA8 |
8-bit greyscale channel with 8-bit alpha. |
| MODE_RGB |
8-bit RGB channels. |
| MODE_RGBA |
8-bit RGB channels with 8-bit alpha. |
| MODE_CMYK |
8-bit CMYK channel. |
| MODE_CMYKA |
8-bit CMYK channel with 8-bit alpha. |
| MODE_MASK |
8-bit greymap as mask. |
| MODE_GREYw |
8-bit greymap as mask with 8-bit alpha. |
| MODE_GREYAw |
16-bit greyscale channel with 16-bit alpha. |
| MODE_RGBw |
16-bit RGB channels. |
| MODE_RGBAw |
16-bit RGB channels with 16-bit alpha. |
| MODE_GREYf |
Floating point greyscale channel. |
| MODE_GREYAf |
Floating point greyscale channel with floating point alpha. |
| MODE_RGBf |
Floating point RGB channels. |
| MODE_RGBAf |
Floating point RGB channels with floating point alpha. |
- doundo (bool) – True to create an undo for changing the color mode, otherwise False.
|
-
PaintTexture.GetFilename()
Get the filename of the paint texture.
| Return type: | str |
| Returns: | The filename of the paint texture. |
-
PaintTexture.GetLayerCount()
Get the number of layers of the paint texture.
| Return type: | int |
| Returns: | The number of layers. |
-
PaintTexture.GetAlphaCount()
Get the number of alpha channels of the paint texture.
| Return type: | int |
| Returns: | The number of alpha channels. |