3ds Max C++ API Reference
Mtl Class Referenceabstract

#include <Mtl.h>

+ Inheritance diagram for Mtl:

Public Member Functions

CoreExport Mtl ()
 
SClass_ID SuperClassID ()
 Retrieves a constant representing the type of the plugin. More...
 
virtual void GetClassName (MSTR &s, bool localized=true) const override
 Retrieves the name of the plugin class. More...
 
CoreExport void RefDeleted ()
 Called after a references to this is deleted. More...
 
CoreExport void RefAdded (RefMakerHandle rm)
 Called after a reference is made to a target. More...
 
virtual BOOL SupportsShaders ()
 
virtual BOOL SupportsRenderElements ()
 Returns true if it supports render elements. More...
 
CoreExport void CopySubMtl (HWND hwnd, int ifrom, int ito)
 
CoreExport bool SvCanInitiateLink (IGraphObjectManager *gom, IGraphNode *gNode)
 
Get/SetActiveTexmap
CoreExport MtlBaseGetActiveTexmap ()
 
CoreExport void SetActiveTexmap (MtlBase *txm)
 
Get Properties Methods
virtual Color GetAmbient (int mtlNum=0, BOOL backFace=FALSE)=0
 
virtual Color GetDiffuse (int mtlNum=0, BOOL backFace=FALSE)=0
 
virtual Color GetSpecular (int mtlNum=0, BOOL backFace=FALSE)=0
 
virtual float GetShininess (int mtlNum=0, BOOL backFace=FALSE)=0
 
virtual float GetShinStr (int mtlNum=0, BOOL backFace=FALSE)=0
 
virtual float GetXParency (int mtlNum=0, BOOL backFace=FALSE)=0
 
virtual BOOL GetSelfIllumColorOn (int mtlNum=0, BOOL backFace=FALSE)
 
virtual float GetSelfIllum (int mtlNum=0, BOOL backFace=FALSE)
 
virtual Color GetSelfIllumColor (int mtlNum=0, BOOL backFace=FALSE)
 
virtual SamplerGetPixelSampler (int mtlNum=0, BOOL backFace=FALSE)
 
virtual float WireSize (int mtlNum=0, BOOL backFace=FALSE)
 
virtual RenderDataGetRenderData ()
 
virtual bool IsOutputConst (ShadeContext &sc, int stdID)
 
Set Properties Methods
virtual void SetAmbient (Color c, TimeValue t)=0
 
virtual void SetDiffuse (Color c, TimeValue t)=0
 
virtual void SetSpecular (Color c, TimeValue t)=0
 
virtual void SetShininess (float v, TimeValue t)=0
 
virtual void SetRenderData (RenderData *rdata)
 
Shade
virtual void Shade (ShadeContext &sc)=0
 
Sub-material Access Methods
virtual int NumSubMtls ()
 
virtual MtlGetSubMtl (int i)
 
virtual void SetSubMtl (int i, Mtl *m)
 
virtual int VPDisplaySubMtl ()
 
Naming Methods
virtual MSTR GetSubMtlSlotName (int i) MAX_SEALED
 
virtual CoreExport MSTR GetSubMtlSlotName (int i, bool localized)
 
CoreExport MSTR GetSubMtlTVName (int i, bool localized=true)
 
Displacement Mapping
virtual float EvalDisplacement (ShadeContext &sc)
 
virtual Interval DisplacementValidity (TimeValue t)
 
Replace Material Dialog
virtual BOOL DontKeepOldMtl ()
 
Evaluation Methods
virtual bool EvalColorStdChannel (ShadeContext &sc, int stdID, Color &outClr)
 
virtual CoreExport bool EvalMonoStdChannel (ShadeContext &sc, int stdID, float &outVal)
 
CoreExport MtlResolveWrapperMaterials (bool forUseInViewport)
 Resolves any wrapper materials and returns the actual material that you should use. More...
 
- Public Member Functions inherited from MtlBase
CoreExport MtlBase ()
 
CoreExport ~MtlBase ()
 
virtual CoreExport Class_ID ClassID ()
 Retrieves a constant that uniquely identifies the plugin class. More...
 
int GetMeditObjType ()
 
void SetMeditObjType (int t)
 
int GetMeditTiling ()
 
void SetMeditTiling (int t)
 
CoreExport BOOL AnyMulti ()
 
BOOL TextureDisplayEnabled ()
 
CoreExport MtlBaseoperator= (const MtlBase &m)
 
CoreExport SvGraphNodeReference SvTraverseAnimGraph (IGraphObjectManager *gom, Animatable *owner, int id, DWORD flags)
 
CoreExport bool SvHandleDoubleClick (IGraphObjectManager *gom, IGraphNode *gNode)
 
CoreExport MSTR SvGetName (IGraphObjectManager *gom, IGraphNode *gNode, bool isBeingEdited)
 
CoreExport bool SvCanSetName (IGraphObjectManager *gom, IGraphNode *gNode)
 
CoreExport bool SvSetName (IGraphObjectManager *gom, IGraphNode *gNode, const MSTR &name)
 
CoreExport COLORREF SvHighlightColor (IGraphObjectManager *gom, IGraphNode *gNode)
 
CoreExport bool SvIsSelected (IGraphObjectManager *gom, IGraphNode *gNode)
 Returns true if the object is selected in its schematic view. More...
 
CoreExport MultiSelectCallbackSvGetMultiSelectCallback (IGraphObjectManager *gom, IGraphNode *gNode)
 
CoreExport bool SvCanSelect (IGraphObjectManager *gom, IGraphNode *gNode)
 
CoreExport MtlBaseGetActiveMB ()
 Get the active MtlBase. More...
 
CoreExport void SetActiveMB (MtlBase *activeMB)
 Set the active MtlBase. More...
 
virtual CoreExport voidGetInterface (ULONG id)
 Inherited from Animatable. More...
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 Inherited from Animatable. More...
 
virtual ReferenceTargetGetRefTarget ()
 
virtual CoreExport int SetProperty (ULONG id, void *data)
 
virtual CoreExport voidGetProperty (ULONG id)
 
virtual CoreExport void BaseClone (ReferenceTarget *from, ReferenceTarget *to, RemapDir &remap)
 This method copies base class data from an object to its clone. More...
 
virtual BOOL GetTransparencyHint (TimeValue t, Interval &valid)
 Transparency hint indicates whether the material is potentially transparent for both rendering and viewport display, so that the renderers or viewport can decide whether to optimize it or not. More...
 
MSTRGetName ()
 
CoreExport void SetName (MSTR s)
 
virtual MSTR GetFullName () MAX_SEALED
 
virtual CoreExport MSTR GetFullName (bool localized)
 
CoreExport void SetMtlFlag (int mask, BOOL val=TRUE)
 
CoreExport void ClearMtlFlag (int mask)
 
CoreExport int TestMtlFlag (int mask)
 
virtual int BuildMaps (TimeValue t, RenderMapsContext &rmc)
 
virtual CoreExport ULONG Requirements (int subMtlNum)
 
virtual ULONG LocalRequirements (int subMtlNum)
 
virtual CoreExport void MappingsRequired (int subMtlNum, BitArray &mapreq, BitArray &bumpreq)
 
virtual void LocalMappingsRequired (int subMtlNum, BitArray &mapreq, BitArray &bumpreq)
 
virtual BOOL IsMultiMtl ()
 
virtual int MapSlotType (int i)
 
CoreExport void DeactivateMapsInTree ()
 
virtual void Update (TimeValue t, Interval &valid)=0
 
void Update (TimeValue t)
 
virtual void Reset ()=0
 
virtual Interval Validity (TimeValue t)=0
 
virtual ParamDlgCreateParamDlg (HWND hwMtlEdit, IMtlParams *imp)=0
 
CoreExport IOResult Save (ISave *isave)
 
CoreExport IOResult Load (ILoad *iload)
 
ULONG GetGBufID ()
 
void SetGBufID (ULONG id)
 
CoreExport void EnumAuxFiles (AssetEnumCallback &nameEnum, DWORD flags)
 
virtual CoreExport PStampGetPStamp (int sz)
 
virtual CoreExport PStampCreatePStamp (int sz, BOOL Render=FALSE)
 
virtual CoreExport void DiscardPStamp (int sz)
 
virtual BOOL SupportTexDisplay ()
 
virtual DWORD_PTR GetActiveTexHandle (TimeValue t, TexHandleMaker &thmaker)
 
CoreExport void IncrActive ()
 
CoreExport void DecrActive ()
 
int Active ()
 
virtual void ActivateTexDisplay (BOOL onoff)
 
virtual BOOL SupportsMultiMapsInViewport ()
 
virtual void SetupGfxMultiMaps (TimeValue t, Material *mtl, MtlMakerCallback &cb)
 
- Public Member Functions inherited from ReferenceTarget
virtual BOOL IsRefTarget ()
 Checks if this is a ReferenceTarget. More...
 
CoreExport RefResult TestForLoop (const Interval &refInterval, RefMakerHandle hmaker)
 Tests for a cyclical reference. More...
 
CoreExport BOOL HasDependents ()
 Checks if a ReferenceTarget has references. More...
 
CoreExport BOOL HasRealDependents ()
 Checks if this has Real (Strong) Dependents. More...
 
void BeginDependencyTest ()
 Starts Dependency Test. More...
 
BOOL EndDependencyTest ()
 Ends Dependency Test. More...
 
virtual void RefAddedUndoRedo (RefMakerHandle rm)
 Called after a reference is made to a target because of undo or redo. More...
 
virtual void RefDeletedUndoRedo ()
 Called after a references to this is deleted because of undo or redo. More...
 
CoreExport RefResult DeleteAllRefsToMe ()
 Deletes all references to this ReferenceTarget. More...
 
CoreExport RefResult TransferReferences (RefTargetHandle oldTarget, BOOL delOld=FALSE)
 Transfers all the references from oldTarget to this. More...
 
CoreExport int DoEnumDependents (DependentEnumProc *dep)
 Begins an enumeration that searches back in the dependency network. More...
 
virtual CoreExport RefTargetHandle Clone (RemapDir &remap)
 This method is used by 3ds Max to clone an object. More...
 
virtual CoreExport RefResult NotifyDependents (const Interval &changeInt, PartID partID, RefMessage message, SClass_ID sclass=NOTIFY_ALL, BOOL propagate=TRUE, RefTargetHandle hTarg=NULL, NotifyDependentsOption notifyDependentsOption=REFNOTIFY_ALLOW_OPTIMIZATIONS)
 Notify all dependent RefMakers concerned with the message. More...
 
void FlagDependents (TimeValue t, PartID which=PART_PUT_IN_FG)
 This sends the REFMSG_FLAGDEPENDENTS message up the pipeline. More...
 
virtual void NotifyForeground (TimeValue t)
 This method is called to flag dependents into the FG. More...
 
virtual void NotifyTarget (int message, ReferenceMaker *hMaker)
 Sends messages to ReferenceTargets. More...
 
CoreExport ReferenceTarget ()
 Constructor. More...
 
virtual CoreExport RefResult AutoDelete ()
 Deletes the object when it has no more real dependents. More...
 
CoreExport RefResult MaybeAutoDelete ()
 Deletes the object when it has no more real dependents. More...
 
- Public Member Functions inherited from ReferenceMaker
CoreExport RefResult ReplaceReference (int which, RefTargetHandle newtarg, BOOL delOld=TRUE)
 Used when cloning reference makers. More...
 
CoreExport RefResult DeleteAllRefsFromMe ()
 Deletes all references from this ReferenceMaker. More...
 
CoreExport RefResult DeleteAllRefs ()
 Deletes all references both to and from this item. More...
 
CoreExport RefResult DeleteReference (int i)
 Deletes the specified reference. More...
 
virtual BOOL CanTransferReference (int i)
 Tells whether this reference can be transfered. More...
 
CoreExport ReferenceSaveManagerGetReferenceSaveManager ()
 Access the ReferenceSaveManager of this ReferenceMaker. More...
 
virtual int RemapRefOnLoad (int iref)
 Used to load old files with references. More...
 
virtual CoreExport void RescaleWorldUnits (float f)
 Rescale size of all world units in reference hierarchy. More...
 
virtual CoreExport void SaveEnum (SaveEnumProc &sep, BOOL isNodeCall=0)
 The default save enumeration. More...
 
virtual CoreExport bool SpecifySaveReferences (ReferenceSaveManager &referenceSaveManager)
 Used to specify reference slot remapping during scene file save. More...
 
CoreExport int DoEnumDependents (DependentEnumProc *dep)
 Begins an enumeration that searches back in the dependency network. More...
 
CoreExport bool EnumRefHierarchy (RefEnumProc &proc, bool includeCustAttribs=true, bool includeIndirectRefs=true, bool includeNonPersistentRefs=true, bool preventDuplicatesViaFlag=true)
 This method provides a general purpose reference enumerator. More...
 
CoreExport int FindRef (RefTargetHandle rtarg)
 Get the index of the ReferenceTarget. More...
 
virtual BOOL IsRefMaker ()
 Tells whether it is a ReferenceMaker. More...
 
virtual BOOL IsRealDependency (ReferenceTarget *rtarg)
 Returns whether this is a "real" (strong) dependency or not. More...
 
virtual BOOL ShouldPersistWeakRef (RefTargetHandle rtarg)
 Specifies whether a weak reference is to be persisted on a partial load or save. More...
 
CoreExport ReferenceMaker ()
 Constructor. More...
 
CoreExport void DeleteMe ()
 Deletes an instance of this class. More...
 
virtual CoreExport int NumRefs ()
 Returns the total number of references this ReferenceMaker can hold. More...
 
virtual CoreExport RefTargetHandle GetReference (int i)
 Returns the 'i-th' reference. More...
 
- Public Member Functions inherited from Animatable
virtual void FreeCaches ()
 
virtual int NumChildren ()
 
virtual AnimatableChildAnim (int i)
 
virtual CoreExport MSTR NodeName ()
 
virtual void EditTrack ()
 
virtual CoreExport BOOL SubAnimSetKeyBufferPresent (int subNum)
 returns true if the sub-anim has a "Set Key" buffer present More...
 
virtual BOOL SetKeyBufferPresent ()
 returns true if there is a "Set Key" buffer present More...
 
virtual CoreExport void SubAnimCommitSetKeyBuffer (TimeValue t, int subNum)
 Commit any "Set Key" buffers on the given sub-anim. More...
 
virtual void CommitSetKeyBuffer (TimeValue t)
 Commit any "Set Key" buffers. More...
 
virtual CoreExport void SubAnimRevertSetKeyBuffer (int subNum)
 Revert any "Set Key" buffers on the given sub-anim. More...
 
virtual void RevertSetKeyBuffer ()
 Revert any "Set Key" buffers. More...
 
virtual LRESULT CALLBACK TrackViewWinProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 This function is obsolete. More...
 
virtual bool IsParamBlockDesc2Used (ParamBlockDesc2 *desc)
 Returns true if the passed description is being used. More...
 
virtual bool GetMacroRecorderName (bool used_as_rhs_value, MSTR &objectSpecifiedName)
 This method is called to access the object specified name to use for the Maxscript macrorecorder. More...
 
CoreExport Animatable ()
 Constructor. More...
 
virtual CoreExport void DeleteThis ()
 Deletes an instance of this class. More...
 
virtual void GetClassName (MSTR &s) MAX_SEALED
 
MSTR ClassName (bool localized=true) const
 Returns the name of the plugin class. More...
 
virtual void BeginEditParams (IObjParam *ip, ULONG flags, Animatable *prev=NULL)
 
virtual void EndEditParams (IObjParam *ip, ULONG flags, Animatable *next=NULL)
 
virtual CoreExport void ReleaseInterface (ULONG id, void *i)
 
CoreExport void AppendProperty (AnimProperty *prop)
 A function to directly add arbitrary properties to this object developers should ensure that the properties ID does not conflict with any Max-specific IDs. More...
 
CoreExport AnimPropertyFindProperty (DWORD id)
 Find any property. More...
 
CoreExport void AddAppDataChunk (const Class_ID &cid, SClass_ID sid, DWORD sbid, DWORD len, void *data)
 Adds application/plugin specific (custom) data to an Animatable. More...
 
CoreExport AppDataChunkGetAppDataChunk (const Class_ID &cid, SClass_ID sid, DWORD sbid)
 Retrieves the application/plugin specific (custom) data stored with an Animatable. More...
 
CoreExport BOOL RemoveAppDataChunk (const Class_ID &cid, SClass_ID sid, DWORD sbid)
 Deletes the application/plugin specific (custom) data stored with an Animatable. More...
 
CoreExport void ClearAllAppData ()
 Deletes all application/plugin specific (custom) data stored with an Animatable. More...
 
virtual int NumSubs ()
 
virtual AnimatableSubAnim (int i)
 
virtual MSTR SubAnimName (int i) MAX_SEALED
 
virtual CoreExport MSTR SubAnimName (int i, bool localized)
 
virtual BOOL CanDeleteSubAnim (int i)
 
virtual void DeleteSubAnim (int i)
 
virtual DWORD GetSubAnimCurveColor (int subNum)
 
virtual int SubNumToRefNum (int subNum)
 
virtual BOOL CanCopyAnim ()
 
CoreExport int HasSubElements (int type=0)
 
virtual int GetSubFCurveExtents (int subNum, ParamDimensionBase *dim, float &min, float &max, DWORD flags)
 The values max and min should be initialized before calling this function. More...
 
virtual ParamDimensionGetParamDimension (int i)
 
virtual BOOL SelectSubAnim (int subNum)
 
virtual BOOL BypassTreeView ()
 
virtual BOOL BypassTrackBar ()
 
virtual BOOL BypassPropertyLevel ()
 
virtual BOOL InvisibleProperty ()
 
virtual int NumKeys ()
 
virtual TimeValue GetKeyTime (int index)
 
virtual int GetKeyIndex (TimeValue t)
 
virtual BOOL GetNextKeyTime (TimeValue t, DWORD flags, TimeValue &nt)
 
virtual void CopyKeysFromTime (TimeValue src, TimeValue dst, DWORD flags)
 
virtual void DeleteKeyAtTime (TimeValue t)
 
virtual BOOL IsKeyAtTime (TimeValue t, DWORD flags)
 
virtual int GetKeyTimes (Tab< TimeValue > &times, Interval range, DWORD flags)
 
virtual int GetKeySelState (BitArray &sel, Interval range, DWORD flags)
 
CoreExport void OpenTreeEntry (int type, DWORD tv)
 
CoreExport void CloseTreeEntry (int type, DWORD tv)
 
CoreExport int IsTreeEntryOpen (int type, DWORD tv)
 
CoreExport BOOL GetSelInTrackView (DWORD tv)
 
CoreExport void SetSelInTrackView (DWORD tv, BOOL sel)
 
CoreExport BOOL InTrackViewSelSet (int which)
 
CoreExport void SetTrackViewSelSet (int which, BOOL inOut)
 
virtual BOOL AssignController (Animatable *control, int subAnim)
 
virtual BOOL CanAssignController (int subAnim)
 Return true if we can reassign the subanim specified. More...
 
virtual BOOL CanMakeUnique ()
 
CoreExport int EnumAnimTree (AnimEnum *animEnum, Animatable *client, int subNum)
 
virtual int RenderBegin (TimeValue t, ULONG flags=0)
 
virtual int RenderEnd (TimeValue t)
 
virtual CoreExport Interval GetTimeRange (DWORD flags)
 
virtual void EditTimeRange (Interval range, DWORD flags)
 
virtual void DeleteTime (Interval iv, DWORD flags)
 
virtual void ReverseTime (Interval iv, DWORD flags)
 
virtual void ScaleTime (Interval iv, float s)
 
virtual void InsertTime (TimeValue ins, TimeValue amount)
 
virtual BOOL SupportTimeOperations ()
 
virtual CoreExport void MapKeys (TimeMap *map, DWORD flags)
 
virtual void DeleteKeys (DWORD flags)
 
virtual void DeleteKeyByIndex (int index)
 
virtual void SelectKeys (TrackHitTab &sel, DWORD flags)
 
virtual void SelectSubKeys (int subNum, TrackHitTab &sel, DWORD flags)
 
virtual void SelectSubCurve (int subNum, BOOL sel)
 
virtual void SelectKeyByIndex (int i, BOOL sel)
 
virtual BOOL IsKeySelected (int i)
 
virtual void FlagKey (TrackHitRecord hit)
 
virtual int GetFlagKeyIndex ()
 
virtual int NumSelKeys ()
 
virtual void CloneSelectedKeys (BOOL offset=FALSE)
 
virtual void AddNewKey (TimeValue t, DWORD flags)
 
virtual void MoveKeys (ParamDimensionBase *dim, float delta, DWORD flags)
 
virtual void ScaleKeyValues (ParamDimensionBase *dim, float origin, float scale, DWORD flags)
 
virtual void SelectCurve (BOOL sel)
 
virtual BOOL IsCurveSelected ()
 Returns TRUE if the function curve is selected; otherwise returns FALSE. More...
 
virtual BOOL IsSubCurveSelected (int subNum)
 Returns the selected state of the sub-curve whose index is passed. More...
 
virtual int GetSelKeyCoords (TimeValue &t, float &val, DWORD flags)
 
virtual void SetSelKeyCoords (TimeValue t, float val, DWORD flags)
 
virtual int SetSelKeyCoordsExpr (ParamDimension *dim, const MCHAR *timeExpr, const MCHAR *valExpr, DWORD flags)
 
virtual void AdjustTangents (TrackHitRecord hit, ParamDimensionBase *dim, Rect &rcGraph, float tzoom, int tscroll, float vzoom, int vscroll, int dx, int dy, DWORD flags)
 
virtual void AdjustTangents (TrackHitRecord hit, ParamDimensionBase *dim, float angle, float length, DWORD flags)
 
virtual CoreExport BOOL IsAnimated ()
 
virtual BOOL CanCopyTrack (Interval iv, DWORD flags)
 
virtual BOOL CanPasteTrack (TrackClipObject *cobj, Interval iv, DWORD flags)
 
virtual TrackClipObjectCopyTrack (Interval iv, DWORD flags)
 
virtual void PasteTrack (TrackClipObject *cobj, Interval iv, DWORD flags)
 
virtual BOOL CanCopySubTrack (int subNum, Interval iv, DWORD flags)
 
virtual BOOL CanPasteSubTrack (int subNum, TrackClipObject *cobj, Interval iv, DWORD flags)
 
virtual TrackClipObjectCopySubTrack (int subNum, Interval iv, DWORD flags)
 
virtual void PasteSubTrack (int subNum, TrackClipObject *cobj, Interval iv, DWORD flags)
 
virtual int GetTrackVSpace (int lineHeight)
 
virtual int HitTestTrack (TrackHitTab &hits, Rect &rcHit, Rect &rcTrack, float zoom, int scroll, DWORD flags)
 
virtual int PaintTrack (ParamDimensionBase *dim, HDC hdc, Rect &rcTrack, Rect &rcPaint, float zoom, int scroll, DWORD flags)
 
virtual int PaintSubTrack (int subNum, ParamDimensionBase *dim, HDC hdc, Rect &rcTrack, Rect &rcPaint, float zoom, int scroll, DWORD flags)
 
virtual int PaintFCurves (ParamDimensionBase *dim, HDC hdc, Rect &rcGraph, Rect &rcPaint, float tzoom, int tscroll, float vzoom, int vscroll, DWORD flags)
 
virtual int HitTestFCurves (ParamDimensionBase *dim, TrackHitTab &hits, Rect &rcHit, Rect &rcGraph, float tzoom, int tscroll, float vzoom, int vscroll, DWORD flags)
 
virtual int PaintSubFCurves (int subNum, ParamDimensionBase *dim, HDC hdc, Rect &rcGraph, Rect &rcPaint, float tzoom, int tscroll, float vzoom, int vscroll, DWORD flags)
 
virtual int HitTestSubFCurves (int subNum, ParamDimensionBase *dim, TrackHitTab &hits, Rect &rcHit, Rect &rcGraph, float tzoom, int tscroll, float vzoom, int vscroll, DWORD flags)
 
virtual void EditTrackParams (TimeValue t, ParamDimensionBase *dim, const MCHAR *pname, HWND hParent, IObjParam *ip, DWORD flags)
 
virtual int TrackParamsType ()
 
virtual int GetFCurveExtents (ParamDimensionBase *dim, float &min, float &max, DWORD flags)
 This method is called to calculate the largest and smallest values of the anim. More...
 
CoreExport void AddNoteTrack (NoteTrack *note)
 
CoreExport void DeleteNoteTrack (NoteTrack *note, BOOL delNote=TRUE)
 
CoreExport BOOL HasNoteTracks ()
 
CoreExport int NumNoteTracks ()
 
CoreExport NoteTrackGetNoteTrack (int i)
 
virtual void FreeAllBitmaps ()
 
virtual void GetSystemNodes (INodeTab &nodes, SysNodeContext Context)
 
virtual BOOL IsSubClassOf (Class_ID classID)
 returns true if the animatable has sub-classed off the given class More...
 
virtual CoreExport void MouseCycleCompleted (TimeValue t)
 
virtual CoreExport void MouseCycleStarted (TimeValue t)
 
virtual int NumParamBlocks ()
 
virtual IParamBlock2GetParamBlock (int i)
 
virtual IParamBlock2GetParamBlockByID (short id)
 
CoreExport bool SvSaveData (ISave *isave, USHORT id)
 
CoreExport bool SvLoadData (ILoad *iLoad)
 
CoreExport DWORD SvGetRefIndex ()
 
CoreExport void SvSetRefIndex (DWORD i)
 
CoreExport bool SvDeleteRefIndex ()
 
CoreExport SvGraphNodeReference SvStdTraverseAnimGraph (IGraphObjectManager *gom, Animatable *owner, int id, DWORD flags)
 
virtual CoreExport bool SvCanConcludeLink (IGraphObjectManager *gom, IGraphNode *gNode, IGraphNode *gNodeChild)
 
virtual CoreExport bool SvCanRemoveThis (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvRemoveThis (IGraphObjectManager *gom, IGraphNode *gNode)
 Called when the user deletes this object in the schematic view... More...
 
virtual CoreExport bool SvIsHighlighted (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport COLORREF SvGetSwatchColor (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvIsInactive (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvLinkChild (IGraphObjectManager *gom, IGraphNode *gNodeThis, IGraphNode *gNodeChild)
 
virtual CoreExport bool SvEditProperties (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport MSTR SvGetTip (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport MSTR SvGetRefTip (IGraphObjectManager *gom, IGraphNode *gNode, IGraphNode *gNodeMaker)
 
virtual CoreExport bool SvCanDetach (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvDetach (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport MSTR SvGetRelTip (IGraphObjectManager *gom, IGraphNode *gNodeTarget, int id, IGraphNode *gNodeMaker)
 Returns a string to be displayed in the tip window in the schematic view for a relationship from "gNodeMaker" to "gNodeTarget"... More...
 
virtual CoreExport bool SvCanDetachRel (IGraphObjectManager *gom, IGraphNode *gNodeTarget, int id, IGraphNode *gNodeMaker)
 Returns true if this object can respond to the SvDetachRel(...) method... More...
 
virtual CoreExport bool SvDetachRel (IGraphObjectManager *gom, IGraphNode *gNodeTarget, int id, IGraphNode *gNodeMaker)
 Detach this relationship. More...
 
virtual CoreExport bool SvHandleRelDoubleClick (IGraphObjectManager *gom, IGraphNode *gNodeTarget, int id, IGraphNode *gNodeMaker)
 Called when this relationship is double-clicked in the schematic view... More...
 
CoreExport ICustAttribContainerGetCustAttribContainer ()
 This method returns a pointer to the custom attributes container interface class. More...
 
CoreExport void AllocCustAttribContainer ()
 This method allocates space for a custom attributes container. More...
 
CoreExport void DeleteCustAttribContainer ()
 This method deletes space used by a custom attributes container. More...
 
void SetAFlag (DWORD mask)
 
void ClearAFlag (DWORD mask)
 Clears one or more bits in the Animatable flags. More...
 
bool TestAFlag (DWORD mask) const
 Tests one or more bits in the Animatable flags. More...
 
void SetAFlagEx (DWORD mask)
 Sets one or more bits in the Animatable extended flags. More...
 
void ClearAFlagEx (DWORD mask)
 Clears one or more bits in the Animatable extended flags. More...
 
bool TestAFlagEx (DWORD mask) const
 Tests one or more bits in the Animatable extended flags. More...
 
CoreExport bool TestFlagBit (int index)
 Tests the specified flag bit. More...
 
CoreExport void SetFlagBit (int index, bool newValue=true)
 Sets the specified flag bit. More...
 
CoreExport void ClearFlagBit (int index)
 Clears the specified flag bit. More...
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 
- Public Member Functions inherited from ISubMap
virtual ~ISubMap ()
 
virtual int NumSubTexmaps ()
 
virtual TexmapGetSubTexmap (int i)
 
virtual void SetSubTexmap (int i, Texmap *m)
 
virtual int SubTexmapOn (int i)
 
virtual MSTR GetSubTexmapSlotName (int i) MAX_SEALED
 
virtual CoreExport MSTR GetSubTexmapSlotName (int i, bool localized)
 
CoreExport MSTR GetSubTexmapTVName (int i, bool localized=true)
 
virtual BOOL SetDlgThing (ParamDlg *dlg)
 
CoreExport void CopySubTexmap (HWND hwnd, int ifrom, int ito)
 

Additional Inherited Members

- Static Public Member Functions inherited from Animatable
static CoreExport BOOL IsDeleted (Animatable *anim)
 Debug method to determine whether an object has been deleted. More...
 
static CoreExport AnimHandle GetHandleByAnim (Animatable *anim)
 Get the unique handle for an Animatable object. More...
 
static CoreExport AnimatableGetAnimByHandle (AnimHandle handle)
 Get an Animatable object from its unique handle. More...
 
static CoreExport AnimHandle GetNextHandle ()
 Get the unique handle for the next Animatable object to be created. More...
 
static CoreExport void EnumerateAllAnimatables (EnumAnimList &enumProcObject)
 Enumerator to enumerate across all animatables. More...
 
static CoreExport bool RegisterAppDataLoadCallback (const Class_ID &cid, SClass_ID sid, APPDATALOADPROC proc)
 Registers a callback proc that is called when an AppDataChunk is read from a scene file. More...
 
static CoreExport bool UnRegisterAppDataLoadCallback (const Class_ID &cid, SClass_ID sid, APPDATALOADPROC proc)
 Unregisters a callback proc that is called when an AppDataChunk is read from a scene file. More...
 
static CoreExport bool RegisterAppDataLoadCallback (DWORD sbid, APPDATALOADPROC proc)
 Registers a callback proc that is called when an AppDataChunk is read from a scene file. More...
 
static CoreExport bool UnRegisterAppDataLoadCallback (DWORD sbid, APPDATALOADPROC proc)
 Unregisters a callback proc that is called when an AppDataChunk is read from a scene file. More...
 
static CoreExport int RequestFlagBit ()
 Requests an unique flag bit index. More...
 
static CoreExport void ReleaseFlagBit (int index)
 Releases the flag bit index. More...
 
static CoreExport void ClearFlagBitInAllAnimatables (int index)
 Clears the specified flag bit in all Animatables. More...
 
- 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...
 
- Public Attributes inherited from MtlBase
Quat meditRotate
 
ULONG gbufID
 
- Static Public Attributes inherited from Animatable
static const AnimHandle kInvalidAnimHandle = 0
 
- Protected Member Functions inherited from ReferenceTarget
virtual CoreExport int DoEnumDependentsImpl (DependentEnumProc *dep)
 Method to perform an enumeration on a ReferenceTarget. More...
 
virtual CoreExport ~ReferenceTarget ()=0
 Destructor. More...
 
- Protected Member Functions inherited from ReferenceMaker
virtual RefResult NotifyRefChanged (const Interval &changeInt, RefTargetHandle hTarget, PartID &partID, RefMessage message, BOOL propagate)=0
 Receives and responds to messages. More...
 
virtual CoreExport ~ReferenceMaker ()=0
 Destructor. More...
 
virtual CoreExport void SetReference (int i, RefTargetHandle rtarg)
 Stores a ReferenceTarget as its 'i-th' reference`. More...
 
void BlockEval ()
 Validates a given reference link between this reference maker and its reference target. More...
 
void UnblockEval ()
 Validates a given reference link between this reference maker and its reference target. More...
 
int Evaluating ()
 Validates a given reference link between this reference maker and its reference target. More...
 
CoreExport RefResult StdNotifyRefChanged (const Interval &changeInt, RefTargetHandle hTarget, PartID partID, RefMessage message, BOOL propagate, NotifyDependentsOption notifyDependentsOption)
 Validates a given reference link between this reference maker and its reference target. More...
 
- Protected Member Functions inherited from Animatable
virtual CoreExport ~Animatable ()=0
 Destructor. More...
 
- Protected Member Functions inherited from Noncopyable
 Noncopyable ()
 
 ~Noncopyable ()
 
- Protected Attributes inherited from Animatable
DWORD aflag
 
AnimPropertyList aprops
 

Detailed Description

See also
Class MtlBase, Class Texmap, Class ShadeContext, Class ShadeOutput, Class Interval, Class Color.

Description:
This is the base class for the creation of material plug-ins. This class provides methods to do things such as compute the properties of the material for a given location, return the number of sub-materials and access the properties of the material for the interactive renderer.
Plug-In Information:
Class Defined In IMTL.H

Super Class ID MATERIAL_CLASS_ID

Standard File Name Extension DLT

Extra Include File Needed IMTL.H

Constructor & Destructor Documentation

◆ Mtl()

Remarks
Constructor. The active texture map is set to NULL.

Member Function Documentation

◆ SuperClassID()

SClass_ID SuperClassID ( )
inlinevirtual

Retrieves a constant representing the type of the plugin.

Returns
A super class id that uniquely identifies the type (category) of the plugin. Note that several plugin classes can be of the same type, thus return the same super class id. Plugins are uniquely identified by their class ids.
See also
SClass_ID

Reimplemented from ReferenceTarget.

42 { return MATERIAL_CLASS_ID; }
#define MATERIAL_CLASS_ID
Materials super-class ID.
Definition: plugapi.h:429

◆ GetClassName()

virtual void GetClassName ( MSTR s,
bool  localized = true 
) const
inlineoverridevirtual

Retrieves the name of the plugin class.

This name is used in 3ds Max's UI and in MAXScript. For Material plug-ins this method is used to put up the material "type" name in the Material Editor.

Parameters
sReference to a string filled in with the name of the plugin class.
localizedIf true, then the class name returned should be localized in the language 3ds Max is currently using. Otherwise it should be the class name in English. If a plugin does not provide localized string resources, it can disregard this parameter and always return the class name in English.

Reimplemented from ReferenceTarget.

Reimplemented in MSMtlXtnd, and MSPluginMtl.

43 { UNUSED_PARAM(localized); s = MSTR(_M("Mtl")); }
#define UNUSED_PARAM(x)
Definition: BuildWarnings.h:18
#define _M(x)
Used to wrap string literals.
Definition: strbasic.h:67
WStr MSTR
Definition: strclass.h:1058

◆ GetActiveTexmap()

CoreExport MtlBase* GetActiveTexmap ( )
Remarks
Implemented by the System. Returns a pointer to the active texture map used in the interactive renderer. Returns NULL if there isn't any.

◆ SetActiveTexmap()

CoreExport void SetActiveTexmap ( MtlBase txm)
Remarks
Implemented by the System. Stores the pointer to the active texture map used in the interactive renderer. Note that this method does not do everything required to update the viewports with the new Texmap. To accomplish that call Interface::ActivateTexture().

◆ RefDeleted()

CoreExport void RefDeleted ( )
virtual

Called after a references to this is deleted.

This is called after deleting a reference to a reference target, in the case that the target was not deleted. When the last strong reference to a ReferenceTarget is removed, the ReferenceTarget is deleted, the destructor is called, and the memory cleared.

Reimplemented from ReferenceTarget.

Reimplemented in MSPluginMtl.

◆ RefAdded()

CoreExport void RefAdded ( RefMakerHandle  rm)
virtual

Called after a reference is made to a target.

This is called after a reference is made to this. If the target (this) needs to know that a reference to made to it, the target (this) can override this function.

Parameters
rm- The ReferenceMaker creating the reference.

Reimplemented from ReferenceTarget.

Reimplemented in MSPluginMtl.

◆ GetAmbient()

virtual Color GetAmbient ( int  mtlNum = 0,
BOOL  backFace = FALSE 
)
pure virtual
Remarks
Returns the ambient color of the specified material for use in the interactive renderer.
Parameters
mtlNumThis is the material index for mult-materials.
backFaceIf the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE.

Implemented in MSMtlXtnd, and MSPluginMtl.

◆ GetDiffuse()

virtual Color GetDiffuse ( int  mtlNum = 0,
BOOL  backFace = FALSE 
)
pure virtual
Remarks
Returns the diffuse color of the specified material for use in the interactive renderer.
Parameters
mtlNumThis is the material index for mult-materials.
backFaceIf the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE.

Implemented in MSMtlXtnd, and MSPluginMtl.

◆ GetSpecular()

virtual Color GetSpecular ( int  mtlNum = 0,
BOOL  backFace = FALSE 
)
pure virtual
Remarks
Returns the specular color of the specified material for use in the interactive renderer.
Parameters
mtlNumThis is the material index for mult-materials.
backFaceIf the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE.

Implemented in MSMtlXtnd, and MSPluginMtl.

◆ GetShininess()

virtual float GetShininess ( int  mtlNum = 0,
BOOL  backFace = FALSE 
)
pure virtual
Remarks
Returns the shininess value of the specified material for use in the interactive renderer.
Parameters
mtlNumThis is the material index for mult-materials.
backFaceIf the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE.

Implemented in MSMtlXtnd, and MSPluginMtl.

◆ GetShinStr()

virtual float GetShinStr ( int  mtlNum = 0,
BOOL  backFace = FALSE 
)
pure virtual
Remarks
Returns the shininess strength value of the specified material for use in the interactive renderer.
Parameters
mtlNumThis is the material index for mult-materials.
backFaceIf the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE.

Implemented in MSMtlXtnd, and MSPluginMtl.

◆ GetXParency()

virtual float GetXParency ( int  mtlNum = 0,
BOOL  backFace = FALSE 
)
pure virtual
Remarks
Returns the transparency value of the specified material for use in the interactive renderer.
Parameters
mtlNumThis is the material index for mult-materials.
backFaceIf the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE.

Implemented in MSMtlXtnd, and MSPluginMtl.

◆ GetSelfIllumColorOn()

virtual BOOL GetSelfIllumColorOn ( int  mtlNum = 0,
BOOL  backFace = FALSE 
)
inlinevirtual
Remarks
Returns TRUE if the Self Illumination Color is on (checked) for the specified material; otherwise FALSE.
Parameters
mtlNumThis is the material index for mult-materials.
backFaceIf the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE.
Default Implementation:
{ return TRUE; }

Reimplemented in StdMat2, MSMtlXtnd, and MSPluginMtl.

112 { return TRUE; }

◆ GetSelfIllum()

virtual float GetSelfIllum ( int  mtlNum = 0,
BOOL  backFace = FALSE 
)
inlinevirtual
Remarks
Returns the self illumination value of the specified material for use in the interactive renderer.
Parameters
mtlNumThis is the material index for mult-materials.
backFaceIf the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE.
Default Implementation:
{ return 0.0f; }

Reimplemented in MSMtlXtnd, and MSPluginMtl.

120 { return 0.0f; }

◆ GetSelfIllumColor()

virtual Color GetSelfIllumColor ( int  mtlNum = 0,
BOOL  backFace = FALSE 
)
inlinevirtual
Remarks
Returns the Self Illumination Color of the specified material for use in the interactive renderer.
Parameters
mtlNumThis is the material index for mult-materials.
backFaceIf the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE.
Default Implementation:
{ Color c( .0f,.0f,.0f); return c; }

Reimplemented in MSMtlXtnd, MSPluginMtl, and StdMat2.

128 { Color c( .0f,.0f,.0f); return c; }
Definition: color.h:73

◆ GetPixelSampler()

virtual Sampler* GetPixelSampler ( int  mtlNum = 0,
BOOL  backFace = FALSE 
)
inlinevirtual
Remarks
Returns a pointer to the Sampler used for the specified sub-material.
Parameters
mtlNumThis is the material index for mult-materials.
backFaceIf the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE.
Default Implementation:
{ return NULL; }

Reimplemented in MSMtlXtnd, and StdMat2.

137 { return NULL; }
#define NULL
Definition: autoptr.h:18

◆ WireSize()

virtual float WireSize ( int  mtlNum = 0,
BOOL  backFace = FALSE 
)
inlinevirtual
Remarks
Returns the wire size of the material.
Parameters
mtlNumThis is the material index for mult-materials.
backFaceIf the surface normal of the face is pointing away from the viewer this will be TRUE; otherwise FALSE.
Default Implementation:
{ return 1.0f; }

Reimplemented in MSMtlXtnd, and MSPluginMtl.

146 { return 1.0f; }

◆ SetAmbient()

virtual void SetAmbient ( Color  c,
TimeValue  t 
)
pure virtual
Remarks
This method saves the specified color at the specified time.
Parameters
cThe color to store.
tThe time to set this color.

Implemented in StdMat, MSMtlXtnd, and MSPluginMtl.

◆ SetDiffuse()

virtual void SetDiffuse ( Color  c,
TimeValue  t 
)
pure virtual
Remarks
This method saves the specified color at the specified time.
Parameters
cThe color to store.
tThe time to set this color.

Implemented in StdMat, MSMtlXtnd, and MSPluginMtl.

◆ SetSpecular()

virtual void SetSpecular ( Color  c,
TimeValue  t 
)
pure virtual
Remarks
This method saves the specified color at the specified time.
Parameters
cThe color to store.
tThe time to set this color.

Implemented in StdMat, MSMtlXtnd, and MSPluginMtl.

◆ SetShininess()

virtual void SetShininess ( float  v,
TimeValue  t 
)
pure virtual
Remarks
This method saves the specified shininess at the specified time.
Parameters
vThe shininess value to store.
tThe time to set this color.

Implemented in StdMat, MSMtlXtnd, and MSPluginMtl.

◆ SupportsShaders()

virtual BOOL SupportsShaders ( )
inlinevirtual
Remarks
This method returns TRUE if the material supports shaders, otherwise FALSE.
Default Implementation:
{ return FALSE; }

Reimplemented in StdMat2, and MSMtlXtnd.

175 { return FALSE; } // moved from class StdMat

◆ SupportsRenderElements()

virtual BOOL SupportsRenderElements ( )
inlinevirtual

Returns true if it supports render elements.

Reimplemented in MSMtlXtnd.

178 { return FALSE; }

◆ Shade()

virtual void Shade ( ShadeContext sc)
pure virtual
Remarks
This is the main method of the material. This is called by the renderer to compute the color and transparency output returned in sc.out.
Parameters
scDescribes properties of the pixel to be shaded. The result of this method is returned in the ShadeOutput data member of sc.

Implemented in MSMtlXtnd, and MSPluginMtl.

◆ NumSubMtls()

virtual int NumSubMtls ( )
inlinevirtual
Remarks
Returns the number of sub-materials managed by this material.
Default Implementation:
{ return 0; }

Reimplemented in MSMtlXtnd, and MSPluginMtl.

195 { return 0; }

◆ GetSubMtl()

virtual Mtl* GetSubMtl ( int  i)
inlinevirtual
Remarks
Returns a pointer to the 'i-th' sub-material of this material.
Parameters
iThe index of the material to return.
Default Implementation:
{ return NULL; }

Reimplemented in MSMtlXtnd, and MSPluginMtl.

200 { return NULL; }

◆ SetSubMtl()

virtual void SetSubMtl ( int  i,
Mtl m 
)
inlinevirtual
Remarks
Stores the 'i-th' sub-material of this material.
Parameters
iThe index of the material to store.
mThe material pointer to store.
Default Implementation:
{}

Reimplemented in MSMtlXtnd, and MSPluginMtl.

206 { }

◆ VPDisplaySubMtl()

virtual int VPDisplaySubMtl ( )
inlinevirtual
Remarks
This method returns which sub-mtl is to display in the viewport, a return value of:-1 indicates not implemented.

Note that when a material, such as Blend, has a method of selecting which sub-map is to be shown in the viewport, and implements this method, the materials editor lets you turn on Show Map In Viewport (SMIV) in all the sub maps at once. When the material, such as top-bottom, doesn't have a selector, and doesn't implement this method, then the materials editor will only let you turn on SMIV for one map/mtl in the entire sub-tree of the material.
Default Implementation:
{ return -1; }
218 { return -1; } // which sub-mtl to display in the viewport: -1 indicates not implemented.

◆ GetSubMtlSlotName() [1/2]

virtual MSTR GetSubMtlSlotName ( int  i)
inlinevirtual
Note
This method has been deprecated in terms of implementation as of 3ds Max 2022. Plugin developers should implement GetSubMtlSlotName(int i, bool localized) instead. This method can no longer be overriden and calls to it are now forwarded to the function that replaced it with a "bool localized" value of true. This is done so that plugin developers who do not localize their plugins don't have to update all the places where they call this method. Plugin developers who do localize their plugins should analyze the places where they call this method to decide what value to pass it for the "bool localized" parameter.
See also
Mtl::GetSubMtlSlotName(int i, bool localized)
231  {
232  return GetSubMtlSlotName(i, true);
233  }
virtual MSTR GetSubMtlSlotName(int i) MAX_SEALED
Definition: Mtl.h:230

◆ GetSubMtlSlotName() [2/2]

virtual CoreExport MSTR GetSubMtlSlotName ( int  i,
bool  localized 
)
virtual
Remarks
This method returns the slot name of the 'i-th' sub-material. This name appears in the materials editor dialog. For instance, if you are in a material and then you go down into a sub-material, this is the name that appears just below the 'Get Material' icon. For example, in the Multi/Sub-Object material when you choose one of the sub-materials, the map name appears to let you know which slot you are working on. For the Multi/Sub-Object material, this is the number of the slot, i.e."#1:", "#2:", "#3:", etc.
Parameters
iThe index of the sub-materials whose slot name should be returned.
localizedIf true, then the slot name returned should be localized in the language 3ds Max is currently using. Otherwise it should be the slot name in English. If a plugin does not provide localized string resources, it can disregard this parameter and always return the slot name in English.

Reimplemented in MSMtlXtnd, and MSPluginMtl.

◆ GetSubMtlTVName()

CoreExport MSTR GetSubMtlTVName ( int  i,
bool  localized = true 
)
Remarks
Returns the name of the 'i-th' sub-material that should appear in track view.
Parameters
iThe index of the sub-material whose track view name should be returned.
localizedIf true, then the sub-material TV name returned should be localized in the language 3ds Max is currently using. Otherwise it should be the sub-material TV name in English. If a plugin does not provide localized string resources, it can disregard this parameter and always return the sub-material TV name in English.

◆ CopySubMtl()

CoreExport void CopySubMtl ( HWND  hwnd,
int  ifrom,
int  ito 
)

◆ EvalDisplacement()

virtual float EvalDisplacement ( ShadeContext sc)
inlinevirtual
Remarks
Returns the amount of displacement along the normal of the surface at the point as specified by the ShadeContext.
Parameters
scThis contains the details of the point being displaced.
Default Implementation:
{ return 0.0f; }

Reimplemented in MSMtlXtnd, and MSPluginMtl.

266 { return 0.0f; }

◆ DisplacementValidity()

virtual Interval DisplacementValidity ( TimeValue  t)
inlinevirtual
Remarks
Returns the validity interval of the displacement mapping around the specified time.
Parameters
tThe Interval returned reflects the validity around this time.
Default Implementation:
{ return FOREVER; }

Reimplemented in MSMtlXtnd, and MSPluginMtl.

272 { return FOREVER; }
#define FOREVER
Definition: interval.h:168

◆ SvCanInitiateLink()

CoreExport bool SvCanInitiateLink ( IGraphObjectManager gom,
IGraphNode gNode 
)
virtual
Remarks
Returns true if this animatable can be the initiator of a link operation in the schematic view.
Parameters
gomPoints to the schematic view window manager.
gNodePoints to this node in the schematic view.

Reimplemented from Animatable.

◆ DontKeepOldMtl()

virtual BOOL DontKeepOldMtl ( )
inlinevirtual
Remarks
Return TRUE to prevent the Replace Material (Discard old material? / Keep old material as sub-material?) dialog from being presented to the user; FALSE to allow it to be presented. This allows a plug-in to control the display of this dialog when being created in a Material Editor slot.
Default Implementation:
{ return FALSE; }

Reimplemented in MSMtlXtnd.

290 { return FALSE; }

◆ SetRenderData()

virtual void SetRenderData ( RenderData rdata)
inlinevirtual
Remarks
This method allows the renderer to attach auxiliary data to each material.
Parameters
rdataThe auxiliary data you wish to attach.
Default Implementation:
{ renderData = rdata; }
301 { renderData = rdata; }

◆ GetRenderData()

virtual RenderData* GetRenderData ( )
inlinevirtual
Remarks
This method returns the auxiliary data attached to the material by the renderer.
Default Implementation:
{ return renderData; }
310 { return renderData; }

◆ IsOutputConst()

virtual bool IsOutputConst ( ShadeContext sc,
int  stdID 
)
inlinevirtual
Remarks
This method returns TRUE if the evaluated color/value (output) is constant over all possible inputs described by the shade context. If it cannot determine the correct answer, it returns FALSE.
Parameters
scThis describes the context of the question.
stdIDThe ID of the channel in question. See Texture Map Indices.
Default Implementation:
{ return FALSE; }

Reimplemented in MSMtlXtnd, and MSPluginMtl.

324 { return false; }

◆ EvalColorStdChannel()

virtual bool EvalColorStdChannel ( ShadeContext sc,
int  stdID,
Color outClr 
)
inlinevirtual
Remarks
This method evaluates the material on a single standard texmap channel over an area described in the ShadeContext. A return value of FALSE indicates that the color could not be evaluated.

If there's no texmap defined for a channel or the output of the texmap is not "meaningful", the raw color stored by the material or shader is returned. (The output of a texmap is meaningful in a given ShadeContext if it is the same as when the scene is rendered. If the map cannot determine whether the output value is the same as when rendered, it should not be meaningful.)

Note that the output color is not clamped. If the method is called with a monochrome channel ID, the result value is copied in the R, G and B components of the Color structure.

As a default implementation, this method sets the output color to black and
Returns
FALSE.
Parameters
scThis describes the context in which the material should be evaluated.
stdIDThe ID of the channel to perform evaluation on. See Texture Map Indices.
outClrThe result of the evaluation.
Default Implementation:
{ return FALSE; } *‍/

Reimplemented in MSMtlXtnd, and MSPluginMtl.

350 { return false; }

◆ EvalMonoStdChannel()

virtual CoreExport bool EvalMonoStdChannel ( ShadeContext sc,
int  stdID,
float &  outVal 
)
virtual
Parameters
scThis describes the context in which the material should be evaluated.
stdIDThe ID of the channel to perform evaluation on.
outValThe result of the evaluation.

Reimplemented in MSMtlXtnd, and MSPluginMtl.

◆ ResolveWrapperMaterials()

CoreExport Mtl* ResolveWrapperMaterials ( bool  forUseInViewport)

Resolves any wrapper materials and returns the actual material that you should use.

This method is used to get rid of "wrapper" materials, like the XRef material and the bake shell material, that usually have no effect on the output of the material. This method can be used by renderer or exporter plugins to get to the actual material that should be used for rendering or exporting.

Parameters
forUseInViewport- Set to true to get a material to be used in the viewport, false for any other uses. This affects, for example, which sub-material of the bake shell material will be used.