This documentation is for the free plugin Py4D in CINEMA 4D R11.5 and not for the C4DSDK of Python in CINEMA 4D R12. For R12, please visit PluginCafe.com

c4d.plugins.BitmapSaverData

A data class for creating bitmap savers. Use RegisterBitmapSaverPlugin to register the plugin.

class c4d.plugins.BitmapSaverData

Methods

BitmapSaverData.Edit(self, data)

Override - Open the settings dialog for this import/export filter.

Parameter:data (BaseContainer) – The settings for your plugin.
Return type:bool
Returns:True if the dialog opened successfully.
BitmapSaverData.Save(self, fn, bmp, data, savebits)

Warning

NEVER call any GUI commands in this method. Use the return value to inform the user about the state of the rendering.

Override - Save the bitmap to a file.

Parameters:
  • fn (str) – The filename of the file to save.
  • bmp (BaseBitmap) – The bitmap to save the image from.
  • data (BaseContainer) – The settings for your plugin. These settings are stored with the general prefs.
  • savebits (int) –

    Flags for the save.

    SAVEBIT_ALPHA Save the alpha channel(s) in the file. (For filter plugins, don’t save an alpha channel if this isn’t set.)
    SAVEBIT_GREYSCALE Save in grayscale mode.
    SAVEBIT_MULTILAYER Save multiple layers.
    SAVEBIT_USESELECTEDLAYERS Use selected layers.
    SAVEBIT_16BITCHANNELS Use 16 bit channels.
    SAVEBIT_32BITCHANNELS Use 32 bit channels.
    SAVEBIT_SAVERENDERRESULT Private.
Return type:

int

Returns:

The return values are stored in c4d.bitmaps:

IMAGE_OK

Image loaded/created.

IMAGE_NOTEXISTING

Image doesn’t exist.

IMAGE_WRONGTYPE

Image has the wrong type.

IMAGE_NOMEM

Not enough memory.

IMAGE_DISKERROR

Disk error.

IMAGE_FILESTRUCT

Invalid file structure.

Table Of Contents

This Page