Public Member Functions

IMaterialBrowserEntryInfo Class Reference

Search for all occurrences

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

#include <IMaterialBrowserEntryInfo.h>

Inheritance diagram for IMaterialBrowserEntryInfo:
Inheritance graph
[legend]

List of all members.

Public Member Functions

Interface_ID  GetID ()
BaseInterface GetInterface (Interface_ID id)
FPInterfaceDesc GetDesc ()
virtual const MCHAR *  GetEntryName () const =0
  Get the UI name of the entry.
virtual const MCHAR *  GetEntryCategory () const =0
  The category the entry belongs to.
virtual bool  IsStockObject () const
virtual Bitmap GetEntryThumbnail () const =0
  Get the UI thumbnail of the entry, if any.
virtual bool  HasEntryThumbnail () const
  Returns whether the entry supports a custom thumbnail via GetThumbnail().

Member Function Documentation

Interface_ID GetID ( ) [inline, virtual]
Remarks:
This method returns the unique interface ID.

Reimplemented from BaseInterface.

{ return IMATERIAL_BROWSER_ENTRY_INFO_INTERFACE; }
BaseInterface* GetInterface ( Interface_ID  id ) [inline, virtual]
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.

                                                        {
        if( id==GetID() ) return this;
        else return FPInterface::GetInterface(id);
    }
FPInterfaceDesc* GetDesc ( ) [inline, virtual]
Remarks:
Returns a pointer to the class which contains the interface metadata.

Implements FPInterface.

{ return NULL; }
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.
virtual const MCHAR* GetEntryCategory ( ) const [pure virtual]

The category the entry belongs to.

This is the group, plus possible subgroups, containing the entry in the Material Browser. If the entry is nested into subgroups, the hierarchy should be formatted like a filepath. For example "A\\B\\C" indicates an outermost category of "A" and an innermost category of "C". No backslash should be present before the outer category, "A".

Returns:
The category string of the entry.
virtual bool IsStockObject ( ) const [inline, virtual]

This method is for internal use only. Plug-ins should return false.

{ return false; }
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.
virtual bool HasEntryThumbnail ( ) const [inline, virtual]

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
{ return false; }

IMaterialBrowserEntryInfo IMaterialBrowserEntryInfo IMaterialBrowserEntryInfo IMaterialBrowserEntryInfo IMaterialBrowserEntryInfo IMaterialBrowserEntryInfo IMaterialBrowserEntryInfo IMaterialBrowserEntryInfo IMaterialBrowserEntryInfo IMaterialBrowserEntryInfo
IMaterialBrowserEntryInfo IMaterialBrowserEntryInfo IMaterialBrowserEntryInfo IMaterialBrowserEntryInfo IMaterialBrowserEntryInfo IMaterialBrowserEntryInfo IMaterialBrowserEntryInfo IMaterialBrowserEntryInfo IMaterialBrowserEntryInfo IMaterialBrowserEntryInfo