3ds Max C++ API Reference
IMaterialBrowserEntryInfo Class Referenceabstract

This interface allows materials and textures to customize their appearance in the Material Browser. More...

#include <IMaterialBrowserEntryInfo.h>

+ Inheritance diagram for IMaterialBrowserEntryInfo:

Public Member Functions

Interface_ID GetID () override
 
BaseInterfaceGetInterface (Interface_ID id) override
 
FPInterfaceDescGetDesc () override
 
virtual const MCHARGetEntryName () const =0
 Get the UI name of the entry. More...
 
virtual const MCHARGetEntryCategory () const =0
 The category under which the entry will appear in the material/map browser. More...
 
virtual bool IsStockObject () const
 
virtual BitmapGetEntryThumbnail () const =0
 Get the UI thumbnail of the entry, if any. More...
 
virtual bool HasEntryThumbnail () const
 Returns whether the entry supports a custom thumbnail via GetThumbnail(). More...
 
- Public Member Functions inherited from FPInterface
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t=0, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPParams *params)
 
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t, FPValue &result, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPValue &result, FPParams *params=NULL)
 
virtual CoreExport FunctionID FindFn (const MCHAR *name)
 
virtual CoreExport BOOL IsEnabled (FunctionID actionID)
 
virtual CoreExport BOOL IsChecked (FunctionID actionID)
 
virtual CoreExport BOOL IsVisible (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsEnabled (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsChecked (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsVisible (FunctionID actionID)
 
virtual ActionTableGetActionTable ()
 
virtual void EnableActions (BOOL onOff)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
virtual LifetimeType LifetimeControl ()
 
virtual bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=NULL)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Additional Inherited Members

- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 
- 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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 

Detailed Description

This interface allows materials and textures to customize their appearance in the Material Browser.

Remarks
This class is optional, and may be provided by plug-ins of superclass MATERIAL_CLASS_ID or TEXMAP_CLASS_ID. There is no obligation to implement it, and no guarantee it will be provided by internal materials or textures. If implemented, the plug-in class should return its instance of this interface in response to ClassDesc::GetInterface(IMATERIAL_BROWSER_ENTRY_INFO_INTERFACE). The system fetches the interface from the ClassDesc. The interface allows a plug-in to customize the default appearance of its entries, as shown in the Material Browser. This includes the display name, the thumbnail, and the location (or category) of entries. The user may further customize the appearance of the Material Browser; those customizations are saved in a configuration file, and may override values provided by this class. The class is implemented by the plug-in.
See also
IMATERIAL_BROWSER_ENTRY_INFO_INTERFACE

Member Function Documentation

◆ GetID()

Interface_ID GetID ( )
inlineoverridevirtual
Remarks
This method returns the unique interface ID.

Reimplemented from BaseInterface.

#define IMATERIAL_BROWSER_ENTRY_INFO_INTERFACE
Interface ID for the IMaterialBrowserEntryInfo Interface.
Definition: IMaterialBrowserEntryInfo.h:26

◆ GetInterface()

BaseInterface* GetInterface ( Interface_ID  id)
inlineoverridevirtual
Remarks
Returns a pointer to the interface whose ID is specified.
Parameters:
Interface_ID id

The ID of the interface to return.
Default Implementation:
{ return NULL; }

Reimplemented from FPInterface.

54  {
55  if( id==GetID() ) return this;
56  else return FPInterface::GetInterface(id);
57  }
virtual BaseInterface * GetInterface(Interface_ID id)
Definition: ifnpub.h:142
Interface_ID GetID() override
Definition: IMaterialBrowserEntryInfo.h:52

◆ GetDesc()

FPInterfaceDesc* GetDesc ( )
inlineoverridevirtual
Remarks
Returns a pointer to the class which contains the interface metadata.

Implements FPInterface.

59 { return nullptr; }

◆ GetEntryName()

virtual const MCHAR* GetEntryName ( ) const
pure virtual

Get the UI name of the entry.

This name will be displayed in the Material Browser, instead of the class name from the class descriptor.

Returns
The UI name of the entry.

◆ GetEntryCategory()

virtual const MCHAR* GetEntryCategory ( ) const
pure virtual

The category under which the entry will appear in the material/map browser.

The category is formatted as a path, with multiple levels of categorization being delimited by backslashes ("\\").

The base level should be one of the standard categories used by system materials and maps - i.e. "Maps", "Materials", etc. The next level could be a categorization based on the target use case or renderer - e.g. "Standard", "XYZRenderer", etc. Further levels of categorization are up to the developer.

Returns
The category string, formatted as described above.

◆ IsStockObject()

virtual bool IsStockObject ( ) const
inlinevirtual
85 { return false; }

◆ GetEntryThumbnail()

virtual Bitmap* GetEntryThumbnail ( ) const
pure virtual

Get the UI thumbnail of the entry, if any.

This thumbnail will be displayed in the Material Browser, instead of a rendered sample. This improves performance by avoiding a render, and allows a customized display in the browser. The system automatically displays a scaled image according to the current thumbnail size, but the preferred size is 100x100 pixels, to accommodate large thumbnails without upscaling.

Returns
The thumbnail bitmap of the entry, or NULL if none.

◆ HasEntryThumbnail()

virtual bool HasEntryThumbnail ( ) const
inlinevirtual

Returns whether the entry supports a custom thumbnail via GetThumbnail().

If this returns false, the system will render a thumbnail for display in the Material Browser.

Returns
true if a thumbnail can be provided, false otherwise.
See also
IMaterialBrowserEntryInfo::GetThumbnail
108 { return false; }