c4d.modules.bodypaint.PaintTexture
¶
A class for paint textures, can contain layers and may represent channel of a material.
c4d.modules.bodypaint.
PaintTexture
¶
c4d.modules.bodypaint.PaintBitmap
PaintTexture.
GetFirstLayer
(
)
¶
Get the first layer of the paint texture.
Return type: | c4d.modules.bodypaint.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: | c4d.modules.bodypaint.PaintLayer |
---|---|
Returns: | The last layer of the paint texture, or None if there is none. |
PaintTexture.
AddLayerBmp
(
[insertafter=None][, layerset=None][, mode=COLORMODE_ARGB][, useundo=True][, activate=True]
)
¶
Add a bitmap layer.
Parameters: |
|
||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: | |||||||||||||||||||||||||||||||||||||||||||
Returns: |
The added bitmap layer. |
PaintTexture.
AddLayerFolder
(
[insertafter=None][, insertunder=None][, useundo=True][, activate=True]
)
¶
Add a layer folder.
Parameters: |
|
---|---|
Return type: | |
Returns: |
The added layer folder. |
PaintTexture.
SetActiveLayer
(
layer
,
activatetexture
[
,
show=True
]
)
¶
Select a layer.
Parameters: |
|
---|
PaintTexture.
GetActive
(
)
¶
Get the selected layer, or None if there is none.
Return type: | c4d.modules.bodypaint.PaintLayer |
---|---|
Returns: | The selected layer. |
PaintTexture.
GetLinkLayers
(
addfolders
)
¶
Get linked layers.
Parameters: | 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: |
|
---|
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. |
PaintTexture.
SetColorProfile
(
profile
)
¶
New in version R17.048.
Sets the color profile for the paint texture.
Parameters: | profile ( c4d.bitmaps.ColorProfile ) – The color profile to set. |
---|---|
Return type: | bool |
Returns: | True if successful, otherwise False . |
PaintTexture.
GetColorProfile
(
)
¶
New in version R17.048.
Gets the color profile for the paint texture.
Return type: | c4d.bitmaps.ColorProfile |
---|---|
Returns: | The color profile. |
PaintTexture.
CreateNewTexture
(
path
,
settings
)
¶
Creates a new paint texture.
Parameters: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns: |
The created paint texture if successful, otherwise None . |
PaintTexture.
GetTextureDefaults
(
channel
)
¶
Gets the default texture settings for the passed material channel ID.
Parameters: |
path
(
int
) –
The material channel ID:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: | c4d.BaseContainer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns: |
The default texture settings:
|
PaintTexture.
SetSelected_Texture
(
bmp
,
preferred
)
¶
Selects a paint texture.
Parameters: |
|
---|---|
Return type: |
bool |
Returns: |
True if successful, otherwise False . |
PaintTexture.
GetSelectedTexture
(
)
¶
Gets the selected paint texture.
Return type: | c4d.modules.bodypaint.PaintTexture |
---|---|
Returns: | The selected paint texture or None if no paint is selected. |