About
MultipassBitmap is a subclass of BaseBitmap that provides support for multiple folders and layers. Such a folder or layer is represented as another MultipassBitmap.
- Warning
- For MAXON API image classes see Images Manual. For MAXON API media input and output see Media Sessions Manual.
const Int32 height = 1080;
if (multipassBitmap == nullptr)
if (layer)
{
{
for (
Int32 y = 0; y < height; ++y)
{
{
lineBuffer[offset] = red;
lineBuffer[offset + 1] = green;
lineBuffer[offset + 2] = 0;
offset = offset + 3;
}
}
}
}
{
}
Filename GeFilterSetSuffix(const Filename &name, Int32 id)
IMAGERESULT Save(const Filename &name, Int32 format, BaseContainer *data, SAVEBIT savebits) const
Bool SetPixelCnt(Int32 x, Int32 y, Int32 cnt, UChar *buffer, Int32 inc, COLORMODE srcmode, PIXELCNT flags)
Definition: c4d_basebitmap.h:767
static BaseBitmap * Alloc(void)
Manages file and path names.
Definition: c4d_file.h:94
Bool FileSelect(FILESELECTTYPE type, FILESELECT flags, const maxon::String &title, const maxon::String &force_suffix=maxon::String())
Definition: c4d_basebitmap.h:962
Bool SetParameter(MPBTYPE id, const GeData &par)
Definition: c4d_basebitmap.h:1129
static void Free(MultipassBitmap *&bm)
MultipassBitmap * AddLayer(MultipassBitmap *insertafter, COLORMODE colormode, Bool hidden=false)
Definition: c4d_basebitmap.h:1054
PyObject * x
Definition: bytesobject.h:38
Py_UCS4 * res
Definition: unicodeobject.h:1113
#define NewMemClear(T, cnt)
Definition: defaultallocator.h:204
Float32 PIX_F
32-bit float pixel type.
Definition: ge_math.h:34
maxon::UChar UChar
Definition: ge_sys_math.h:57
maxon::Float32 Float32
Definition: ge_sys_math.h:68
maxon::Int32 Int32
Definition: ge_sys_math.h:60
#define COLORBYTES_RGBf
Floating point RGB.
Definition: c4d_basebitmap.h:93
COLORMODE
Definition: ge_prepass.h:453
@ RGBf
32-bit floating point RGB channels.
#define FILTER_TIF
TIFF.
Definition: ge_prepass.h:183
IMAGERESULT
Definition: ge_prepass.h:3914
@ OK
Image loaded/created.
@ NAME
String Get/Set. The layer name.
SAVEBIT
Definition: ge_prepass.h:273
@ USE32BITCHANNELS
Use 32-bit channels.
@ MULTILAYER
Save multiple layers.
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:67
#define ApplicationOutput(formatString,...)
Definition: debugdiagnostics.h:210
#define ifnoerr(...)
The opposite of iferr.
Definition: errorbase.h:393
void DeleteMem(T *&p)
Definition: defaultallocator.h:257
unsigned long Py_ssize_t width
Definition: pycore_traceback.h:88
Access
A MultipassBitmap can be cast into a VPBuffer and vice versa in the rendering pipeline. If a given BaseBitmap pointer refers to a MultipassBitmap can be checked with BaseBitmap::IsMultipassBitmap().
Allocation/Deallocation
A MultipassBitmap can be created with the usual tools:
const Int32 height = 1080;
if (multipassBitmap == nullptr)
A multi-layer image file can also be loaded into a MultipassBitmap using BaseBitmap::Init():
{
}
else
{
}
maxon::Url MaxonConvert(const Filename &fn, MAXONCONVERTMODE convertMode)
@ NONE
No check if file exists under case-sensitive drives.
Definition: c4d_basebitmap.h:428
Bool IsMultipassBitmap(void) const
static IMAGERESULT Init(BaseBitmap *&res, const Filename &name, Int32 frame=-1, Bool *ismovie=nullptr, BitmapLoaderPlugin **loaderplugin=nullptr, const maxon::Delegate< void(Float progress)> &progressCallback=nullptr)
static void Free(BaseBitmap *&bm)
Int32 GetLayerCount() const
Definition: c4d_basebitmap.h:1006
static String IntToString(Int32 v)
Definition: c4d_string.h:495
PyObject PyObject * result
Definition: abstract.h:43
return OK
Definition: apibase.h:2667
The image data stored in the layers can easily be deleted with:
Properties
Parameters
Multiple parameters can be set to define the behaviour of a given layer:
- Note
- Since a MultipassBitmap is used within the rendering pipeline some of these parameters are only relevant in that context.
The parameter IDs are:
Some of these parameters can be directly accessed with these convenience functions:
if (layer)
{
}
@ LAYER_ADD
Definition: bplayer.h:40
Bool ShowBitmap(const Filename &fn)
void SetName(const maxon::String &name)
@ BLENDMODE
Int32 Get/Set. The blend mode (LAYER_NORMAL, LAYER_DISSOLVE etc. from bplayer.h).
@ SHOW
Bool Get/Set. Determines if the layer will be shown in the external render window....
@ SAVE
Bool Get/Set. Determines if the layer is saved with the image or not if SAVEBIT::USESELECTEDLAYERS is...
Layers
A MultipassBitmap can contain default layers, alpha layers and hidden layers:
These layers are accessed with:
for (
Int32 layerIndex = 0; layerIndex < layerCount; ++layerIndex)
{
if (layer)
{
}
}
const String & GetString(void) const
Definition: c4d_gedata.h:463
MultipassBitmap * GetLayerNum(Int32 num)
Definition: c4d_basebitmap.h:1031
GeData GetParameter(MPBTYPE id) const
Definition: c4d_basebitmap.h:1121
Definition: c4d_string.h:39
Layers, folders and alpha layers are added with:
Further layer related functions are:
if (folder)
{
if (layerA)
{
}
if (layerB)
{
}
}
MultipassBitmap * AddFolder(MultipassBitmap *insertafter, Bool hidden=false)
Definition: c4d_basebitmap.h:1062
Convert
The content of a MultipassBitmap can also be represented as a BodyPaint PaintBitmap:
if (mergedBitmap == nullptr)
if (paintBitmap == nullptr)
if (!paintBitmap->
ReCalc(
nullptr, 0, 0,
width, height, mergedBitmap, calcFlags, 0))
Definition: ge_autoptr.h:37
Int32 GetBw(void) const
Definition: c4d_basebitmap.h:567
Int32 GetBh(void) const
Definition: c4d_basebitmap.h:573
PaintBitmap * GetPaintBitmap()
Definition: c4d_basebitmap.h:1153
The base class of all paint classes. Can be a texture, material, layer or mask.
Definition: c4d_painter.h:435
Bool ReCalc(BaseThread *thread, Int32 x1, Int32 y1, Int32 x2, Int32 y2, BaseBitmap *bmp, Int32 flags, UInt32 showbit)
Definition: c4d_painter.h:568
#define RECALC_NOGRID
If set the checkered background grid will not be evaluated.
Definition: c4d_painter.h:572
#define RECALC_INITBMP
Initialize the BaseBitmap of the bmp parameter.
Definition: c4d_painter.h:573
Further Reading