c4d.modules.bodypaint.PaintBitmap

The abstract base class of all paint classes. Can be a texture, material, layer or mask.

Inheritance

  • c4d.BaseList2D
    • c4d.modules.bodypaint.PaintBitmap
      • c4d.modules.bodypaint.PaintLayer
      • c4d.modules.bodypaint.PaintMaterial
      • c4d.modules.bodypaint.PaintTexture

Members

PaintBitmap.GetBw()

Get the width of the paint bitmap.

Return type: int
Returns: The width of the paint bitmap.
PaintBitmap.GetBh()

Get the height of the paint bitmap.

Return type: int
Returns: The height of the paint bitmap.
PaintBitmap.GetPaintTexture()

Get the paint texture if possible.

Return type: PaintTexture
Returns: The paint texture if possible, otherwise None.
PaintBitmap.GetParent()

Get the parent. This can be a layer or a texture for instance.

Return type: PaintTexture
Returns: The paint texture if possible, otherwise None.
PaintBitmap.GetLayerDownFirst()

Get the first alpha channel layer.

Return type: PaintLayer
Returns: The first alpha channel layer, or None if there is none.
PaintBitmap.GetLayerDownLast()

Get the last child layer.

Return type: PaintLayer
Returns: The last child layer, or None if there is none.
PaintBitmap.GetAlphaFirst()

Get the first alpha channel layer.

Return type: PaintLayer
Returns: The first alpha channel layer, or None if there is none.
PaintBitmap.GetAlphaLast()

Get the last alpha channel layer.

Return type: PaintLayer
Returns: The last alpha channel layer, or None if there is none.
PaintBitmap.AddAlphaChannel(bitdepth[, prev=None][, undo=True][, activate=True])

Add an alpha channel to the layer.

Parameters:
  • bitdepth (int) –

    The bit depth of the alpha channel:

    BITDEPTH_UCHAR UCHAR (8 bit).
    BITDEPTH_UWORD UWORD (16 bit).
    BITDEPTH_FLOAT Float (32 bit).
  • prev (PaintLayer) – Optional point to insert the alpha channel.
  • undo (bool) – True to create an undo on the undo stack, otherwise False.
  • activate (bool) – If True alpha channel will be activated.
Return type:

PaintLayerBmp

Returns:

The added alpha channel, or None if it failed.

PaintBitmap.AskApplyAlphaMask()

Check if an alpha mask can be applied.

Return type: bool
Returns: True if an alpha mask can be applied, otherwise False.
PaintBitmap.UpdateRefresh(xmin, ymin, xmax, ymax, flags)

Refresh an area of the paint bitmap. Must be done after modifying the paint bitmap.

Parameters:
  • xmin (int) – Left coordinate of the refreshed area.
  • ymin (int) – Top coordinate of the refreshed area.
  • xmax (int) – Right coordinate of the refreshed area.
  • ymax (int) – Bottom coordinate of the refreshed area.
  • flags (int) –

    Flags:

    UPDATE_CHILDREN Private.
    UPDATE_PARENTS Private.
    UPDATE_PREVIEW Private.
    UPDATE_REFRESH2D Private.
    UPDATE_RECALC Private.
    UPDATE_NOSAVECHG Private.
    UPDATE_NOOFFSET Private.
    UPDATE_REFRESH3D Private.
    UPDATE_REFRESHCURSOR Private.
    UPDATE_NOSTOPTHREADS Private.
    UPDATE_STD Standard refresh.
PaintBitmap.UpdateRefreshAll(flags, reallyall)

Refresh the complete paint bitmap. Has to be done after modifying the paint bitmap.

Parameters:
  • flags (int) –

    Flags:

    UPDATE_CHILDREN Private.
    UPDATE_PARENTS Private.
    UPDATE_PREVIEW Private.
    UPDATE_REFRESH2D Private.
    UPDATE_RECALC Private.
    UPDATE_NOSAVECHG Private.
    UPDATE_NOOFFSET Private.
    UPDATE_REFRESH3D Private.
    UPDATE_REFRESHCURSOR Private.
    UPDATE_NOSTOPTHREADS Private.
    UPDATE_STD Standard refresh.
  • reallyall (bool) – If True an infinite bounding box is used for the refresh. If False the bounding box of the layer is used, this is much faster.
PaintBitmap.GetColorMode()

Get the color mode of the paint bitmap.

Return type: int
Returns: The color mode:
COLORMODE_ALPHA Only 8-bit alpha channel.
COLORMODE_GRAY8 8-bit greyscale channel.
COLORMODE_AGRAY 8-bit greyscale channel with 8-bit alpha.
COLORMODE_RGB 8-bit RGB channels.
COLORMODE_ARGB 8-bit RGB channels with 8-bit alpha.
COLORMODE_CMYK 8-bit CMYK channel.
COLORMODE_ACMYK 8-bit CMYK channel with 8-bit alpha.
COLORMODE_MASK 8-bit greymap as mask.
COLORMODE_AMASK 8-bit greymap as mask with 8-bit alpha.
COLORMODE_ILLEGAL Private.
COLORMODE_GRAYw 8-bit greymap as mask with 8-bit alpha.
COLORMODE_AGRAYw 16-bit greyscale channel with 16-bit alpha.
COLORMODE_RGBw 16-bit RGB channels.
COLORMODE_ARGBw 16-bit RGB channels with 16-bit alpha.
COLORMODE_MASKw 16-bit greymap as mask with 16-bit alpha.
COLORMODE_ILLEGALf Private.
COLORMODE_GRAYf Floating point greyscale channel.
COLORMODE_AGRAYf Floating point greyscale channel with floating point alpha.
COLORMODE_RGBf Floating point RGB channels.
COLORMODE_ARGBf Floating point RGB channels with floating point alpha.
COLORMODE_MASKf Floating point greymap with floating point alpha.
PaintBitmap.GetDirty(flags)

Get dirty count.

Parameters: flags (int) – Reserved, must be 0.
Return type: int
Returns: Dirty count, incremented when the paint bitmap changes.

Table Of Contents