3ds Max C++ API Reference
IViewportShaderManager3 Class Referenceabstract

A new interface for 3dsmax 10. More...

#include <IViewportManager.h>

+ Inheritance diagram for IViewportShaderManager3:

Public Member Functions

virtual bool IsCurrentEffectEnabled ()=0
 GetActiveEffect and GetActiveEffectName returns information of currently selected effect, however, the effect may still not be "enabled". More...
 
virtual bool SetCurrentEffectEnabled (bool enabled)=0
 Access to set the enable/disable state of the current selected effect. More...
 
virtual bool IsDxStdMtlSupported ()=0
 Is the DX Display of the Material is supported at this moment. More...
 
virtual bool IsSaveFxSupported ()=0
 Is saving Standard Material as .fx file is supported at this moment. More...
 
virtual bool IsCurrentEffectSupported ()=0
 Is current selected effect is supported. More...
 
virtual MtlBaseFindOwnerMaterial ()=0
 
- Public Member Functions inherited from IViewportShaderManager2
virtual bool SaveFXFile (const MCHAR *fileName)=0
 Save the current effect based on the Standard Material as an effect file. More...
 
virtual bool IsDxStdMtlEnabled ()=0
 Is the DX Display of the Standard Material enabled. More...
 
virtual void SetDxStdMtlEnabled (bool state)=0
 Access to set the state of the DX Display of the Standard Material flag. More...
 
virtual const MCHARGetActiveEffectName ()=0
 The name of the current effect as displayed in the UI. More...
 
- Public Member Functions inherited from IViewportShaderManager
FPInterfaceDescGetDesc ()
 
virtual int GetNumEffects ()=0
 Get the number of effects registered with the system. More...
 
virtual ReferenceTargetGetActiveEffect ()=0
 Get the current active effect. More...
 
virtual const MCHARGetEffectName (int i)=0
 Access the UI name for the effect. More...
 
virtual ReferenceTargetSetViewportEffect (int i)=0
 Set the actual viewport effect to be used. More...
 
virtual void ActivateEffect (MtlBase *mtl, BOOL State)=0
 Turns on the effect based on the material and state supplied. More...
 
- Public Member Functions inherited from FPMixinInterface
 FPMixinInterface ()
 
virtual LifetimeType LifetimeControl ()
 
virtual CoreExport bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
CoreExport ~FPMixinInterface ()
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 
virtual FPInterfaceDescGetDescByID (Interface_ID id)
 
virtual Interface_ID GetID ()
 
- 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 BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=nullptr)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Additional Inherited Members

- Public Types inherited from IViewportShaderManager
enum  {
  get_num_effects , get_active_effect , is_effect_active , is_manager_active ,
  get_effect_name , set_effect , activate_effect
}
 
- 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 FPMixinInterface
 FPMixinInterface (const FPMixinInterface &rhs)
 
FPMixinInterfaceoperator= (const FPMixinInterface &rhs)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 
- Protected Attributes inherited from FPMixinInterface
Tab< InterfaceNotifyCallback * > * interfaceNotifyCBs
 

Detailed Description

A new interface for 3dsmax 10.

Extends IViewportShaderManager2 This interface is implemented by 3ds Max, more specifically by the DirectX Manager and Mental Ray custom attributes of materials. Client code can get this interface from a material with the following code:

Material* pMaterial = // initialize material pointer
ICustAttribContainer* pCAContainer = pMaterial->GetCustAttribContainer();
IViewportShaderManager3* pViewportShaderMgr = static_cast<IViewportShaderManager3*>(pBaseIfc);
#define VIEWPORT_SHADER_MANAGER_INTERFACE3
Definition: IViewportManager.h:30
Definition: baseinterface.h:78
Definition: icustattribcontainer.h:26
virtual BaseInterface * FindCustAttribInterface(const Interface_ID &iid)=0
Finds the first custom attribute in a custom attribute container, that has a specific interface id.
A new interface for 3dsmax 10.
Definition: IViewportManager.h:123
The main material class definition.
Definition: mtl.h:209

Member Function Documentation

◆ IsCurrentEffectEnabled()

virtual bool IsCurrentEffectEnabled ( )
pure virtual

GetActiveEffect and GetActiveEffectName returns information of currently selected effect, however, the effect may still not be "enabled".

To get the enable/disable state of the effect, use this function.

Returns
The enable/disable state of the effect

◆ SetCurrentEffectEnabled()

virtual bool SetCurrentEffectEnabled ( bool  enabled)
pure virtual

Access to set the enable/disable state of the current selected effect.

Parameters
enabledThe state of the flag - TRUE to set
Returns
if current effect is enabled successfully, return true, otherwise return false.

◆ IsDxStdMtlSupported()

virtual bool IsDxStdMtlSupported ( )
pure virtual

Is the DX Display of the Material is supported at this moment.

Returns
true means that we could turn directX rendering of the material on. otherwise return false.

◆ IsSaveFxSupported()

virtual bool IsSaveFxSupported ( )
pure virtual

Is saving Standard Material as .fx file is supported at this moment.

Returns
true means that we could save current material as a .fx file. otherwise return false.

◆ IsCurrentEffectSupported()

virtual bool IsCurrentEffectSupported ( )
pure virtual

Is current selected effect is supported.

Returns
true means that we could enable current effect. otherwise if current effect can not be enabled, return false.

◆ FindOwnerMaterial()

virtual MtlBase* FindOwnerMaterial ( )
pure virtual
Returns
owner material of this interface