3ds Max C++ API Reference
Loading...
Searching...
No Matches
BitmapManager Class Referenceabstract

#include <bitmap.h>

+ Inheritance diagram for BitmapManager:

Public Member Functions

virtual BMMExport ~BitmapManager ()
 
virtual int DeleteAllMaps ()=0
 
virtual int AddStorage (BitmapStorage *s)=0
 
virtual int AddFilter (BitmapFilter *a)=0
 
virtual int AddBitmap (Bitmap *b)=0
 
virtual int DelStorage (BitmapStorage *s)=0
 
virtual int DelFilter (BitmapFilter *a)=0
 
virtual int DelBitmap (Bitmap *b)=0
 
virtual BitmapFilterFindFilter (BitmapStorage *s, UINT type)=0
 
virtual BitmapStorageFindStorage (BitmapInfo *bi, int openMode)=0
 
virtual int FnametoBitMapInfo (BitmapInfo *bi)=0
 
virtual void FixFileExt (OPENFILENAME &ofn, const MCHAR *extension)=0
 
virtual void MakeVfbPalette ()=0
 
virtual void ListIO ()=0
 
virtual DllDirAppDllDir ()=0
 
virtual void SetFileInputDialog (BitmapFileInputDialog *dlg=nullptr)=0
 
virtual void SetFileOutputDialog (BitmapFileOutputDialog *dlg=nullptr)=0
 
virtual int Status (int *sCount, int *aCount, int *bCount)=0
 
virtual int Error (const MCHAR *string)=0
 
virtual void UpdateAllStorageColorSettings ()=0
 Updates color management related settings and caches in all bitmap storages.
 
void ClearInternalRelativePathResolutionCache ()
 
Host Interface


virtual HINSTANCE AppInst ()=0
 
virtual HWND AppWnd ()=0
 
virtual const MCHARGetDir (int i)=0
 
virtual BOOL AddMapDir (const MCHAR *dir, int update)=0
 
virtual int GetMapDirCount ()=0
 
virtual const MCHARGetMapDir (int i)=0
 
virtual InterfaceMax ()=0
 
Creation / Loading
virtual BitmapNewBitmap ()=0
 
virtual BMMExport BitmapCreate (BitmapInfo *bi)=0
 
virtual BMMExport BitmapCreate (PBITMAPINFO pbmi, bool setGamma=false)=0
 
virtual BMMExport BitmapLoad (BitmapInfo *bi, BMMRES *status=nullptr)=0
 
virtual BMMRES LoadInto (BitmapInfo *bi, Bitmap **map, BOOL forceReload=FALSE)=0
 
virtual BMMExport BitmapColorConvert (const Bitmap *source, const MSTR &toColorSpaceOrDisplay, const MSTR *toViewTransform=nullptr)=0
 Applies OpenColorIO based color conversion into a new bitmap of type BMM_FLOAT_RGBA_32 according to the given parameters.
 
virtual BMMExport BMMRES ColorConvertInto (const Bitmap *source, Bitmap *target, const MSTR &toColorSpaceOrDisplay, const MSTR *toViewTransform=nullptr)=0
 Applies OpenColorIO based color conversion from a given Bitmap into another according to the given parameters.
 
Error Processing
virtual BOOL SilentMode ()=0
 
virtual void SysLog (int type, char *format,...)=0
 
virtual BOOL SetSilentMode (BOOL s)=0
 Sets the silent mode on/off.
 
virtual void SetLogLevel (DWORD level)=0
 
virtual DWORD GetLogLevel ()=0
 
User Interface Methods
virtual BMMRES GetImageInfoDlg (HWND hWnd, BitmapInfo *bi, const MCHAR *filename=nullptr)=0
 
virtual BMMRES GetImageInfo (BitmapInfo *bi, const MCHAR *filename=nullptr)=0
 
virtual BOOL ImageInputOptions (BitmapInfo *bi, HWND hWnd)=0
 
virtual BOOL SelectDeviceInput (BitmapInfo *bi, HWND hWnd)=0
 
virtual BOOL SelectDeviceOutput (BitmapInfo *bi, HWND hWnd)=0
 
virtual BOOL SelectFileOutput (BitmapInfo *bi, HWND hWnd, const MCHAR *title=nullptr, ULONG *pflags=nullptr, const MCHAR *extension=nullptr, const MCHAR *config=nullptr, const MCHAR *map=nullptr)=0
 
virtual BOOL SelectFileInput (BitmapInfo *bi, HWND hWnd, const MCHAR *title=nullptr)=0
 
virtual BOOL SelectFileInputEx (BitmapInfo *bi, HWND hWnd, const MCHAR *title=nullptr, BOOL viewonly=FALSE)=0
 
virtual void BeginSavingLoadErrorFiles ()=0
 
virtual NameTabGetLoadErrorFileList ()=0
 
virtual void EndSavingLoadErrorFiles ()=0
 
virtual BMMExport bool CanImport (const MCHAR *filename)=0
 
Display / VFB Related Methods
virtual void RefreshAllVFBs ()=0
 
virtual void DeleteAllAutonomousVFBMaps ()=0
 
Future Expansion
virtual INT_PTR Execute (int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0)=0
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor.
 
virtual UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Public Attributes

BMMVfbPalettepal = nullptr
 
BMM_IOList ioList
 

Friends

void DoConstruct (BitmapManager *m, BMMInterface *i, const MCHAR *name)
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.
 

Detailed Description

See also
Class BitmapInfo, Class Bitmap, Class BitmapIO, Class BitmapStorage, Working with Bitmaps, Bitmap Error (result) Codes
Description:
This class is used to manage the use of bitmaps within 3ds Max. There is a global instance of this class provided by 3ds Max that developers may use to call these methods. It is called TheManager. This class provides methods for things such as creating and loading bitmaps, and access to the bitmap Map Path directories. There are also methods for displaying some general dialogs that let users select input and output files and devices, as well as dialogs for setting options for the bitmap such as its custom width, height and positioning.

Note: In the 3ds Max release 3.0 SDK these methods were made virtual.
Data Members:
BMMVfbPalette *pal;

This is used internally as the virtual framebuffer palette.
Defines:
#define BMM_FLUSH_RELATIVE_FILE_RESOLUTION_CACHE 5

Used to flush the internal cache used to avoid having to re-resolve relative paths on each LoadInto call

Constructor & Destructor Documentation

◆ ~BitmapManager()

virtual BMMExport ~BitmapManager ( )
virtual

Member Function Documentation

◆ DeleteAllMaps()

virtual int DeleteAllMaps ( )
pure virtual

◆ AddStorage()

virtual int AddStorage ( BitmapStorage s)
pure virtual

◆ AddFilter()

virtual int AddFilter ( BitmapFilter a)
pure virtual

◆ AddBitmap()

virtual int AddBitmap ( Bitmap b)
pure virtual

◆ DelStorage()

virtual int DelStorage ( BitmapStorage s)
pure virtual

◆ DelFilter()

virtual int DelFilter ( BitmapFilter a)
pure virtual

◆ DelBitmap()

virtual int DelBitmap ( Bitmap b)
pure virtual

◆ FindFilter()

virtual BitmapFilter * FindFilter ( BitmapStorage s,
UINT  type 
)
pure virtual

◆ FindStorage()

virtual BitmapStorage * FindStorage ( BitmapInfo bi,
int  openMode 
)
pure virtual

◆ FnametoBitMapInfo()

virtual int FnametoBitMapInfo ( BitmapInfo bi)
pure virtual

◆ FixFileExt()

virtual void FixFileExt ( OPENFILENAME &  ofn,
const MCHAR extension 
)
pure virtual

◆ MakeVfbPalette()

virtual void MakeVfbPalette ( )
pure virtual

◆ ListIO()

virtual void ListIO ( )
pure virtual

◆ AppInst()

virtual HINSTANCE AppInst ( )
pure virtual
Remarks
Returns the application instance handle of 3ds Max itself.

◆ AppWnd()

virtual HWND AppWnd ( )
pure virtual
Remarks
Returns the window handle of 3ds Max's main window.

◆ GetDir()

virtual const MCHAR * GetDir ( int  i)
pure virtual
Remarks
Implemented by the System.

Retrieves the specified standard 3ds Max directory name (fonts, scenes, images, etc.).
Parameters:
int i

Specifies the directory name to retrieve. See MAX Directory IDs
Returns
The name of the specified directory.

◆ AddMapDir()

virtual BOOL AddMapDir ( const MCHAR dir,
int  update 
)
pure virtual
Remarks
For internal use only - This is used to add a MAP PATH to the Map path list.

◆ GetMapDirCount()

virtual int GetMapDirCount ( )
pure virtual
Remarks
Returns the number of map paths (used in conjunction with the method below).
Returns
The number of map paths.

◆ GetMapDir()

virtual const MCHAR * GetMapDir ( int  i)
pure virtual
Remarks
Map paths are accessed using a virtual array mechanism. This method returns the 'i-th' map path.
Parameters:
int i

Specifies the map path to retrieve.
Returns
The name of the 'i-th' map path.

◆ Max()

virtual Interface * Max ( )
pure virtual
Remarks
Implemented by the System.

Returns an interface pointer for calling methods provided by 3ds Max. See Class Interface.

◆ AppDllDir()

virtual DllDir * AppDllDir ( )
pure virtual

◆ NewBitmap()

virtual Bitmap * NewBitmap ( )
pure virtual
Remarks
This method is called to allocate and return a pointer to a new instance of the Bitmap class. The default constructor is used.

◆ SetFileInputDialog()

virtual void SetFileInputDialog ( BitmapFileInputDialog dlg = nullptr)
pure virtual

◆ SetFileOutputDialog()

virtual void SetFileOutputDialog ( BitmapFileOutputDialog dlg = nullptr)
pure virtual

◆ Status()

virtual int Status ( int sCount,
int aCount,
int bCount 
)
pure virtual

◆ Error()

virtual int Error ( const MCHAR string)
pure virtual

◆ SilentMode()

virtual BOOL SilentMode ( )
pure virtual
Remarks
Determines if silent mode is on. Silent mode specifies if developers should display error messages. If this method returns FALSE, error messages should be displayed. If TRUE, error message dialogs should not be shown.
Returns
Returns TRUE if silent mode is on; FALSE otherwise.

◆ SysLog()

virtual void SysLog ( int  type,
char *  format,
  ... 
)
pure virtual
Remarks
This is reserved for future use.

◆ SetSilentMode()

virtual BOOL SetSilentMode ( BOOL  s)
pure virtual

Sets the silent mode on/off.

The silent mode disables any message box pop-ups that may interrupt the process.

Returns
The previous state of the silent mode.

◆ SetLogLevel()

virtual void SetLogLevel ( DWORD  level)
pure virtual
Remarks
This method is used internally.

◆ GetLogLevel()

virtual DWORD GetLogLevel ( )
pure virtual
Remarks
This method is used internally.

◆ Create() [1/2]

virtual BMMExport Bitmap * Create ( BitmapInfo bi)
pure virtual
Remarks
This method creates a new bitmap using the properties of the BitmapInfo passed. For more details on creating bitmaps, see the section Working with Bitmaps. Make sure you delete the Bitmap created when you are done using it.
Parameters:
BitmapInfo *bi

A pointer to an instance of the class BitmapInfo describing the bitmap to create.
Returns
A pointer to a newly created instance of class Bitmap.

◆ Create() [2/2]

virtual BMMExport Bitmap * Create ( PBITMAPINFO  pbmi,
bool  setGamma = false 
)
pure virtual
Remarks
This method is used for creating a new bitmap from an existing Windows Device Independent Bitmap. Make sure you delete the Bitmap created when you are done using it.
Parameters:
PBITMAPINFO pbmi

An existing Windows DIB. For more details on creating bitmaps, see the section Working with Bitmaps. bool setGamma

If true, the Bitmap is created with its BitmapInfo's custom flag set to BMM_CUSTOM_GAMMA and its gamma set to the current display gamma
Returns
Pointer to a new instance of class Bitmap created from the DIB.

See also
To create a Windows DIB from a Bitmap see Bitmap::ToDib()

◆ Load()

virtual BMMExport Bitmap * Load ( BitmapInfo bi,
BMMRES status = nullptr 
)
pure virtual
Remarks
This method loads a bitmap using the parameters specified by the BitmapInfo pointer. Make sure you delete the Bitmap created when you are done using it.

Note: When several plug-ins call this method to load the same image, they all receive the same pointer to one instance of the BitmapStorage. So if one plug-in manipulates the image, the changes will get reflected everywhere. A developer may use BitmapManager::Create() followed by Bitmap::CopyImage() to create a unique instance of BitmapStorage.

Also Note: One of the methods in BitmapInfo returns a window handle to send progress report messages. If you want to receive these messages (for purposes of putting up a progress bar during the load), set the window handle (bi->SetUpdateWindow(hWnd)) and process BMM_PROGRESS and BMM_CHECKABORT messages.
Parameters:
BitmapInfo *bi

Specifies the properties of the bitmap to load.

BMMRES *status

The result of the bitmap load operation. See Bitmap Error (result) Codes.
Returns
A pointer to a new instance of the class Bitmap.

◆ LoadInto()

virtual BMMRES LoadInto ( BitmapInfo bi,
Bitmap **  map,
BOOL  forceReload = FALSE 
)
pure virtual
Remarks
This method loads the bitmap specified by bi into the bitmap pointed to by map. The normal Load() method creates a new bitmap. However, if you already have an existing bitmap and simply want to load in a new frame, this method may be used. Specify which bitmap to use using bi and the map to load into using map. For instance, if you have an AVI file and you want to load a new frame, you can simply update the frame number specified in the BitmapInfo and call this method passing the bitmap associates with the previous frame.
Parameters:
BitmapInfo *bi

Specifies the properties of the bitmap to load.

Bitmap **map

A pointer to a pointer to a bitmap. This is the bitmap that will be loaded into.

BOOL forceReload=FALSE

If an existing bitmap that matches bi is already loaded, then calling calling LoadInto() won't load from the disk or device. Rather it will just use the existing in memory version. If you want to force the bitmap to be reloaded from the file or device set this to TRUE.
Returns
The result of the bitmap load operation. See Bitmap Error (result) Codes.

◆ ColorConvert()

virtual BMMExport Bitmap * ColorConvert ( const Bitmap source,
const MSTR toColorSpaceOrDisplay,
const MSTR toViewTransform = nullptr 
)
pure virtual

Applies OpenColorIO based color conversion into a new bitmap of type BMM_FLOAT_RGBA_32 according to the given parameters.


This function uses the IColorPipelineManager to convert the pixel data of one Bitmap into a new Bitmap with the same dimensions as the source bitmap and the type BMM_FLOAT_RGBA_32.
Internally, this function calls ColorConvertInto, so all the parameters behave the same: If toColorSpaceOrDisplay is passed in only, this function does a color space conversion (interpreting toColorSpaceOrDisplay as the name of the color space to convert to).
If both toColorSpaceOrDisplay and toViewTransform are passed in, the function does a display/view transform conversion (taking toColorSpaceOrDisplay as the name of the display).
The source color space used for the conversion is extracted from the BitmapInfo of the source Bitmap.

Note
For information about the available color spaces or display / view transforms please check the documentation of MaxSDK::ColorManagement::IColorPipelineMgr.
Parameters
[in]sourceThe bitmap to be converted. Note that the color space of this bitmap must not be invalid.
[in]toColorSpaceOrDisplayThe name of the color space or display (if toViewTransform is present) to convert the pixel data into.
[in]toViewTransformThe name of the view transform for the display /view transform conversion used to convert the pixel data into. Note that this view transform has to be valid for the given display (toColorSpaceOrDisplay).
Returns
The newly created Bitmap with the data converted according to the given parameters.
See also
ColorConvertInto, BitmapInfo::ColorSpace, BitmapInfo::ColorSpaceStatus, MaxSDK::ColorManagement::IColorPipelineMgr

◆ ColorConvertInto()

virtual BMMExport BMMRES ColorConvertInto ( const Bitmap source,
Bitmap target,
const MSTR toColorSpaceOrDisplay,
const MSTR toViewTransform = nullptr 
)
pure virtual

Applies OpenColorIO based color conversion from a given Bitmap into another according to the given parameters.


This function uses the IColorPipelineManager to convert the pixel data of one bitmap into another. If toColorSpaceOrDisplay is passed in only, this function does a color space conversion (interpreting toColorSpaceOrDisplay as the name of the color space to convert to).
If both toColorSpaceOrDisplay and toViewTransform are passed in, the function does a display/view transform conversion (taking toColorSpaceOrDisplay as the name of the display).
The source color space used for the conversion is extracted from the BitmapInfo of the source Bitmap.

Note
For information about the available color spaces or display / view transforms please check the documentation of MaxSDK::ColorManagement::IColorPipelineMgr.
Parameters
[in]sourceThe bitmap to be converted. Note that the color space of this bitmap must not be invalid.
[in,out]targetThe bitmap to receive the converted pixel data. It has to have the same dimensions as the source Bitmap.
[in]toColorSpaceOrDisplayThe name of the color space or display (if toViewTransform is present) to convert the pixel data into.
[in]toViewTransformThe name of the view transform for the display /view transform conversion used to convert the pixel data into. Note that this view transform has to be valid for the given display (toColorSpaceOrDisplay).
Returns
BMMRES_SUCCESS or BMMRES_INTERNALERROR if some error occurs.
See also
ColorConvert, BitmapInfo::ColorSpace, BitmapInfo::ColorSpaceStatus, MaxSDK::ColorManagement::IColorPipelineMgr

◆ GetImageInfoDlg()

virtual BMMRES GetImageInfoDlg ( HWND  hWnd,
BitmapInfo bi,
const MCHAR filename = nullptr 
)
pure virtual
Remarks
This method will display information about the given bitmap in a dialog. The source of the information is either defined in bi->Name()/bi->Device() or explicitly in the filename passed). This method is an interface into BitmapIO::GetImageInfoDlg(). It is not normally called by developers.

The default implementation is within the Bitmap Manager. There is a generic Image Info dialog that is used unless the proper BitmapIO class implements it own dialog (and notifies the system through the BitmapIO::Capabilities() method).
Parameters:
HWND hWnd

The parent window handle calling the dialog.

BitmapInfo *bi

Defines the name of the bitmap or device (unless specified below). The image information fields of BitmapInfo *bi are set with the information loaded from the image.

const MCHAR *filename = NULL

Specifies the filename to use explicitly.
Returns
The result of the operation. See Bitmap Error (result) Codes.

◆ GetImageInfo()

virtual BMMRES GetImageInfo ( BitmapInfo bi,
const MCHAR filename = nullptr 
)
pure virtual
Remarks
This method is used to get information about an image, ie things like image resolution (bi->Width()/bi->Height()), number of frames, etc. This is an interface into BitmapIO::GetImageInfo(). Given an image definition in bi.Name() / bi.Device() or explicitly in filename (this function will place filename, if not NULL, into bi.Name() before calling BitmapIO::GetImageInfo()), the proper device will fill the data members in BitmapInfo *bi with information about the image.
Parameters:
BitmapInfo *bi

Defines the name of the bitmap or device (unless specified below).

const MCHAR *filename = NULL

Specifies the filename to use explicitly.
Returns
The result of the operation. See Bitmap Error (result) Codes.

◆ ImageInputOptions()

virtual BOOL ImageInputOptions ( BitmapInfo bi,
HWND  hWnd 
)
pure virtual
Remarks
This method brings up the standard 3ds Max Image Input Options dialog box. If the users selects OK from the dialog, the appropriate data members of BitmapInfo *bi are filled specifying the user's choices. These are the 'Custom' fields accessed using methods such as GetCustomX(), GetCustomGamma(), GetCustomStep(), etc.
Parameters:
BitmapInfo *bi

The instance of BitmapInfo that is updated based on the users dialog selections.

HWND hWnd

The parent window handle for the dialog.
Returns
Returns TRUE if the users selects OK from the dialog; otherwise FALSE.

◆ SelectDeviceInput()

virtual BOOL SelectDeviceInput ( BitmapInfo bi,
HWND  hWnd 
)
pure virtual
Remarks
Brings up the standard 3ds Max Select Image Input Device dialog box. If the users selects OK from the dialog, then bi->Device() is set to the name of the users device choice.
Parameters:
BitmapInfo *bi

Points to the instance of BitmapInfo that is updated based on the users dialog selections.

HWND hWnd

The parent window handle for the dialog.
Returns
TRUE if the user exited the dialog using OK; otherwise FALSE.

◆ SelectDeviceOutput()

virtual BOOL SelectDeviceOutput ( BitmapInfo bi,
HWND  hWnd 
)
pure virtual
Remarks
Brings up the standard 3ds Max Select Image Output Device dialog box. If the users selects OK from the dialog, then bi->Device() is set to the name of the users device choice.
Parameters:
BitmapInfo *bi

Points to the instance of BitmapInfo that is updated based on the users dialog selections.

HWND hWnd

The parent window handle for the dialog.
Returns
TRUE if the user exited the dialog using OK; otherwise FALSE.

◆ SelectFileOutput()

virtual BOOL SelectFileOutput ( BitmapInfo bi,
HWND  hWnd,
const MCHAR title = nullptr,
ULONG *  pflags = nullptr,
const MCHAR extension = nullptr,
const MCHAR config = nullptr,
const MCHAR map = nullptr 
)
pure virtual
Remarks
Brings up the standard 3ds Max Browse Images for Output dialog box. If the users selects OK from the dialog, then bi->Name() is set to the name of the users file choice.
Parameters:
BitmapInfo *bi

Points to the instance of BitmapInfo that is updated based on the users dialog selections.

HWND hWnd

The parent window handle for the dialog.

MCHAR *title = NULL

The optional title string to display in the title bar of the dialog.

ULONG *pflags = NULL

This parameter is available in release 4.0 and later only.

One of the following:

BMM_ENABLE_SAVE_REGION

This flag will cause the "SaveRegion" check box to appear in the dialog.

BMM_DO_SAVE_REGION

This flag will return the state of the check box. const MCHAR *extension = NULL

The optional extension string to display in the Save as type field of the dialog.

const MCHAR *config = NULL

The optional name template configuration, used to load according name templates and display in Name template dropdown combobox of the dialog. Currently support only two name template configurations: PreviewNTP (the default) and TextureNTP. The name templates for these configurations are:

PreviewNTP:

<scene>

<scene>_<camera/view>

<scene>_<camera/view>_<mm>-<dd>

<scene>_<camera/view>_<mm>-<dd>-<yyyy>

CustomTemplate_<scene>_<camera/view>_<mm>-<dd>

TextureNTP:

<object>_<map>

CustomTemplate_<object>_<map>

These templates provide convenience to users in the following conditions:

Save preview animation or rendering output based on scene, camera/view name, even with date information

Save texture for a object based on object, map name.

If choose a specific template, the File name field text will be replace automatically with specific scene, camera/view, object, map name and date information

const MCHAR *map = NULL

The optional map string used to replace <map> when using TextureNTP template.
Returns
TRUE if the user exited the dialog using OK; otherwise FALSE.

◆ SelectFileInput()

virtual BOOL SelectFileInput ( BitmapInfo bi,
HWND  hWnd,
const MCHAR title = nullptr 
)
pure virtual
Remarks
Brings up the standard 3ds Max Browse Images for Input dialog box. If the users selects OK from the dialog, then bi->Name() is set to the name of the users file choice.
Parameters:
BitmapInfo *bi

The instance of BitmapInfo that is updated based on the users dialog selections.

HWND hWnd

The parent window handle for the dialog.

MCHAR *title = NULL

The optional title string to display in the title bar of the dialog.
Returns
TRUE if the user exited the dialog using OK; otherwise FALSE.

◆ SelectFileInputEx()

virtual BOOL SelectFileInputEx ( BitmapInfo bi,
HWND  hWnd,
const MCHAR title = nullptr,
BOOL  viewonly = FALSE 
)
pure virtual
Remarks
This method brings up the standard 3ds Max Browse Images for Input dialog box (the same as SelectFileInput()) but a "Devices" button is present so the user can select both image files and image devices.
Parameters:
BitmapInfo *bi

The instance of BitmapInfo that is updated based on the users dialog selections.

HWND hWnd

The parent window handle for the dialog.

MCHAR *title = NULL

The optional title string to display in the title bar of the dialog.

BOOL viewonly = FALSE

If viewonly is set to TRUE, the View button is hidden in the dialog.
Returns
TRUE if the user exited the dialog using OK; otherwise FALSE.

◆ UpdateAllStorageColorSettings()

virtual void UpdateAllStorageColorSettings ( )
pure virtual

Updates color management related settings and caches in all bitmap storages.

This includes gamma tables, color spaces names and color pipeline caches used to convert native colors into rendering space. This will also update all the VFB's.

◆ RefreshAllVFBs()

virtual void RefreshAllVFBs ( )
pure virtual
Remarks
This method refreshes the interior of all the virtual frame buffer windows with each bitmap's contents.

◆ DeleteAllAutonomousVFBMaps()

virtual void DeleteAllAutonomousVFBMaps ( )
pure virtual
Remarks
This method calls Bitmap::DeleteThis() on all the bitmaps whose virtual frame buffers are set to autonomous.

◆ Execute()

virtual INT_PTR Execute ( int  cmd,
ULONG_PTR  arg1 = 0,
ULONG_PTR  arg2 = 0,
ULONG_PTR  arg3 = 0 
)
pure virtual
Remarks
This is a general purpose function that allows the API to be extended in the future. The 3ds Max development team can assign new cmd numbers and continue to add functionality to this class without having to 'break' the API.
Parameters:
int cmd

The index of the command to execute.

ULONG arg1=0

Optional argument 1. See the documentation where the cmd option is discussed for more details on these parameters.

ULONG arg2=0

Optional argument 2.

ULONG arg3=0

Optional argument 3.
Returns
An integer return value. See the documentation where the cmd option is discussed for more details on the meaning of this value.

◆ BeginSavingLoadErrorFiles()

virtual void BeginSavingLoadErrorFiles ( )
pure virtual
Remarks
This method is used for accumulating the names of bitmap files that didn't load. Instead of having the BitmapManager display the missing file dialog, it now just collects the names (which can be retrieved using GetLoadErrorFileList() below).

◆ GetLoadErrorFileList()

virtual NameTab & GetLoadErrorFileList ( )
pure virtual
Remarks
This method will return a list of names of bitmap files that were not found as discussed in the method above. See Class NameTab.

◆ EndSavingLoadErrorFiles()

virtual void EndSavingLoadErrorFiles ( )
pure virtual
Remarks
This method ends the accumulation of a list of bitmap files that didn't load, and frees the list. See the two methods above.

◆ CanImport()

virtual BMMExport bool CanImport ( const MCHAR filename)
pure virtual
Remarks
Returns true if the extension of the specified file name is one of the supported types (i.e. there is a BitmapIO module for it); otherwise false.
Parameters:
const MCHAR* filename

The file name to check.

◆ ClearInternalRelativePathResolutionCache()

void ClearInternalRelativePathResolutionCache ( )
inline
Remarks
Implements the 'strip path' action.
#define BMM_FLUSH_RELATIVE_FILE_RESOLUTION_CACHE
Definition: bitmap.h:5605
virtual INT_PTR Execute(int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0)=0

Friends And Related Function Documentation

◆ DoConstruct

void DoConstruct ( BitmapManager m,
BMMInterface *  i,
const MCHAR name 
)
friend

Member Data Documentation

◆ pal

BMMVfbPalette* pal = nullptr

◆ ioList

BMM_IOList ioList