3ds Max C++ API Reference
Renderer Class Referenceabstract

This is the base class for any renderer plugin. More...

#include <Renderer.h>

+ Inheritance diagram for Renderer:

Public Member Functions

SClass_ID SuperClassID ()
 Returns the super class ID RENDERER_CLASS_ID. More...
 
virtual int Open (INode *scene, INode *vnode, ViewParams *viewPar, RendParams &rp, HWND hwnd, DefaultLight *defaultLights=NULL, int numDefLights=0, RendProgressCallback *prog=NULL)=0
 Called once and only once per render operation; used to initialize the renderer before rendering a sequence of frames. More...
 
virtual int Render (TimeValue t, Bitmap *tobm, FrameRendParams &frp, HWND hwnd, RendProgressCallback *prog=NULL, ViewParams *viewPar=NULL)=0
 Called to render a single frame. More...
 
virtual void Close (HWND hwnd, RendProgressCallback *prog=NULL)=0
 Called once and only once per render operation; used to free any resources allocated by Open() or Render(). More...
 
virtual bool ApplyRenderEffects (TimeValue t, Bitmap *pBitmap, bool updateDisplay=true)
 This method is called to apply the render effects at the specified time value. More...
 
virtual RendParamDlgCreateParamDialog (IRendParams *ir, BOOL prog=FALSE)=0
 This method is called to create and return a pointer to an instance of the RendParamDlg class. More...
 
virtual void ResetParams ()=0
 This method simply sets all the parameters to their default values. More...
 
virtual int GetAAFilterSupport ()
 
virtual bool SupportsTexureBaking ()
 Renderers which support texture baking should override this method to return true. More...
 
virtual bool SupportsCustomRenderPresets ()
 A renderer should override this method to return true if it supports any custom preset categories beyond the standard categories. More...
 
virtual int RenderPresetsFileVersion ()
 Return a number indicating the current version of the renderer's custom preset. More...
 
virtual BOOL RenderPresetsIsCompatible (int version)
 Return true if the renderer can load presets of the indicated version. More...
 
virtual const MCHARRenderPresetsMapIndexToCategory (int catIndex)
 Returns the UI name of a supported custom category. More...
 
virtual int RenderPresetsMapCategoryToIndex (const MCHAR *category)
 Returns the index of a supported custom category. More...
 
virtual int RenderPresetsPreSave (ITargetedIO *root, BitArray saveCategories)
 called before a render preset is saved. More...
 
virtual int RenderPresetsPostSave (ITargetedIO *, BitArray)
 called after a preset is saved. More...
 
virtual int RenderPresetsPreLoad (ITargetedIO *root, BitArray saveCategories)
 called before a preset is loaded. More...
 
virtual int RenderPresetsPostLoad (ITargetedIO *root, BitArray loadCategories)
 called after a preset is loaded. More...
 
Renderer Element Support

Returns whether this renderer plugin is compatible with any render elements whatsoever.

This affects whether the render elements tab is displayed at all.

virtual bool CompatibleWithAnyRenderElement () const =0
 Returns whether this renderer plugin is compatible with the given render element. More...
 
virtual bool CompatibleWithRenderElement (IRenderElement &pIRenderElement) const =0
 Returns whether this renderer plugin is compatible with the given render element. More...
 
Interactive Rendering (Active Shade)

Returns the interface used for interactive rendering.

virtual IInteractiveRenderGetIInteractiveRender ()=0
 This method returns a pointer to an IInteractiveRender, the interface used to perform interactive rendering (aka Active Shade). More...
 
Renderer Information

Get renderer name, provider, version, etc.

Remarks
If the string is longer than 32-character, it will be trunked on Render Message Window
Parameters
infoThe returned string containing the vendor info.
virtual void GetVendorInformation (MSTR &info) const =0
 Platform information concerning the renderer. More...
 
virtual void GetPlatformInformation (MSTR &info) const =0
 Platform information concerning the renderer. More...
 
- Public Member Functions inherited from ReferenceTarget
virtual CoreExport void GetClassName (MSTR &s, bool localized=true) const override
 Retrieves the name of the plugin class. More...
 
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 RefAdded (RefMakerHandle rm)
 Called after a reference is made to a target. More...
 
virtual void RefAddedUndoRedo (RefMakerHandle rm)
 Called after a reference is made to a target because of undo or redo. More...
 
virtual void RefDeleted ()
 Called after a references to this is deleted. 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 void BaseClone (ReferenceTarget *from, ReferenceTarget *to, RemapDir &remap)
 This method copies base class data from an object to its clone. 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...
 
virtual CoreExport voidGetInterface (ULONG id)
 Inherited from Animatable. More...
 
virtual CoreExport BaseInterfaceGetInterface (Interface_ID id)
 Inherited from Animatable. 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 CoreExport IOResult Save (ISave *isave)
 Called for saving data. More...
 
virtual CoreExport IOResult Load (ILoad *iload)
 Called for loading data. 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 EnumAuxFiles (AssetEnumCallback &assetEnum, DWORD flags)
 Enumerate auxiliary files (e.g. bitmaps) 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 CoreExport Class_ID ClassID ()
 Retrieves a constant that uniquely identifies 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)
 
virtual CoreExport int SetProperty (ULONG id, void *data)
 
virtual CoreExport voidGetProperty (ULONG id)
 
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 ()
 
virtual CoreExport SvGraphNodeReference SvTraverseAnimGraph (IGraphObjectManager *gom, Animatable *owner, int id, DWORD flags)
 
CoreExport SvGraphNodeReference SvStdTraverseAnimGraph (IGraphObjectManager *gom, Animatable *owner, int id, DWORD flags)
 
virtual CoreExport bool SvCanInitiateLink (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvCanConcludeLink (IGraphObjectManager *gom, IGraphNode *gNode, IGraphNode *gNodeChild)
 
virtual CoreExport MSTR SvGetName (IGraphObjectManager *gom, IGraphNode *gNode, bool isBeingEdited)
 
virtual CoreExport bool SvCanSetName (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvSetName (IGraphObjectManager *gom, IGraphNode *gNode, const MSTR &name)
 
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 SvIsSelected (IGraphObjectManager *gom, IGraphNode *gNode)
 Returns true if the object is selected in its schematic view. More...
 
virtual CoreExport bool SvIsHighlighted (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport COLORREF SvHighlightColor (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 SvHandleDoubleClick (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport MultiSelectCallbackSvGetMultiSelectCallback (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvCanSelect (IGraphObjectManager *gom, IGraphNode *gNode)
 
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 ()
 

Stopping and Pausing a Render

See Stopping and pausing a renderer

enum class  PauseSupport { None , Full , Legacy }
 Returns whether pause is supported by this renderer. More...
 
virtual bool IsStopSupported () const =0
 Returns true if and only the renderer supports the stop functionality, in which case the Stop button will be displayed in the render progress dialog, and StopRendering() may be called. More...
 
virtual void StopRendering ()=0
 Called to instruct the renderer to stop rendering. More...
 
virtual PauseSupport IsPauseSupported () const =0
 Returns whether pause is supported by this renderer. More...
 
virtual void PauseRendering ()=0
 Requests that the renderer pauses itself, at which point it should stop rendering and free CPU resources until a resume is requested. More...
 
virtual void ResumeRendering ()=0
 Requests that the renderer resumes rendering, following a call to PauseRendering(). More...
 

Renderer Requirements

Renderer requirements are special flags which the application may query to determine whether a renderer supports certain features, or to modify the behaviour of the application depending no the renderer's needs.

enum  Requirement {
  kRequirement_NoVFB = 1 , kRequirement_DontSaveRenderOutput = 2 , kRequirement_Wants32bitFPOutput = 3 , kRequirement_WantsObjectSelection = 4 ,
  kRequirement_NoGBufferForToneOpPreview = 5 , kRequirement_SupportsConcurrentRendering = 6
}
 Returns true if the renderer has the given requirement, or returns false otherwise. More...
 
virtual bool HasRequirement (Requirement requirement)=0
 Returns true if the renderer has the given requirement, or returns false otherwise. More...
 

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...
 
- 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

This is the base class for any renderer plugin.

The main entry points for this class are methods Open(), Render(), and Close(). Any render operation works as follows:

  1. Open() is called exactly once.
  2. Render() is called zero or more times.
  3. Close() is called exactly once.
See also
Class ReferenceTarget, Class FrameRendParams, Class RendProgressCallback, Class IRendParams, Class INode, Class ViewParams, Class RendParamDlg, Class RendParams, Class DefaultLight.

Description:
This is the base class for the creation of plug-in renderers. There are five methods that need to be implemented: Open(), Render(), Close(), CreateParamDialog() and ResetParams().

Member Enumeration Documentation

◆ PauseSupport

enum PauseSupport
strong

Returns whether pause is supported by this renderer.

Remarks
  • This method may only be called from the main thread.
See also
Stopping and pausing a renderer
Enumerator
None 

This renderer does not support pausing, in which case the Pause button will be disabled or hidden.

Full 

Full support for pausing, in which case pressing the Pause button will result in PauseRendering() being called.

Legacy 

Legacy support for pausing, which involves the progress callback hanging to forcibly pause the renderer.

This only works if the renderer uses the progess callback in a synchronous manner. PauseRendering() may still be called.

274  {
276  None,
278  Full,
281  Legacy
282  };

◆ Requirement

Returns true if the renderer has the given requirement, or returns false otherwise.

Enumerator
kRequirement_NoVFB 

Indicates that the VFB shouldn't be popped-up after rendering, even if "Show VFB" is ON in the common render parameters.

This is useful for renderers which generate something other than an image. Note that this also affects render element VFBs.

kRequirement_DontSaveRenderOutput 

Indicates that the rendered image shouldn't be saved after rendering, even if a file was specified in the common render parameters.

This is useful for renderers which generate something other than an image. Note that this also affects render element outputs.

kRequirement_Wants32bitFPOutput 

Indicates the renderer wants a 32bit floating-point RGBA frame buffer to be created for output.

The render executer will query the renderer and will create a 32bit floating-point frame buffer, instead of a 16bit integer buffer, if the renderer returns true for this requirement. Note that there is no guarantee about the frame buffer type: even if the renderer returns true for this requirement, a 16bit integer buffer could still be created.

kRequirement_WantsObjectSelection 

Indicates the renderer wants an object selection for rendering.

The render executer will throw an error message when the renderer indicates this requirement, and no objects are selected.

kRequirement_NoGBufferForToneOpPreview 

Flags the renderer as not supporting GBuffers when processing the exposure control preview.

By default, the exposure control preview uses GBuffers to re-compose the image whenever the exposure parameters change. This enables it to effectively re-compose the background into the rendered image with good fidelity. But should this requirement be set, the exposure control preview will switch to an alternate method which uses the alpha channel to extract the background from the rendered image. The results will not be as good but are generally sufficient for the sake of previewing.

kRequirement_SupportsConcurrentRendering 

Enables the concurrent/parallel rendering of ActiveShade and material editor previews for this renderer.

301  {
302  // This flag is deprecated in 3ds Max 2017. It is replaced by Renderer::IsPauseSupported()
303  //kRequirement_NoPauseSupport = 0,
308  kRequirement_NoVFB = 1,
333  };
@ kRequirement_NoVFB
Indicates that the VFB shouldn't be popped-up after rendering, even if "Show VFB" is ON in the common...
Definition: Renderer.h:308
@ kRequirement_WantsObjectSelection
Indicates the renderer wants an object selection for rendering.
Definition: Renderer.h:324
@ kRequirement_SupportsConcurrentRendering
Enables the concurrent/parallel rendering of ActiveShade and material editor previews for this render...
Definition: Renderer.h:332
@ kRequirement_DontSaveRenderOutput
Indicates that the rendered image shouldn't be saved after rendering, even if a file was specified in...
Definition: Renderer.h:313
@ kRequirement_NoGBufferForToneOpPreview
Flags the renderer as not supporting GBuffers when processing the exposure control preview.
Definition: Renderer.h:330
@ kRequirement_Wants32bitFPOutput
Indicates the renderer wants a 32bit floating-point RGBA frame buffer to be created for output.
Definition: Renderer.h:320

Member Function Documentation

◆ SuperClassID()

SClass_ID SuperClassID ( )
inlinevirtual

Returns the super class ID RENDERER_CLASS_ID.

Reimplemented from ReferenceTarget.

Reimplemented in UnifiedRenderer, and UnifiedRenderer.

64 {return RENDERER_CLASS_ID;}
#define RENDERER_CLASS_ID
Renderer super-class ID.
Definition: plugapi.h:426

◆ Open()

virtual int Open ( INode scene,
INode vnode,
ViewParams viewPar,
RendParams rp,
HWND  hwnd,
DefaultLight defaultLights = NULL,
int  numDefLights = 0,
RendProgressCallback prog = NULL 
)
pure virtual

Called once and only once per render operation; used to initialize the renderer before rendering a sequence of frames.

This gives a chance to the renderer to build any data structures which it will need in the rendering phase. If this call returns 0, then the caller is not required to call Close(), so Open() should do any necessary cleanup before returning 0.

Parameters
[in]scene- The root node of the scene to render. Note: If you are rendering in the Materials Editor, you'll instead get a pointer to the INode that is in the sample slot - not the root node of the scene.
[in]vnode- The view node. This may be a camera, a light, or NULL.
[in]viewPar- View parameters for rendering orthographic or user viewports. This is used if vnode is NULL.
[in]rp- This class contains a set of common renderer parameters.
[in]hwnd- The owner window for messages.
[in]defaultLights- An array of default lights if there are no user created lights in the scene.
[in]numDefLights- Number of lights in defaultLights array.
[in]prog- A callback used to allow the renderer to update the progress dialog.
Returns
Nonzero for success, zero for failure.

Implemented in UnifiedRenderer.

◆ Render()

virtual int Render ( TimeValue  t,
Bitmap tobm,
FrameRendParams frp,
HWND  hwnd,
RendProgressCallback prog = NULL,
ViewParams viewPar = NULL 
)
pure virtual

Called to render a single frame.

This may be called zero or more times, in between calls to Open() and Close(), to render a sequence of frames, at a series of time values which are not necessarily sequential.

Parameters
[in]t- The time at which this frame is to be rendered.
[in]tobm- The bitmap to which the image is to be rendered.
[in]frp- A set of frame dependent parameters.
[in]hwnd- The owner window handle.
[in]prog- A callback used to allow the renderer to update the progress dialog.
[in]viewPar- This parameter allows one to specify a different view transformation on each render call. For example, one may render a given scene at a given time from many different viewpoints, without calling Render::Open() for each one.
Returns
Nonzero for success, zero for failure.

Implemented in UnifiedRenderer.

◆ Close()

virtual void Close ( HWND  hwnd,
RendProgressCallback prog = NULL 
)
pure virtual

Called once and only once per render operation; used to free any resources allocated by Open() or Render().

This method needs to be called whenever Open() was called and returned a non-zero value. The renderer should free any allocated resources, returning in a state identical to the one before Open() was called.

Parameters
[in]hwnd- The owner window handle.
[in]prog- A callback used to allow the renderer to update the progress dialog.
Returns
Nonzero for success, zero for failure.

Implemented in UnifiedRenderer.

◆ ApplyRenderEffects()

virtual bool ApplyRenderEffects ( TimeValue  t,
Bitmap pBitmap,
bool  updateDisplay = true 
)
inlinevirtual

This method is called to apply the render effects at the specified time value.

It should be called between the Open() and Close() methods.

This can be used during a multi-pass rendering, in order to apply the render effects to the final, blended bitmap.

Parameters:
Parameters
t- The time to apply the render effects.
pBitmap- Points to the bitmap.
updateDisplay- Passing true indicates that Bitmap's display should be refreshed by the renderer; false indicates it should not be.
Returns
Returns true if the effects were successfully applied; otherwise false.

Reimplemented in UnifiedRenderer.

140 { return false; }

◆ CreateParamDialog()

virtual RendParamDlg* CreateParamDialog ( IRendParams ir,
BOOL  prog = FALSE 
)
pure virtual

This method is called to create and return a pointer to an instance of the RendParamDlg class.

The renderer can add rollup page(s) to the renderer configuration dialog using the IRendParams interface passed into this method.

Parameters
ir- An interface that provides methods for use in displaying parameters, for example this class has methods for adding rollup pages.
prog- If TRUE then the rollup page should just display the parameters so the user has them for reference while rendering, they should not be editable.
Returns
A pointer to an instance of the RendParamDlg class. This class will be deleted using RendParamDlg::DeleteThis().

◆ ResetParams()

virtual void ResetParams ( )
pure virtual

This method simply sets all the parameters to their default values.

Implemented in UnifiedRenderer.

◆ GetAAFilterSupport()

virtual int GetAAFilterSupport ( )
inlinevirtual
156 { return 0; } // point sample, no reconstruction filter

◆ SupportsTexureBaking()

virtual bool SupportsTexureBaking ( )
inlinevirtual

Renderers which support texture baking should override this method to return true.

It is checked when the Render to Texture dialog is opened; if the current renderer does not support texture baking, then a warning message is displayed and the user will not be able to press the Render button in the dialog.

Returns
By default this will return false
163 { return false; }

◆ SupportsCustomRenderPresets()

virtual bool SupportsCustomRenderPresets ( )
inlinevirtual

A renderer should override this method to return true if it supports any custom preset categories beyond the standard categories.

Returns
By default this will returns false
167 { return false; }

◆ RenderPresetsFileVersion()

virtual int RenderPresetsFileVersion ( )
inlinevirtual

Return a number indicating the current version of the renderer's custom preset.

The number can be arbitrary

Returns
By default this will return -1
172 { return -1; }

◆ RenderPresetsIsCompatible()

virtual BOOL RenderPresetsIsCompatible ( int  version)
inlinevirtual

Return true if the renderer can load presets of the indicated version.

Parameters
versionThe version to test compatibility against
Returns
By default this will return false.
177 { return false; }

◆ RenderPresetsMapIndexToCategory()

virtual const MCHAR* RenderPresetsMapIndexToCategory ( int  catIndex)
inlinevirtual

Returns the UI name of a supported custom category.

Parameters
catIndex- The custom preset index to return the name of. catIndex will be a number between RENDER_PRESETS_CUSTOM_CATEGORY_INDEX_BEGIN and RENDER_PRESETS_CATEGORY_COUNT.
Returns
If the ID is a supported custom category, return the name of the category to be displayed in the UI. Otherwise return NULL
183 { return NULL; }
#define NULL
Definition: autoptr.h:18

◆ RenderPresetsMapCategoryToIndex()

virtual int RenderPresetsMapCategoryToIndex ( const MCHAR category)
inlinevirtual

Returns the index of a supported custom category.

Parameters
category- The UI name of a custom category
Returns
If the input is the name of a custom category supported by the renderer, return the ID number of the category. Otherwise returns 0
188 { return 0; }

◆ RenderPresetsPreSave()

virtual int RenderPresetsPreSave ( ITargetedIO root,
BitArray  saveCategories 
)
inlinevirtual

called before a render preset is saved.

For each custom category supported use root->AddSaveTarget() passing the object with the parameters for that category if the corresponding bit is set in the saveCategories, The object will be saved along with the preset.

Example Implementation:
{
// Iterate through all our possible custom preset indices
{
// Should the preset be saved?
if (saveCategories[i])
{
// p_myOptions is a class derived from ReferenceTarget that contains our options.
root->AddSaveTarget(i, p_myOptions);
}
}
}
#define RENDER_PRESETS_CUSTOM_CATEGORY_INDEX_BEGIN
Definition: iRenderPresets.h:27
Parameters
rootAn instance of an ITargetedIO class to be used to save any custom presets specified
saveCategoriesSpecies the custom preset categories to be saved
211 { return -1; }

◆ RenderPresetsPostSave()

virtual int RenderPresetsPostSave ( ITargetedIO ,
BitArray   
)
inlinevirtual

called after a preset is saved.

No specific action is required from the renderer at this time.

See also
RenderPresetsPreSave
216 { return -1; }

◆ RenderPresetsPreLoad()

virtual int RenderPresetsPreLoad ( ITargetedIO root,
BitArray  saveCategories 
)
inlinevirtual

called before a preset is loaded.

For each custom category supported, if the corresponding bit is not set in the loadCategories, use root->Store() passing the object with the parameters for that category. The object will be preserved, so the renderer can refer to it after the preset is loaded.

See also
RenderPresetsPreSave, RenderPresetsPostLoad
Parameters
rootAn instance of an ITargetedIO class to be used to store any custom presets specified
saveCategoriesLists the custom preset categories to be loaded. Any categories not being loaded should be stored on root.
226 { return -1; }

◆ RenderPresetsPostLoad()

virtual int RenderPresetsPostLoad ( ITargetedIO root,
BitArray  loadCategories 
)
inlinevirtual

called after a preset is loaded.

For each custom category supported...

If the bit is set in the loadCategories: use root->GetSaveTarget() to retrieve the loaded object, and update the renderer's active parameters to match this object

If the bit is not set in the loadCategories: use root->Retrieve() to retrieve the object that was stored during pre-load. Update the renderer's active parameters to match this object. This is important in case a certain category was held in the file and loaded, but the user did not choose to load that category. In this case the renderer must restore its parameters to their former value.

See also
RenderPresetsPreLoad
Parameters
rootAn instance of an ITargetedIO class to be used to retrieve any custom presets stored pre-load.
loadCategoriesLists the custom preset categories that have been loaded.
239 { return -1; }

◆ IsStopSupported()

virtual bool IsStopSupported ( ) const
pure virtual

Returns true if and only the renderer supports the stop functionality, in which case the Stop button will be displayed in the render progress dialog, and StopRendering() may be called.

Remarks
This method may only be called from the main thread.
See also
Stopping and pausing a renderer

Implemented in UnifiedRenderer.

◆ StopRendering()

virtual void StopRendering ( )
pure virtual

Called to instruct the renderer to stop rendering.

The renderer is expected to stop rendering at its earliest convenience. If, for example, the renderer is in the process of rendering an iteration, it may finish rendering this iteration (or not), as it wishes - so long as it outputs a valid rendered image representing the progress rendered so far.

Remarks
  • This method may only be called from the main thread.
  • The renderer should take special care of supporting a stop while the renderer is paused; the user should not need to manually resume for a stop to function properly.
  • This method is asynchronously called, and should return immediately; it must not wait for the rendering process to actually be stopped.
See also
Stopping and pausing a renderer

Implemented in UnifiedRenderer.

◆ IsPauseSupported()

virtual PauseSupport IsPauseSupported ( ) const
pure virtual

Returns whether pause is supported by this renderer.

Remarks
  • This method may only be called from the main thread.
See also
Stopping and pausing a renderer

Implemented in UnifiedRenderer.

◆ PauseRendering()

virtual void PauseRendering ( )
pure virtual

Requests that the renderer pauses itself, at which point it should stop rendering and free CPU resources until a resume is requested.

Remarks
  • This method may only be called from the main thread.
  • Abort or Stop events may be received while the renderer is paused. Those should be processed correctly.
  • It is possible for this method to be called while the renderer is already paused. The implementation should handle that correctly.
See also
Stopping and pausing a renderer

Implemented in UnifiedRenderer.

◆ ResumeRendering()

virtual void ResumeRendering ( )
pure virtual

Requests that the renderer resumes rendering, following a call to PauseRendering().

Remarks
  • This method may only be called from the main thread.
  • It is possible for this method to be called while the renderer is not currently paused. The implementation should handle that correctly.
See also
Stopping and pausing a renderer

Implemented in UnifiedRenderer.

◆ HasRequirement()

virtual bool HasRequirement ( Requirement  requirement)
pure virtual

Returns true if the renderer has the given requirement, or returns false otherwise.

◆ CompatibleWithAnyRenderElement()

virtual bool CompatibleWithAnyRenderElement ( ) const
pure virtual

Returns whether this renderer plugin is compatible with the given render element.

Parameters
pIRenderElementThe render element for which to verify compatibility.

◆ CompatibleWithRenderElement()

virtual bool CompatibleWithRenderElement ( IRenderElement pIRenderElement) const
pure virtual

Returns whether this renderer plugin is compatible with the given render element.

Parameters
pIRenderElementThe render element for which to verify compatibility.

◆ GetIInteractiveRender()

virtual IInteractiveRender* GetIInteractiveRender ( )
pure virtual

This method returns a pointer to an IInteractiveRender, the interface used to perform interactive rendering (aka Active Shade).

Ownership of the interface remains with the Renderer, i.e. the Renderer is responsible for freeing this interface, if necessary, in its destructor. Consequently, every call to this method should return the same pointer value - there is a one-to-one association between classes IInteractiveRenderer and Renderer.

Remarks
Should return null if interactive rendering is not supported by the renderer.

Implemented in UnifiedRenderer.

◆ GetVendorInformation()

virtual void GetVendorInformation ( MSTR info) const
pure virtual

Platform information concerning the renderer.

Remarks
It could be information of OS, CPU, GPU, etc. If the string is longer than 32-character, it will be trunked on Render Message Window.
Parameters
infoThe returned string containing the platform info.

◆ GetPlatformInformation()

virtual void GetPlatformInformation ( MSTR info) const
pure virtual

Platform information concerning the renderer.

Remarks
It could be information of OS, CPU, GPU, etc. If the string is longer than 32-character, it will be trunked on Render Message Window.
Parameters
infoThe returned string containing the platform info.