The abstract base class of all paint classes. Can be a texture, material, layer or mask.
Definition
-
class c4d.modules.bodypaint.PaintLayerBmp
Members
-
PaintLayerBmp.ImportFromBaseBitmap(bmp, usealpha)
Fill the layer bitmap with an imported bitmap.
Parameters: |
- bm (BaseBitmap) – The bitmap to import.
- usealpha (bool) – If True the alpha channel of the bitmap is used, otherwise False.
|
Return type: | bool
|
Returns: | True if successful, otherwise False.
|
-
PaintLayerBmp.ImportFromBaseBitmapAlpha(bmp, channel)
Fill the layer bitmap with an imported bitmap.
Parameters: |
- bm (BaseBitmap) – The bitmap to import.
- channel (BaseBitmap) – The separate alpha channel bitmap to import.
|
Return type: | bool
|
Returns: | True if successful, otherwise False.
|
-
PaintLayerBmp.GetBoundingBox()
Get the bounding box of the bitmap layer:
d = layer_bmp.GetBoundingBox()
d["x1"], d["y1"], d["y1"], d["y2"]
Return type: | dict |
Returns: | The coordinates |
-
PaintLayerBmp.GetPixelCnt(x, y, cnt, buffer, dstmode, flags)
-
Reads cnt pixels from (x, y) in the bitmap to the buffer with mode dstmode.
Parameters: |
|
Return type: | bool
|
Returns: | True if successful, otherwise False.
|
-
PaintLayerBmp.SetPixelCnt(x, y, cnt, buffer, inc, srcmode, flags)
-
Sets cnt pixels at (x, y) in the bitmap from buffer with mode srcmode, incrementing inc bytes for each pixel.
Parameters: |
- x (int) – X coordinate of the first pixel to set.
- y (int) – Y coordinate of the first pixel to set.
- cnt (int) – Number of pixels to set.
- buffer (ByteSeq) – The source buffer.
- inc (int) – The byte increment per pixel in the buffer.
- srcmode (int) –
The source mode.
Note
None of the alpha modes are supported.
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. |
- flags (int) –
Flags:
PIXELCNT_0 |
None. |
PIXELCNT_APPLYALPHA |
Apply alpha channel. |
PIXELCNT_B3DLAYERS |
Merge B3D layers (MultipassBitmap) |
PIXELCNT_DITHERING |
Allow dithering. |
PIXELCNT_INTERNAL_ALPHAVALUE |
Private. |
PIXELCNT_INTERNAL_SETLINE |
Private. |
|
Return type: | bool
|
Returns: | True if successful, otherwise False.
|