00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #pragma once
00016
00017 #include "maxheap.h"
00018 #include <ole2.h>
00019 #include "cmdmode.h"
00020 #include "sceneapi.h"
00021 #include "rtclick.h"
00022 #include "evuser.h"
00023 #include "maxcom.h"
00024 #include "plugin.h"
00025 #include "log.h"
00026 #include "ActionTable.h"
00027 #include "iTreeVw.h"
00028 #include "iRenderPresets.h"
00029 #include "excllist.h"
00030 #include "DefaultActions.h"
00031 #include "RendType.h"
00032 #include "AssetManagement\AssetType.h"
00033 #include "box3.h"
00034 #include "InodeTransformModes.h"
00035 #include "TabTypes.h"
00036 #include "GetCOREInterface.h"
00037 #include "ref.h"
00038 #include "RollupConstants.h"
00039
00040
00041 class ViewParams;
00042 class ModContext;
00043 class HitData;
00044 class HitLog;
00045 class CtrlHitLog;
00046 class MtlBase;
00047 class Mtl;
00048 class Texmap;
00049 class PickNodeCallback;
00050 class Renderer;
00051 class IScanRenderer;
00052 class RendParams;
00053 class IRenderElementMgr;
00054 class RendProgressCallback;
00055 class Bitmap;
00056 class BitmapInfo;
00057 class Texmap;
00058 class SoundObj;
00059 class GenCamera;
00060 class GenLight;
00061 class NameTab;
00062 class ShadowType;
00063 class MacroRecorder;
00064 class CommandLineCallback;
00065 class GraphicsWindow;
00066 struct SnapInfo;
00067 class Material;
00068 class IDerivedObject;
00069 class DWORDTab;
00070 class ILayerManager;
00071
00072 #ifdef _OSNAP
00073 class IOsnapManager;
00074 class IOsnapManager7;
00075 class MouseManager;
00076 #endif
00077 class MtlBaseLib;
00078 class Atmospheric;
00079 class IRollupWindow;
00080 class ITrackViewNode;
00081 class DllDir;
00082 class Effect;
00083 class SpaceArrayCallback;
00084 class IMenuManager;
00085 class IColorManager;
00086 class Modifier;
00087 class Point2;
00088 class BaseInterface;
00089
00090 namespace MaxSDK
00091 {
00092 namespace AssetManagement
00093 {
00094 class AssetUser;
00095 }
00096 }
00097
00102 enum RenderSettingID
00103 {
00104 RS_Production = 0,
00105 RS_Draft,
00106 RS_IReshade,
00107 RS_MEdit
00108 };
00110
00112 enum CloneType
00113 {
00114 NODE_COPY,
00115 NODE_INSTANCE,
00116 NODE_REFERENCE,
00117 NODE_NONE
00118 };
00119
00128 #define MERGE_DUPS_PROMPT 0 //!< Prompt user when duplicate node names are encountered
00129 #define MERGE_DUPS_MERGE 1 //!< Merge nodes and keep old ones in the scene
00130 #define MERGE_DUPS_SKIP 2 //!< Do not merge nodes with duplicated names
00131 #define MERGE_DUPS_DELOLD 3 //!< Merge nodes and delete old ones from the scene
00132 #define MERGE_LIST_NAMES 4 //!< Causes a list of objects to be placed into mrgList parameter of Interface::MergeFromFile. No actual merging will take place. The mergeAll parameter of Interface::MergeFromFile must be TRUE.
00133 #define MERGE_DUPS_RENAME 1000 //!< Merge nodes and automatically rename them
00134
00135
00144 #define MERGE_DUP_MTL_PROMPT MERGE_DUPS_PROMPT //!< Prompt user when duplicate material names are encountered
00145 #define MERGE_DUP_MTL_USE_MERGED MERGE_DUPS_DELOLD //!< Merge material and replace all scene materials with the same name with the merged material
00146 #define MERGE_DUP_MTL_USE_SCENE MERGE_DUPS_SKIP //!< Don't merge material, use instead the scene material with the same name
00147 #define MERGE_DUP_MTL_RENAME MERGE_DUPS_RENAME //!< Merge material and automatically rename them
00148
00149
00157 #define MERGE_REPARENT_PROMPT 0 //!< Prompt user for reparenting action
00158 #define MERGE_REPARENT_ALWAYS 1 //!< Maintain node hierarchies are maintained when merging nodes.
00159 #define MERGE_REPARENT_NEVER 2 //!< Don't maintain node hierarchies are maintained when merging nodes. Merged nodes become children of the scene's root node.
00160
00161
00162
00170 #define XREF_AS_PROXY (1<<0) //!< The xref objects are created as proxies
00171 #define XREF_XREF_MODIFIERS 0 //!< Modifiers will be part of the xrefed object, i.e. modifiers won't be accessible in the master scene's modifier panel, but will be updated on subsequent updates of the xrefed objects
00172 #define XREF_DROP_MODIFIERS (1<<1) //!< Modifiers will not be xrefed at all, i.e. the non-modified version of the source objects are xrefed
00173 #define XREF_MERGE_MODIFIERS (1<<2) //!< Modifiers will be merged, i.e modifiers will be accessible in the master scene's modifier panel, but won't get update on subsequent updates of the xrefed objects
00174 #define XREF_MERGE_MANIPULATORS (1<<3) //!< Manipulators will be merged rather than xrefed
00175 #define XREF_SELECT_NODES (1<<5) //!< The xrefed nodes are added to the current selection set
00176 #define XREF_MERGE_CONTROLLERS (1<<6) //!< Controllers will be merged rather than being xrefed
00177 #define XREF_MERGE_MATERIALS (1<<7) //!< Materials will be merged rather than xrefed
00178
00179
00184 #define PROPSET_SUMMARYINFO 0x01 //!< Corresponds to the File Properties Summary tab properties.
00185 #define PROPSET_DOCSUMMARYINFO 0x02 //!< Corresponds to the File Properties Contents tab properties (Document Contents).
00186 #define PROPSET_USERDEFINED 0x04//!< Corresponds to the File Properties Custom tab properties.
00187
00188
00189
00190 #define PIDSI_CONTENTSTATUS 0x00000020L // VT_LPSTR
00191 #define PIDSI_CONTENTTYPE 0x00000021L // VT_LPSTR
00192 #define PIDSI_CREATOR 0x00000022L // VT_LPSTR
00193 #define PIDSI_IDENTIFIER 0x00000023L // VT_CLSID
00194 #define PIDSI_LANGUAGE 0x00000024L // VT_LPSTR
00195 #define PIDSI_VERSION 0x00000025L // VT_LPSTR
00196
00197
00198 #define I_EXEC_ACTIVATE_TEXTURE 1 // arg1: Texmap *tx; arg2: Mtl *mtl; arg3: int subnum;
00199 #define I_EXEC_DEACTIVATE_TEXTURE 2 // arg1: Texmap *tx; arg2: Mtl *mtl; arg3: int subnum;
00200 #define I_EXEC_RENDER_MTL_SAMPLE 3 // arg1: MtlBase *mb; arg2: int size; arg3: UBYTE *image; returns 0:fail, 1: success
00201 #define I_EXEC_GET_VPDISPLAY_DIB 4 // arg1: Texmap *tx; arg2: TimeValue t; arg3: TexHandleMaker *thm; arg4: BOOL mono;
00202
00203
00204
00205 #define I_EXEC_SET_DIR 10 // arg1: int which; arg2: MCHAR *dir;
00206
00207 #ifdef ACAD_MAXSCRIPT_EXTENSIONS
00208 #define I_EXEC_OFFSET_SPLINE 80 // arg1: INode *spline; arg2: float amount;
00209 #define I_EXEC_OFFSET_MEASURE 81 // arg1: INode *spline; arg2: Point3 *point; arg3: float *result;
00210 #define I_EXEC_TRIM_EXTEND 82 // arg1: INodeTab *all; arg2: INodeTab *act;
00211
00212 #endif
00213
00214
00215 #define I_EXEC_NEW_OBJ_XREF_DLG 83 // arg1: INodeTab *nodes; arg2: BOOL forceSingle;
00216 #define I_EXEC_MODIFYTASK_INVALIDATEPANEL 86 //No Args
00217
00218
00219 #define I_EXEC_INVALIDATE_VIEWEXP 87 // arg1: ViewExp *vp -- set invalidate flag on ViewExp*; arg2: BOOL Update all view related objects
00220
00221 #define I_EXEC_SET_NUDGE 88 // arg1: BOOL bEnableNude -- Enable/Disable viewport arrow key nudge
00222
00223 #define I_EXEC_COUNT_MTL_SCENEREFS 0x2001 // arg1 Mtl *mt: returns number of refs from scene
00224
00225
00226 #ifdef ACAD_MAXSCRIPT_EXTENSIONS
00227 #define I_EXEC_RET_NULL_NODE 1
00228 #define I_EXEC_RET_NULL_OBJECT 2
00229 #define I_EXEC_RET_NOT_SPLINE 3
00230 #endif
00231 #define I_EXEC_RET_OFFSET_FAIL 4
00232
00246 class NameMaker: public MaxHeapOperators
00247 {
00248 public:
00256 virtual void MakeUniqueName(MSTR &name)=0;
00257
00262 virtual void AddName(MSTR &name) = 0;
00267 virtual BOOL NameExists(MSTR& name) = 0;
00268 virtual ~NameMaker() {}
00269 };
00270
00274 #define VP_DEFAULT_RENDER 0x0000 //!< same as REDRAW_INTERACTIVE
00275 #define VP_DONT_RENDER 0x0001
00276 #define VP_DONT_SIMPLIFY 0x0002 //!< same as REDRAW_NORMAL
00277 #define VP_START_SEQUENCE 0x0004 //!< same as REDRAW_BEGIN
00278 #define VP_END_SEQUENCE 0x0008 //!< same as REDRAW_END
00279 #define VP_SECOND_PASS 0x0010 //!< for when both back- and fore-ground is rendered
00280
00281
00286 #define SHADE_LEVELS 10
00287 enum ShadeType {
00288 SMOOTH_HIGHLIGHT,
00289 SMOOTH,
00290 FACET_HIGHLITE,
00291 FACET,
00292 CONSTANT,
00293 HIDDENLINE,
00294 LITE_WIREFRAME,
00295 Z_WIREFRAME,
00296 WIREFRAME,
00297 BOX
00298 };
00300
00301
00302
00303
00304 enum ViewType { VIEW_LEFT,VIEW_RIGHT,VIEW_TOP,VIEW_BOTTOM,VIEW_FRONT,VIEW_BACK,
00305 VIEW_ISO_USER, VIEW_PERSP_USER, VIEW_CAMERA, VIEW_GRID, VIEW_NONE, VIEW_TRACK,
00306 VIEW_SPOT, VIEW_SHAPE, VIEW_SCHEMATIC, VIEW_RENDER, VIEW_SCENEEXPLORER, VIEW_OTHER};
00307
00308
00309
00356 class ViewWindow : public InterfaceServer {
00357 public:
00360 virtual MCHAR *GetName()=0;
00373 virtual HWND CreateViewWindow(HWND hParent, int x, int y, int w, int h)=0;
00379 virtual void DestroyViewWindow(HWND hWnd)=0;
00380
00381
00382
00390 virtual BOOL CanCreate() { return TRUE; }
00391
00392
00393
00394
00395
00402 virtual int NumberCanCreate() { return -1; }
00403 };
00404
00405
00406 static const int FLOAT_TRACKVIEW = 0;
00407 static const int DOCK_TRACKVIEW_TOP = 1;
00408 static const int DOCK_TRACKVIEW_BOTTOM = 2;
00409 static const int CAN_DOCK_TRACKVIEW_TOP = 3;
00410
00411 #define TRACKBAR_FILTER_ALL 1
00412 #define TRACKBAR_FILTER_TMONLY 2
00413 #define TRACKBAR_FILTER_CURRENTTM 3
00414 #define TRACKBAR_FILTER_OBJECT 4
00415 #define TRACKBAR_FILTER_MATERIAL 5
00416
00427 typedef bool (* TRACKBAR_FILTER_PROC)(Animatable* anim, Animatable* parent, int subAnimIndex, Animatable* grandParent, INode* node);
00428
00438 typedef bool (* TRACKBAR_ADDITION_PROC)(Tab<Animatable*> &anims, Tab<int> &subAnims, Tab<INode*> &nodes);
00439
00443 #define TRACKBAR_FILTER_MANAGER_INTERFACE Interface_ID(0xc85046, 0x2def7c7d)
00444 class ITrackBarFilterManager : public BaseInterface
00445 {
00446 public:
00453 virtual int RegisterFilter(TRACKBAR_FILTER_PROC callbackFilter, TRACKBAR_ADDITION_PROC callbackAddition, MSTR name, Class_ID filterID, bool active = false, bool stopTraversal = true)=0;
00455 virtual void UnRegisterFilter(int index)=0;
00457 virtual void UnRegisterFilter(Class_ID filterID)
00458 {
00459 for (int i = FilterCount()-1; i >=0; i--)
00460 {
00461 if (GetFilterID(i) == filterID)
00462 {
00463 UnRegisterFilter(i);
00464 break;
00465 }
00466 }
00467 }
00469 virtual int FilterCount()=0;
00471 virtual Class_ID GetFilterID(int index)=0;
00473 virtual MSTR GetFilterName(int index)=0;
00476 virtual bool IsFilterActive(int index)=0;
00478 virtual void SetFilterActive(int index, bool state)=0;
00479
00480 private:
00481 friend class ITrackBar;
00483 virtual int RegisterFilter(Value* callbackFilter, Value* callbackAddition, MSTR name, int id, bool active = false, bool stopTraversal = true)=0;
00484 };
00485
00486
00487 #define TRACKBAR_INTERFACE Interface_ID(0x2aff3557, 0x16aa714b)
00488
00489
00499 class ITrackBar : public FPMixinInterface {
00500 public:
00505 virtual void SetVisible(BOOL bVisible) = 0;
00507 virtual BOOL IsVisible() = 0;
00530 virtual void SetFilter(UINT nFilter) = 0;
00534 virtual UINT GetFilter() = 0;
00545 virtual TimeValue GetNextKey(TimeValue tStart, BOOL bForward) = 0;
00552 virtual void RedrawTrackBar(bool bForce = false) = 0;
00557 virtual void SetShowFrames(bool b) = 0;
00560 virtual bool GetShowFrames() = 0;
00565 virtual void SetShowAudio(bool b) = 0;
00567 virtual bool GetShowAudio() = 0;
00572 virtual void SetShowSelectionRange(bool b) = 0;
00574 virtual bool GetShowSelectionRange() = 0;
00579 virtual void SetSnapToFrames(bool b) = 0;
00581 virtual bool GetSnapToFrames() = 0;
00587 virtual void SetKeyTransparency(int xp) = 0;
00591 virtual int GetKeyTransparency() = 0;
00597 virtual void SetSelKeyTransparency(int xp) = 0;
00601 virtual int GetSelKeyTransparency() = 0;
00607 virtual void SetCursorTransparency(int xp) = 0;
00611 virtual int GetCursorTransparency() = 0;
00612
00613
00614 enum { fIdgetVisible, fIdsetVisible, fIdgetFilter, fIdsetFilter, fIdgetNextKeyTime, fIdgetPreviousKeyTime, fIdredrawTrackBar,
00615 fIdgetShowFrames, fIdsetShowFrames, fIdgetShowAudio, fIdsetShowAudio, fIdgetShowSelectionRange, fIdsetShowSelectionRange,
00616 fIdgetSnapToFrames, fIdsetSnapToFrames, fIdgetKeyTransparency, fIdsetKeyTransparency,
00617 fIdgetSelKeyTransparency, fIdsetSelKeyTransparency, fIdgetCursorTransparency, fIdsetCursorTransparency,
00618 fIdregisterFilter, fIdUnRegisterFilter, fIdFilterCount, fIdFilterID, fIdFilterName, fIdIsFilterActive, fIdSetFilterActive,
00619 };
00620
00621 enum {enumIDfilterType,
00622 };
00623
00624 BaseInterface* GetInterface(Interface_ID id) { return (id == TRACKBAR_INTERFACE) ? this : FPMixinInterface::GetInterface(id); }
00625 FPInterfaceDesc* GetDesc() { return (FPInterfaceDesc*)GetCOREInterface(TRACKBAR_INTERFACE); }
00626
00627
00628 #pragma warning(push)
00629 #pragma warning(disable:4238)
00630 BEGIN_FUNCTION_MAP
00631 VFN_1(fIdredrawTrackBar, RedrawTrackBar, TYPE_bool);
00632 FNT_0(fIdgetNextKeyTime, TYPE_TIMEVALUE, fpGetNextKey);
00633 FNT_0(fIdgetPreviousKeyTime, TYPE_TIMEVALUE, fpGetPreviousKey);
00634 FN_6(fIdregisterFilter, TYPE_INDEX, fpRegisterFilter, TYPE_VALUE, TYPE_VALUE, TYPE_TSTR, TYPE_INT, TYPE_bool, TYPE_bool);
00635 VFN_1(fIdUnRegisterFilter, fpUnRegisterFilter, TYPE_INDEX);
00636 FN_0(fIdFilterCount, TYPE_INT, fpFilterCount);
00637 FN_1(fIdFilterID, TYPE_INT_TAB_BV, fpGetFilterID, TYPE_INDEX);
00638 FN_1(fIdFilterName, TYPE_TSTR_BV, fpGetFilterName, TYPE_INDEX);
00639 FN_1(fIdIsFilterActive, TYPE_bool, fpIsFilterActive, TYPE_INDEX);
00640 VFN_2(fIdSetFilterActive, fpSetFilterActive, TYPE_INDEX, TYPE_bool);
00641
00642 PROP_FNS(fIdgetVisible, IsVisible, fIdsetVisible, SetVisible, TYPE_BOOL);
00643 PROP_FNS(fIdgetFilter, GetFilter, fIdsetFilter, SetFilter, TYPE_ENUM);
00644 PROP_FNS(fIdgetShowFrames, GetShowFrames, fIdsetShowFrames, SetShowFrames, TYPE_bool);
00645 PROP_FNS(fIdgetShowAudio, GetShowAudio, fIdsetShowAudio, SetShowAudio, TYPE_bool);
00646 PROP_FNS(fIdgetShowSelectionRange, GetShowSelectionRange, fIdsetShowSelectionRange, SetShowSelectionRange, TYPE_bool);
00647 PROP_FNS(fIdgetSnapToFrames, GetSnapToFrames, fIdsetSnapToFrames, SetSnapToFrames, TYPE_bool);
00648 PROP_FNS(fIdgetKeyTransparency, GetKeyTransparency, fIdsetKeyTransparency, SetKeyTransparency, TYPE_INT);
00649 PROP_FNS(fIdgetSelKeyTransparency, GetSelKeyTransparency, fIdsetSelKeyTransparency, SetSelKeyTransparency, TYPE_INT);
00650 PROP_FNS(fIdgetCursorTransparency, GetCursorTransparency, fIdsetCursorTransparency, SetCursorTransparency, TYPE_INT);
00651 END_FUNCTION_MAP
00652 #pragma warning(pop)
00653 private:
00654
00655 TimeValue fpGetNextKey(TimeValue t) {return GetNextKey(t, TRUE);}
00656 TimeValue fpGetPreviousKey(TimeValue t) { return GetNextKey(t, FALSE);}
00657 int fpRegisterFilter(Value* callbackFilter, Value* callbackAddition, MSTR name, int id, bool active = false, bool stopTraversal = true)
00658 {
00659 ITrackBarFilterManager* filterManager = (ITrackBarFilterManager*)this->GetInterface(TRACKBAR_FILTER_MANAGER_INTERFACE);
00660 if (filterManager != NULL)
00661 return filterManager->RegisterFilter(callbackFilter, callbackAddition, name, id, active, stopTraversal);
00662 return -1;
00663 }
00664 void fpUnRegisterFilter(int index)
00665 {
00666 ITrackBarFilterManager* filterManager = (ITrackBarFilterManager*)this->GetInterface(TRACKBAR_FILTER_MANAGER_INTERFACE);
00667 if (filterManager != NULL)
00668 filterManager->UnRegisterFilter(index);
00669 }
00670 int fpFilterCount()
00671 {
00672 ITrackBarFilterManager* filterManager = (ITrackBarFilterManager*)this->GetInterface(TRACKBAR_FILTER_MANAGER_INTERFACE);
00673 if (filterManager != NULL)
00674 {
00675 return filterManager->FilterCount();
00676 }
00677 return 0;
00678 }
00679 Tab<int> fpGetFilterID(int index)
00680 {
00681 Tab<int> ids;
00682 ITrackBarFilterManager* filterManager = (ITrackBarFilterManager*)this->GetInterface(TRACKBAR_FILTER_MANAGER_INTERFACE);
00683 if (filterManager != NULL)
00684 {
00685 Class_ID id = filterManager->GetFilterID(index);
00686 int IDa = id.PartA();
00687 int IDb = id.PartB();
00688 ids.Append(1, &IDa);
00689 ids.Append(1, &IDb);
00690 }
00691 return ids;
00692 }
00693 MSTR fpGetFilterName(int index)
00694 {
00695 ITrackBarFilterManager* filterManager = (ITrackBarFilterManager*)this->GetInterface(TRACKBAR_FILTER_MANAGER_INTERFACE);
00696 if (filterManager != NULL)
00697 {
00698 return filterManager->GetFilterName(index);
00699 }
00700 return _M("");
00701 }
00702
00703 bool fpIsFilterActive(int index)
00704 {
00705 ITrackBarFilterManager* filterManager = (ITrackBarFilterManager*)this->GetInterface(TRACKBAR_FILTER_MANAGER_INTERFACE);
00706 if (filterManager != NULL)
00707 {
00708 return filterManager->IsFilterActive(index);
00709 }
00710 return false;
00711 }
00712 void fpSetFilterActive(int index, bool state)
00713 {
00714 ITrackBarFilterManager* filterManager = (ITrackBarFilterManager*)this->GetInterface(TRACKBAR_FILTER_MANAGER_INTERFACE);
00715 if (filterManager != NULL)
00716 filterManager->SetFilterActive(index, state);
00717 }
00718 };
00719
00720
00721
00732 class ViewExp : public InterfaceServer {
00733 public:
00739 virtual Point3 GetPointOnCP(const IPoint2 &ps)=0;
00750 virtual Point3 SnapPoint(const IPoint2 &in, IPoint2 &out, Matrix3 *plane2d = NULL, DWORD flags = 0)=0;
00751 #ifdef _OSNAP
00752
00798 virtual void SnapPreview(const IPoint2 &in, IPoint2 &out, Matrix3 *plane2d = NULL, DWORD flags = 0)=0;
00804 virtual void GetGridDims(float *MinX, float *MaxX, float *MinY, float *MaxY) = 0;
00805 #endif
00806
00810 virtual float SnapLength(float in)=0;
00831 virtual float GetCPDisp(const Point3 base, const Point3& dir,
00832 const IPoint2& sp1, const IPoint2& sp2, BOOL snap = FALSE )=0;
00842 virtual GraphicsWindow* getGW()=0;
00843
00848 virtual int IsWire()=0;
00874 virtual Rect GetDammageRect()=0;
00875
00888 virtual Point3 MapScreenToView( IPoint2& sp, float depth )=0;
00894 virtual void MapScreenToWorldRay(float sx, float sy, Ray& ray)=0;
00895
00896
00897
00903 virtual BOOL SetAffineTM(const Matrix3& m)=0;
00930 virtual void GetAffineTM( Matrix3& tm )=0;
00939 virtual int GetViewType() = 0;
00942 virtual BOOL IsPerspView()=0;
00945 virtual float GetFOV()=0;
00947 virtual float GetFocalDist()=0;
00950 virtual void SetFocalDist(float fd)=0;
00956 virtual float GetScreenScaleFactor(const Point3 worldPoint)=0;
00959 virtual float GetFPS()=0;
00960
00961
00962
00967 virtual float GetVPWorldWidth(const Point3 wPoint)=0;
00975 virtual Point3 MapCPToWorld(const Point3 cpPoint)=0;
00979 virtual void GetConstructionTM( Matrix3 &tm )=0;
00982 virtual void SetGridSize( float size )=0;
00987 virtual float GetGridSize()=0;
00991 virtual BOOL IsGridVisible()=0;
01001 virtual int GetGridType()=0;
01002
01003
01006 virtual INode *GetViewCamera()=0;
01007
01008
01011 virtual void SetViewCamera(INode *camNode)=0;
01012
01013
01018 virtual void SetViewUser(BOOL persp)=0;
01019
01020
01023 virtual INode *GetViewSpot()=0;
01024
01025
01028 virtual void SetViewSpot(INode *spotNode)=0;
01029
01030
01033 virtual void ClearHitList()=0;
01037 virtual INode *GetClosestHit()=0;
01040 virtual INode *GetHit(int i)=0;
01043 virtual int HitCount()=0;
01044
01061 virtual void LogHit(INode *nr, ModContext *mc, DWORD dist, ulong info, HitData *hitdat = NULL)=0;
01064 virtual HitLog& GetSubObjHitList()=0;
01067 virtual void ClearSubObjHitList()=0;
01069 virtual int NumSubObjHits()=0;
01070
01071
01088 virtual void CtrlLogHit(INode *nr,DWORD dist,ulong info,DWORD infoExtra)=0;
01091 virtual CtrlHitLog& GetCtrlHitList()=0;
01094 virtual void ClearCtrlHitList()=0;
01095
01120 virtual float NonScalingObjectSize()=0;
01121
01122
01129 virtual BOOL setBkgImageDsp(BOOL onOff)=0;
01132 virtual int getBkgImageDsp(void)=0;
01133
01134
01138 virtual void setSFDisplay(int onOff)=0;
01141 virtual int getSFDisplay(void)=0;
01142
01143
01144
01151 virtual HWND GetHWnd()=0;
01152
01153
01155 virtual BOOL IsActive() = 0;
01156
01158 virtual BOOL IsEnabled() = 0;
01159
01160
01171 virtual void TrackImplicitGrid(IPoint2 m, Matrix3* mat = NULL, ULONG hitTestFlags = 0) = 0;
01182 virtual void CommitImplicitGrid(IPoint2 m, int mouseflags, Matrix3* mat = NULL) = 0;
01186 virtual void ReleaseImplicitGrid() = 0;
01187
01194 virtual void InvalidateRect( const Rect &rect ) = 0;
01195
01196
01207 virtual INT_PTR Execute(int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0)
01208 {
01209 UNUSED_PARAM(cmd);
01210 UNUSED_PARAM(arg1);
01211 UNUSED_PARAM(arg2);
01212 UNUSED_PARAM(arg3);
01213 return 0;
01214 }
01215
01216 enum
01217 {
01219 kEXECUTE_GET_VIEWEXP_10 = 0,
01221 kEXECUTE_GET_VIEWPORT_ID = 1,
01223 kEXECUTE_GET_VIEWEXP_11 = 2,
01225 kEXECUTE_GET_VIEWEXP_13 = 3,
01226 };
01227 };
01228
01230
01240 class ViewExp10 : public ViewExp
01241 {
01242 public:
01244 virtual ~ViewExp10() { }
01245
01258 virtual void Pan(const Point2& screenDelta) = 0;
01259
01272 virtual void Zoom(float zoomFactor) = 0;
01273
01278 virtual void Rotate(const Quat& rotData, const Point3& center = Point3::Origin) = 0;
01279
01282 virtual void SetFocalDistance(float dist) = 0;
01284
01286
01287
01288
01292 virtual bool UndoBegin() = 0;
01294
01298 virtual bool UndoAccept() = 0;
01300
01302
01303
01304
01309 virtual void Invalidate(bool bForegroundOnly = false) = 0;
01311
01313 virtual bool IsValid() const = 0;
01315
01317
01322 virtual BOOL SetFOV(float fov) = 0;
01323
01325
01326 virtual float GetViewportFPS() = 0;
01327
01329
01335 virtual float GetViewportClipScale()= 0;
01337
01344 virtual void SetViewportClipScale(float fScale) = 0;
01345
01347
01348
01350
01351 virtual float GetAdaptiveDegGoalFPS() = 0;
01353
01354 virtual void SetAdaptiveDegGoalFPS(float fFPS) = 0;
01355
01357
01358 virtual BOOL GetAdaptiveDegDisplayModeCurrent() = 0;
01360
01361 virtual void SetAdaptiveDegDisplayModeCurrent(BOOL bMode) = 0;
01362
01364
01365 virtual BOOL GetAdaptiveDegDisplayModeFastShaded() = 0;
01367
01368 virtual void SetAdaptiveDegDisplayModeFastShaded(BOOL bMode) = 0;
01369
01371
01372 virtual BOOL GetAdaptiveDegDisplayModeWire() = 0;
01374
01375 virtual void SetAdaptiveDegDisplayModeWire(BOOL bMode) = 0;
01376
01378
01379 virtual BOOL GetAdaptiveDegDisplayModeBox() = 0;
01381
01382 virtual void SetAdaptiveDegDisplayModeBox(BOOL bMode) = 0;
01383
01385
01386 virtual BOOL GetAdaptiveDegDisplayModePoint() = 0;
01388
01389 virtual void SetAdaptiveDegDisplayModePoint(BOOL bMode) = 0;
01390
01392
01393 virtual BOOL GetAdaptiveDegDisplayModeHide() = 0;
01395
01396 virtual void SetAdaptiveDegDisplayModeHide(BOOL bMode) = 0;
01397
01399
01401 virtual BOOL GetAdaptiveDegDrawBackface() = 0;
01403
01405 virtual void SetAdaptiveDegDrawBackface(BOOL bDraw) = 0;
01406
01408
01410 virtual BOOL GetAdaptiveDegNeverDegradeSelected() = 0;
01412
01414 virtual void SetAdaptiveDegNeverDegradeSelected(BOOL bNeverDegrade) = 0;
01415
01417
01419 virtual BOOL GetAdaptiveDegDegradeLight() = 0;
01421
01423 virtual void SetAdaptiveDegDegradeLight(BOOL bDegradeLight) = 0;
01424
01426
01429 virtual BOOL GetAdaptiveDegNeverRedrawAfterDegrade() = 0;
01431
01434 virtual void SetAdaptiveDegNeverRedrawAfterDegrade(BOOL bNeverRedraw) = 0;
01435
01437
01439 virtual float GetAdaptiveDegCameraDistancePriority() = 0;
01441
01443 virtual void SetAdaptiveDegCameraDistancePriority(float fPriority) = 0;
01444
01446
01448 virtual float GetAdaptiveDegScreenSizePriority() = 0;
01450
01452 virtual void SetAdaptiveDegScreenSizePriority(float fPriority) = 0;
01453
01455
01457 virtual int GetAdaptiveDegMinSize() = 0;
01459
01461 virtual void SetAdaptiveDegMinSize(int iMinSize) = 0;
01462
01463
01464
01465
01466 };
01467
01469
01479 class ViewExp11 : public ViewExp10
01480 {
01481 public:
01483 virtual ~ViewExp11() { }
01484
01486
01487
01488
01490 virtual BOOL IsDegrading() =0;
01491
01492 };
01493
01495 class DeviceRect : public MaxHeapOperators
01496 {
01497 public:
01498 DeviceRect() : top(0.0f), left(0.0f), bottom(0.0f), right(0.0f) {}
01499 float top;
01500 float left;
01501 float bottom;
01502 float right;
01503 };
01504
01506
01515 class ViewExp13 : public ViewExp11
01516 {
01517 public:
01519 virtual ~ViewExp13() { }
01520
01522
01523 virtual BOOL GetSingleDefaultLight() = 0;
01524
01526
01527 virtual void UpdateLabel() = 0;
01528
01530
01531 virtual float GetZoom() = 0;
01532
01534
01535 virtual float GetHither() = 0;
01536
01538
01539 virtual float GetYon() = 0;
01540
01542
01544 virtual DeviceRect GetRegionDeviceRect() = 0;
01545
01547
01549 virtual void SetRegionDeviceRect(DeviceRect r) = 0;
01550
01552
01554 virtual DeviceRect GetBlowupDeviceRect() = 0;
01555
01557
01559 virtual void SetBlowupDeviceRect(DeviceRect r) = 0;
01560
01562
01564 virtual DeviceRect GetSelDeviceRect(TimeValue t) = 0;
01565
01567
01568 virtual void SetEdgedFaces(int md) = 0;
01569
01571
01572 virtual int GetEdgedFaces(void) = 0;
01573 };
01574
01575
01576
01577 #define CREATE_CONTINUE 1
01578 #define CREATE_STOP 0 // creation terminated normally
01579 #define CREATE_ABORT -1 // delete the created object and node
01580
01581
01582
01583
01584
01585 #define MOUSE_STOP 0
01586 #define MOUSE_CONTINUE 1
01587 #define MOUSE_CAPTURE_CONTINUE 2
01588
01589
01590
01591
01592
01598 class CreateMouseCallBack: public MaxHeapOperators {
01599 public:
01601 virtual ~CreateMouseCallBack() {}
01645 virtual int proc(
01646 ViewExp *vpt,
01647 int msg,
01648 int point,
01649 int flags,
01650 IPoint2 m,
01651 Matrix3& mat
01652 )=0;
01687 virtual int override(int mode) { return mode; }
01688
01689
01701 virtual BOOL StartNewCreation() { return TRUE; }
01702
01703
01704
01710 virtual BOOL TolerateOrthoMode() { return FALSE; }
01711 };
01712
01713
01714 class Object;
01715 class ConstObject;
01716 class MouseCallBack;
01717 class IObjCreate;
01718 class IObjParam;
01719 class ModContext;
01720 class ModContextList;
01721 class INodeTab;
01722
01723
01724 #define VIEWPORT_BKG_START 0
01725 #define VIEWPORT_BKG_END 1
01726
01727
01728 #define VIEWPORT_BKG_BLANK 0
01729 #define VIEWPORT_BKG_HOLD 1
01730 #define VIEWPORT_BKG_LOOP 2
01731
01732
01733 #define VIEWPORT_BKG_ASPECT_VIEW 0
01734 #define VIEWPORT_BKG_ASPECT_BITMAP 1
01735 #define VIEWPORT_BKG_ASPECT_OUTPUT 2
01736
01737
01738
01739 #define MOVE_BUTTON 1
01740 #define ROTATE_BUTTON 2
01741 #define NUSCALE_BUTTON 3
01742 #define USCALE_BUTTON 4
01743 #define SQUASH_BUTTON 5
01744 #define SELECT_BUTTON 6
01745
01746
01747 #define AXIS_XY 2
01748 #define AXIS_ZX 1
01749 #define AXIS_YZ 0
01750 #define AXIS_X 3
01751 #define AXIS_Y 4
01752 #define AXIS_Z 5
01753
01754
01755 #ifndef NO_THREE_POINT_ALIGN
01756
01757 #define XAXIS_TPA_PGIZMO 7
01758 #define XAXIS_TPA_NGIZMO 8
01759 #define YAXIS_TPA_PGIZMO 9
01760 #define YAXIS_TPA_NGIZMO 10
01761 #define ZAXIS_TPA_PGIZMO 11
01762 #define ZAXIS_TPA_NGIZMO 12
01763 #endif
01764
01765 #define ORIGIN_LOCAL 0 // Object's pivot
01766 #define ORIGIN_SELECTION 1 // Center of selection set (or center of individual object for local or parent space)
01767 #define ORIGIN_SYSTEM 2 // Center of the reference coord. system
01768
01769
01770 #define COORDS_HYBRID 0
01771 #define COORDS_SCREEN 1
01772 #define COORDS_WORLD 2
01773 #define COORDS_PARENT 3
01774 #define COORDS_LOCAL 4
01775 #define COORDS_OBJECT 5
01776 #define COORDS_GIMBAL 6
01777 #define COORDS_WORKINGPIVOT 7
01778
01779
01780 #define TASK_MODE_CREATE 1
01781 #define TASK_MODE_MODIFY 2
01782 #define TASK_MODE_HIERARCHY 3
01783 #define TASK_MODE_MOTION 4
01784 #define TASK_MODE_DISPLAY 5
01785 #define TASK_MODE_UTILITY 6
01786
01787
01788 #define SYSCUR_MOVE 1
01789 #define SYSCUR_ROTATE 2
01790 #define SYSCUR_USCALE 3
01791 #define SYSCUR_NUSCALE 4
01792 #define SYSCUR_SQUASH 5
01793 #define SYSCUR_SELECT 6
01794 #define SYSCUR_DEFARROW 7
01795 #define SYSCUR_MOVE_SNAP 8
01796
01797
01798 #define REDRAW_BEGIN (1<<0)
01799 #define REDRAW_INTERACTIVE (1<<1)
01800 #define REDRAW_END (1<<2)
01801 #define REDRAW_NORMAL (1<<3)
01802
01803
01804 #define NUMAXIS_ZERO 0 // Nothing to transform
01805 #define NUMAXIS_ALL 1 // Use only one axis.
01806 #define NUMAXIS_INDIVIDUAL 2 // Do all, one at a time
01807
01818 #define APP_FONT_DIR 0
01819
01824 #define APP_SCENE_DIR 1
01825
01830 #define APP_IMPORT_DIR 2
01831
01836 #define APP_EXPORT_DIR 3
01837
01841 #define APP_HELP_DIR 4
01842
01847 #define APP_EXPRESSION_DIR 5
01848
01853 #define APP_PREVIEW_DIR 6
01854
01859 #define APP_IMAGE_DIR 7
01860
01865 #define APP_SOUND_DIR 8
01866
01871 #define APP_PLUGCFG_DIR 9
01872
01877 #define APP_MAXSTART_DIR 10
01878
01883 #define APP_VPOST_DIR 11
01884
01889 #define APP_DRIVERS_DIR 12
01890
01894 #define APP_AUTOBACK_DIR 13
01895
01900 #define APP_MATLIB_DIR 14
01901
01906 #define APP_SCRIPTS_DIR 15
01907
01913 #define APP_STARTUPSCRIPTS_DIR 16
01914
01918 #define APP_MARKETDEFAULTS_DIR 17
01919
01924 #define APP_RENDER_PRESETS_DIR 18
01925
01926 #ifndef RENDER_VER_CONFIG_PATHS // xavier robitaille | 03.01.24 | modify kahn's config. paths
01927 #define APP_DIR_OFFSET 0
01928
01929 #else // RENDER_VER_CONFIG_PATHS
01930 #define APP_DIR_OFFSET 1
01931
01936 #define APP_PLUGCFG_CATALOGS_DIR 19
01937
01938 #endif // RENDER_VER_CONFIG_PATHS
01939
01944 #define APP_UI_DIR (APP_DIR_OFFSET + 19)
01945
01964 #define APP_MAX_SYS_ROOT_DIR (APP_DIR_OFFSET + 20)
01965
01971 #define APP_RENDER_OUTPUT_DIR (APP_DIR_OFFSET + 21)
01972
01977 #define APP_ANIMATION_DIR (APP_DIR_OFFSET + 22)
01978
01983 #define APP_ARCHIVES_DIR (APP_DIR_OFFSET + 23)
01984
01989 #define APP_PHOTOMETRIC_DIR (APP_DIR_OFFSET + 24)
01990
01995 #define APP_RENDER_ASSETS_DIR (APP_DIR_OFFSET + 25)
01996
02001 #define APP_USER_SCRIPTS_DIR (APP_DIR_OFFSET + 26)
02002
02007 #define APP_USER_MACROS_DIR (APP_DIR_OFFSET + 27)
02008
02015 #define APP_USER_STARTUPSCRIPTS_DIR (APP_DIR_OFFSET + 28)
02016
02022 #define APP_TEMP_DIR (APP_DIR_OFFSET + 29)
02023
02030 #define APP_USER_ICONS_DIR (APP_DIR_OFFSET + 30)
02031
02037 #define APP_MAXDATA_DIR (APP_DIR_OFFSET + 31)
02038
02043 #define APP_PROJECT_FOLDER_DIR (APP_DIR_OFFSET + 32)
02044
02049 #define APP_DOWNLOAD_DIR (APP_DIR_OFFSET + 33)
02050
02055 #define APP_PROXIES_DIR (APP_DIR_OFFSET + 34)
02056
02062 #define APP_MANAGED_ASSEMBLIES_DIR (APP_DIR_OFFSET + 35)
02063
02068 #define APP_PAGE_FILE_DIR (APP_DIR_OFFSET + 36)
02069
02075 #define APP_SHADER_CACHE_DIR (APP_DIR_OFFSET + 37)
02076
02077
02079
02080
02081
02082 #define STATUS_UNIVERSE 1
02083 #define STATUS_SCALE 2
02084 #define STATUS_ANGLE 3
02085 #define STATUS_OTHER 4
02086 #define STATUS_UNIVERSE_RELATIVE 5
02087 #define STATUS_POLAR 6
02088 #define STATUS_POLAR_RELATIVE 7
02089
02090
02095 #define EXT_DISP_NONE 0 //!< no flags
02096 #define EXT_DISP_SELECTED (1<<0) //!< object is selected
02097 #define EXT_DISP_TARGET_SELECTED (1<<1) //!< object's target is selected
02098 #define EXT_DISP_LOOKAT_SELECTED (1<<2) //!< object's lookat node is selected
02099 #define EXT_DISP_ONLY_SELECTED (1<<3) //!< object is only thing selected
02100 #define EXT_DISP_DRAGGING (1<<4) //!< object is being "dragged"
02101 #define EXT_DISP_ZOOM_EXT (1<<5) //!< object is being tested for zoom ext
02102 #define EXT_DISP_GROUP_EXT (1<<6) //!< object is being tested for extents as member of group
02103 #define EXT_DISP_ZOOMSEL_EXT (1<<7) //!< object is being tested for zoom selected ext
02104
02105
02106
02107 #define REND_TIMESINGLE 0
02108 #define REND_TIMESEGMENT 1
02109 #define REND_TIMERANGE 2
02110 #define REND_TIMEPICKUP 3
02111
02112
02113 #define HIDE_OBJECTS 0x0001
02114 #define HIDE_SHAPES 0x0002
02115 #define HIDE_LIGHTS 0x0004
02116 #define HIDE_CAMERAS 0x0008
02117 #define HIDE_HELPERS 0x0010
02118 #define HIDE_WSMS 0x0020
02119 #define HIDE_SYSTEMS 0x0040
02120 #define HIDE_PARTICLES 0x0080
02121 #define HIDE_BONEOBJECTS 0x0100
02122 #define HIDE_ALL 0xffff
02123 #define HIDE_NONE 0
02124
02125
02126
02127
02128
02129
02130
02131
02132
02133
02134 #define VP_LAYOUT_1 0x0001
02135 #define VP_LAYOUT_2V 0x0012
02136 #define VP_LAYOUT_2H 0x0022
02137 #define VP_LAYOUT_2HT 0x0032
02138 #define VP_LAYOUT_2HB 0x0042
02139 #define VP_LAYOUT_3VL 0x0033
02140 #define VP_LAYOUT_3VR 0x0043
02141 #define VP_LAYOUT_3HT 0x0053
02142 #define VP_LAYOUT_3HB 0x0063
02143 #define VP_LAYOUT_4 0x0074
02144 #define VP_LAYOUT_4VL 0x0084
02145 #define VP_LAYOUT_4VR 0x0094
02146 #define VP_LAYOUT_4HT 0x00a4
02147 #define VP_LAYOUT_4HB 0x00b4
02148 #define VP_LAYOUT_1C 0x00c1
02149 #define VP_NUM_VIEWS_MASK 0x000f
02150
02154 #define ATTRIB_HIDE 0 //!< If set, node is not visible in the viewport
02155 #define ATTRIB_FREEZE 1 //!< If set, node is frozen
02156 #define ATTRIB_BOXMODE 2 //!< If set, node is displayed as box
02157 #define ATTRIB_BACKCULL 3 //!< If set (default), faces with normals pointing away from the camera are not displayed. Applies only in wireframe viewport shading modes
02158 #define ATTRIB_ALLEDGES 4 //!< If set, all edges including hidden ones and polygon diagonals are displayed. Applies to all viewport shading modes where the edges are drawn
02159 #define ATTRIB_LINKDISP 5 //!< If set, a wireframe representation of any hierarchical link (parent\child, etc) to the node is displayed
02160 #define ATTRIB_LINKREPL 6 //!< If set, the wireframe representation of the hierarchical link is displayed instead of the node
02161 #define ATTRIB_UNSEL 7 //!< for internal use only; something is not selected
02162 #define ATTRIB_HIDE_UNSEL 8 //!< for internal use only
02163 #define ATTRIB_FREEZE_UNSEL 9 //!< for internal use only
02164 #define ATTRIB_VERTTICKS 10 //!< If set, the vertices of the object are displayed as tick marks
02165 #define ATTRIB_UNHIDE 11 //!< for internal use only
02166 #define ATTRIB_UNFREEZE 12 //!< for internal use only
02167 #define ATTRIB_CVERTS 13 //!< If set, the display of vertex color channel is enabled
02168 #define ATTRIB_SHADE_CVERTS 14 //!< If set, the vertex color is shaded if the viewport is in a shaded display mode
02169 #define ATTRIB_XRAY 15 //!< If set, makes the object translucent in the viewport
02170 #define ATTRIB_IGNORE_EXT 16 //!< if set, the object is ignored by the Zoom Extents operation
02171 #define ATTRIB_TRAJECTORY 17 //!< if set, the object's trajectory is displayed
02172 #define ATTRIB_FRZMTL 18 //!< set, the object turns gray when it's frozen
02173
02174 #define ATTRIB_HIDE_WITH_LAYER 19 //!< if set, the hide\unhide operation applies the whole layer the object is on
02175
02176 #define ATTRIB_FREEZE_WITH_LAYER 20 //!< if set, the freeze\unfreeze operation applies to the whole layer the object is on
02177 #define ATTRIB_INHERITVISIBILITY 100 //!< if set, the object inherits a percentage of its visibility from its parent
02178 #define ATTRIB_CASTSHADOWS 101 //!< If set, the object can cast shadows
02179 #define ATTRIB_RECEIVESHADOWS 102 //!< If set, the object can receive shadows
02180 #define ATTRIB_ISTARGET 103 //!< If set, the object is marked as the target of another object. Same as Inode::SetIsTarget(BOOL b)
02181 #define ATTRIB_RENDERABLE 104 //!< If set, the object is rendered
02182 #define ATTRIB_RENDEROCCLUDED 105 //!< If set, the object becomes transparent from the point of view of special effects, thus the objects being occluded are affected by the special effects
02183 #define ATTRIB_RCVCAUSTICS 106 //!< If set, the object can receive caustics
02184 #define ATTRIB_GENERATECAUSTICS 107 //!< If set, the object can generate caustics
02185 #define ATTRIB_RCVGLOBALILLUM 108 //!< If set, the object can receive global illumination
02186 #define ATTRIB_GENERATEGLOBALILLUM 109 //!< If set, the object can generate global illumination
02187 #define ATTRIB_SETWIRECOLOR 110 //!< If set, the supplied wire frame color is set on to the object
02188 #define ATTRIB_SETGBUFID 111 //!< If set, tags an object as target for a render effect based on the supplied G-buffer channel
02189 #define ATTRIB_PRIMARYVISIBILITY 112 //!< If set, the object is visible to cameras to an extent specified by the visibility parameter
02190 #define ATTRIB_SECONDARYVISIBILITY 113 //!< If set, the object appears in rendered reflections and refractions
02191 #define ATTRIB_MOTIONBLUR 114 //!< If set, motion blur is enabled for the object
02192
02193
02194
02208 #define I_EXEC_REGISTER_POSTSAVE_CB 1001 //!< Registers a callback which is called after a File / Save operation has occured.
02209 #define I_EXEC_UNREGISTER_POSTSAVE_CB 1002 //!< Un-registers a callback which is called after a File / Save operation has occured.
02210 #define I_EXEC_REGISTER_PRESAVE_CB 1003 //!< Registers a callback which is called before a File / Save operation has occured.
02211 #define I_EXEC_UNREGISTER_PRESAVE_CB 1004 //!< Un-registers a callback which is called before a File / Save operation has occured.
02212
02213
02214 class GenericCallback: public MaxHeapOperators {
02215 public:
02216 virtual ~GenericCallback() {}
02217 virtual void Callme()=0;
02218 };
02219
02220
02225 class TimeChangeCallback: public MaxHeapOperators {
02226 public:
02228 virtual ~TimeChangeCallback() {}
02236 virtual void TimeChanged(TimeValue t)=0;
02237 };
02238
02239
02240
02245 class CommandModeChangedCallback: public MaxHeapOperators {
02246 public:
02248 virtual ~CommandModeChangedCallback() {}
02256 virtual void ModeChanged(CommandMode *oldM, CommandMode *newM)=0;
02257 };
02258
02259
02260
02271 class ViewportDisplayCallback: public InterfaceServer {
02272 public:
02274 virtual ~ViewportDisplayCallback() {}
02284 virtual void Display(TimeValue t, ViewExp *vpt, int flags)=0;
02294 virtual void GetViewportRect( TimeValue t, ViewExp *vpt, Rect *rect )=0;
02309 virtual BOOL Foreground()=0;
02310 };
02311
02313
02318 class ExitMAXCallback: public MaxHeapOperators {
02319 public:
02321 virtual ~ExitMAXCallback() {}
02325 virtual BOOL Exit(HWND hWnd)=0;
02326 };
02327
02329
02334 class ExitMAXCallback2 : public ExitMAXCallback {
02335 public:
02337
02339 virtual void CrashRecoverExit(HWND hWnd)=0;
02340 };
02341
02343
02347 class CreateRendImgSeqCallback: public MaxHeapOperators {
02348 public:
02350 virtual ~CreateRendImgSeqCallback() {}
02352
02356 virtual BOOL CreateRendImgSeq( MSTR& filename, int objType, void* objPtr )=0;
02357 };
02358
02363 class MAXFileOpenDialog: public MaxHeapOperators {
02364 public:
02366 virtual ~MAXFileOpenDialog() {}
02377 virtual BOOL BrowseMAXFileOpen(MSTR& fileName, MSTR* defDir, MSTR* defFile) = 0;
02378 };
02379
02384 class MAXFileSaveDialog: public MaxHeapOperators {
02385 public:
02387 virtual ~MAXFileSaveDialog() {}
02395 virtual BOOL BrowseMAXFileSave(MSTR& fileName) = 0;
02396 };
02397
02398
02403 class TrackViewFilter : public InterfaceServer{
02404 public:
02405
02417 virtual BOOL proc(Animatable *anim, Animatable *client, int subNum)=0;
02434 virtual BOOL TextColor(Animatable *anim, Animatable *client, int subNum, COLORREF& color)
02435 {
02436 UNUSED_PARAM(anim);
02437 UNUSED_PARAM(client);
02438 UNUSED_PARAM(subNum);
02439 UNUSED_PARAM(color);
02440 return FALSE;
02441 }
02442 };
02443
02444
02454 class TrackViewPick: public MaxHeapOperators {
02455 public:
02456 ReferenceTarget *anim;
02457 ReferenceTarget *client;
02458 int subNum;
02459
02460 TrackViewPick() {anim=NULL;client=NULL;subNum=0;}
02461 };
02462
02463
02468 #pragma warning(push)
02469 #pragma warning(disable:4100)
02470 class PickModeCallback : public InterfaceServer
02471 {
02472 public:
02473
02497 virtual BOOL HitTest(IObjParam *ip,HWND hWnd,ViewExp *vpt,IPoint2 m,int flags)=0;
02498
02499
02500
02514 virtual BOOL Pick(IObjParam *ip,ViewExp *vpt)=0;
02515
02516
02517
02518
02530 virtual BOOL PickAnimatable(Animatable* anim) { return TRUE; }
02531
02532
02533
02546 virtual BOOL RightClick(IObjParam *ip,ViewExp *vpt) { return FALSE; }
02547
02548
02554 virtual void EnterMode(IObjParam *ip) {}
02560 virtual void ExitMode(IObjParam *ip) {}
02561
02566 virtual HCURSOR GetDefCursor(IObjParam *ip) {return NULL;}
02571 virtual HCURSOR GetHitCursor(IObjParam *ip) {return NULL;}
02572
02573
02574
02581 virtual PickNodeCallback *GetFilter() {return NULL;}
02582
02583
02584
02591 virtual BOOL AllowMultiSelect() {return FALSE;}
02592 };
02593
02594 #pragma warning(pop)
02595
02596
02601 class PickNodeCallback: public MaxHeapOperators {
02602 public:
02604 virtual ~PickNodeCallback() {;}
02605
02612 virtual BOOL Filter(INode *node)=0;
02613 };
02614
02622 class PickClassCallback : public MaxHeapOperators
02623 {
02624 public:
02626 virtual ~PickClassCallback() {;}
02628
02631 virtual bool IsValidClassDesc(ClassDesc *candidateClassDesc) = 0;
02632 };
02633
02634
02639 #pragma warning(push)
02640 #pragma warning(disable:4100)
02641 class HitByNameDlgCallback : public MaxHeapOperators
02642 {
02643 public:
02645 virtual ~HitByNameDlgCallback() {}
02649 virtual MCHAR *dialogTitle() { return _M(""); }
02653 virtual MCHAR *buttonText() { return _M(""); }
02658 virtual BOOL singleSelect() { return FALSE; }
02664 virtual BOOL useFilter() { return TRUE; }
02676 virtual int filter(INode *node) { return TRUE; }
02685 virtual BOOL useProc() { return TRUE; }
02696 virtual void proc(INodeTab &nodeTab) {}
02704 virtual BOOL doCustomHilite() { return FALSE; }
02714 virtual BOOL doHilite(INode *node) { return FALSE; }
02723 virtual BOOL showHiddenAndFrozen() { return FALSE; }
02724 };
02725
02726
02727 #pragma warning(pop)
02728
02733 class SelectFilterCallback : public InterfaceServer
02734 {
02735 public:
02738 virtual MCHAR* GetName() = 0;
02739
02740
02741
02751 virtual BOOL IsFiltered(SClass_ID sid, Class_ID cid, INode *node) = 0;
02752 };
02753
02754
02755
02756
02757
02767 class DisplayFilterCallback : public InterfaceServer
02768 {
02769 public:
02770 BOOL on;
02773 virtual MCHAR* GetName() = 0;
02774
02775
02776
02786 virtual BOOL IsVisible(SClass_ID sid, Class_ID cid, INode *node) = 0;
02787 };
02788
02789
02790 class Interface;
02791
02792
02797 class RedrawViewsCallback: public MaxHeapOperators {
02798 public:
02800 virtual ~RedrawViewsCallback() {}
02801
02807 virtual void proc(Interface *ip)=0;
02808 };
02809
02810
02815 class AxisChangeCallback: public MaxHeapOperators {
02816 public:
02818 virtual ~AxisChangeCallback() {}
02819
02829 virtual void proc(Interface *ip)=0;
02830 };
02831
02832
02885 class PreviewParams: public MaxHeapOperators {
02886 public:
02887 BOOL outputType;
02888 int pctSize;
02889
02890 int start;
02891 int end;
02892 int skip;
02893
02894 int fps;
02895
02896 BOOL dspGeometry;
02897 BOOL dspShapes;
02898 BOOL dspLights;
02899 BOOL dspCameras;
02900 BOOL dspHelpers;
02901 BOOL dspSpaceWarps;
02902 BOOL dspGrid;
02903 BOOL dspSafeFrame;
02904 BOOL dspFrameNums;
02905
02906 int rndLevel;
02907
02908 int dspBkg;
02909 };
02910
02911
02912 #define VPT_TRANS_NONE 0
02913 #define VPT_TRANS_STIPPLE 1
02914 #define VPT_TRANS_BLEND 2
02915 #define VPT_TRANS_SORT_BLEND 3
02916
02917
02918 #define DISPLAY_WIRE_AS_MTL 1
02919 #define DISPLAY_SHADED_AS_MTL (1<<1)
02920 #define DISPLAY_SELECTED_ONLY (1<<2)
02921
02925
02926 #define PICKTRACK_FLAG_ANIMATED (1<<0)
02927
02928 #define PICKTRACK_FLAG_VISTRACKS (1<<1)
02929
02930 #define PICKTRACK_FLAG_SELOBJECTS (1<<2)
02931
02932 #define PICKTRACK_FLAG_WORLDMODS (1<<3)
02933
02934 #define PICKTRACK_FLAG_OBJECTMODS (1<<4)
02935
02936 #define PICKTRACK_FLAG_TRANSFORM (1<<5)
02937
02938 #define PICKTRACK_FLAG_BASEPARAMS (1<<6)
02939
02940 #define PICKTRACK_FLAG_CONTTYPES (1<<7)
02941
02942 #define PICKTRACK_FLAG_NOTETRACKS (1<<8)
02943
02944 #define PICKTRACK_FLAG_SOUND (1<<9)
02945
02946 #define PICKTRACK_FLAG_MATMAPS (1<<10)
02947
02948 #define PICKTRACK_FLAG_MATPARAMS (1<<11)
02949
02950 #define PICKTRACK_FLAG_VISIBLE_OBJS (1<<12)
02951
02952 #define PICKTRACK_FLAG_HIERARCHY (1<<13)
02953
02954 #define PICKTRACK_FLAG_KEYABLE (1<<14)
02955
02956 #define PICKTRACK_FLAG_NODES (1<<15)
02957
02958 #define PICKTRACK_FLAG_GEOM (1<<16)
02959
02960 #define PICKTRACK_FLAG_SHAPES (1<<17)
02961
02962 #define PICKTRACK_FLAG_LIGHTS (1<<18)
02963
02964 #define PICKTRACK_FLAG_CAMERAS (1<<19)
02965
02966 #define PICKTRACK_FLAG_HELPERS (1<<20)
02967
02968 #define PICKTRACK_FLAG_WARPS (1<<21)
02969
02970 #define PICKTRACK_FLAG_POSITION (1<<22)
02971
02972 #define PICKTRACK_FLAG_ROTATION (1<<23)
02973
02974 #define PICKTRACK_FLAG_SCALE (1<<24)
02975
02976 #define PICKTRACK_FLAG_BONES (1<<25)
02977
02978 #define PICKTRACK_FLAG_FOCUS_SEL_NODES (1<<26)
02979
02980 #define PICKTRACK_FLAG_ACTIVELAYER (1<<27)
02981
02982 #define PICKTRACK_FLAG_LOCKED (1<<28)
02983
02984
02985 #define MAIN_MAX_INTERFACE Interface_ID(0x64854123, 0x7b9e551c)
02986
02987
03007 #pragma warning(push)
03008 #pragma warning(disable:4100)
03009 class Interface : public FPStaticInterface {
03010 public:
03015 virtual HFONT GetAppHFont()=0;
03040 virtual void RedrawViews(TimeValue t,DWORD vpFlags=REDRAW_NORMAL, ReferenceTarget *change=NULL)=0;
03047 virtual BOOL SetActiveViewport(HWND hwnd)=0;
03051 virtual ViewExp *GetActiveViewport()=0;
03054 virtual IObjCreate *GetIObjCreate()=0;
03057 virtual IObjParam *GetIObjParam()=0;
03059 virtual HWND GetMAXHWnd()=0;
03060
03061
03062
03063
03073 virtual void ForceCompleteRedraw(BOOL doDisabled=TRUE)=0;
03074
03075
03076
03077
03082 virtual BOOL DisplayActiveCameraViewWithMultiPassEffect() = 0;
03083
03084
03085
03086
03087
03088 virtual BOOL SetActiveViewportTransparencyDisplay(int transType) = 0;
03089
03091
03101 virtual void DisableSceneRedraw() = 0;
03102
03104
03114 virtual void EnableSceneRedraw() = 0;
03115
03117
03122 virtual int IsSceneRedrawDisabled() = 0;
03123
03124
03125 class SuspendSceneRedrawGuard;
03126
03127
03128
03137 virtual void RegisterRedrawViewsCallback(RedrawViewsCallback *cb)=0;
03143 virtual void UnRegisterRedrawViewsCallback(RedrawViewsCallback *cb)=0;
03144
03145
03146
03152 virtual void RegisterSelectFilterCallback(SelectFilterCallback *cb)=0;
03158 virtual void UnRegisterSelectFilterCallback(SelectFilterCallback *cb)=0;
03159
03160
03161
03162
03169 virtual void RegisterDisplayFilterCallback(DisplayFilterCallback *cb)=0;
03175 virtual void UnRegisterDisplayFilterCallback(DisplayFilterCallback *cb)=0;
03176
03177
03178
03179
03180
03181
03182
03183
03184
03185
03186 virtual BOOL SetSelectionType(BOOL autoWinCross, int winCrossOrAutoDir) = 0;
03187
03188
03189
03190
03200 virtual void MakeExtendedViewportActive(HWND hWnd)=0;
03221 virtual void PutUpViewMenu(HWND hWnd, POINT pt)=0;
03222
03223
03268 virtual BOOL TrackViewPickDlg(HWND hParent, TrackViewPick *res, TrackViewFilter *filter=NULL, DWORD flags=0)=0;
03269
03286 virtual BOOL TrackViewPickMultiDlg(HWND hParent, Tab<TrackViewPick> *res, TrackViewFilter *filter=NULL,DWORD flags=0)=0;
03287
03288
03300 virtual void PushCommandMode( CommandMode *m )=0;
03307 virtual void SetCommandMode( CommandMode *m )=0;
03309 virtual void PopCommandMode()=0;
03311 virtual CommandMode* GetCommandMode()=0;
03320 virtual void SetStdCommandMode( int cid )=0;
03327 virtual void PushStdCommandMode( int cid )=0;
03337 virtual void RemoveMode( CommandMode *m )=0;
03350 virtual void DeleteMode( CommandMode *m )=0;
03351
03352
03353
03354
03367 virtual void SetPickMode(PickModeCallback *pc)=0;
03368
03369
03372 virtual void ClearPickMode()=0;
03373
03374
03375
03376
03380 virtual PickModeCallback* GetCurPickMode()=0;
03381
03382
03383
03384
03398 virtual BOOL DoHitByNameDialog(HitByNameDlgCallback *hbncb=NULL)=0;
03399
03400
03405 virtual void PushPrompt( MCHAR *s )=0;
03408 virtual void PopPrompt()=0;
03413 virtual void ReplacePrompt( MCHAR *s )=0;
03422 virtual void DisplayTempPrompt( MCHAR *s, int msec=1000)=0;
03424 virtual void RemoveTempPrompt()=0;
03425
03426
03427
03428
03429
03430
03446 virtual void ChooseDirectory(HWND hWnd, MCHAR *title, MCHAR *dir, MCHAR *desc=NULL)=0;
03447
03448
03450 virtual float GetAutoBackupTime()=0;
03455 virtual void SetAutoBackupTime(float minutes)=0;
03457 virtual BOOL AutoBackupEnabled()=0;
03462 virtual void EnableAutoBackup(BOOL onOff)=0;
03463
03464
03565 virtual BOOL ProgressStart(MCHAR *title, BOOL dispBar, LPTHREAD_START_ROUTINE fn, LPVOID arg)=0;
03584 virtual void ProgressUpdate(int pct, BOOL showPct = TRUE, MCHAR *title = NULL)=0;
03587 virtual void ProgressEnd()=0;
03592 virtual BOOL GetCancel()=0;
03609 virtual void SetCancel(BOOL sw)=0;
03610
03611
03612
03621 virtual void CreatePreview(PreviewParams *pvp=NULL)=0;
03622
03623
03627 virtual float GetGridSpacing()=0;
03631 virtual int GetGridMajorLines()=0;
03632
03633
03634
03635
03639 virtual void DisableStatusXYZ()=0;
03643 virtual void EnableStatusXYZ()=0;
03659 virtual void SetStatusXYZ(Point3 xyz,int type)=0;
03665 virtual void SetStatusXYZ(AngAxis aa)=0;
03666
03667
03673 virtual void SetExtendedDisplayMode(int flags)=0;
03681 virtual int GetExtendedDisplayMode()=0;
03682
03683
03691 virtual void SetFlyOffTime(int msecs)=0;
03694 virtual int GetFlyOffTime()=0;
03695
03696
03706 virtual HCURSOR GetSysCursor( int id )=0;
03707
03708
03709
03710
03712 virtual void SetCrossHairCur(BOOL onOff)=0;
03714 virtual BOOL GetCrossHairCur()=0;
03715
03716
03717
03718 virtual void RealizeParamPanel()=0;
03719
03720
03756 virtual float SnapAngle(float angleIn, BOOL fastSnap=TRUE, BOOL forceSnap=FALSE)=0;
03757
03758
03765 virtual float SnapPercent(float percentIn)=0;
03766
03767
03770 virtual BOOL GetSnapState()=0;
03771
03772
03777 virtual int GetSnapMode()=0;
03778
03779
03780
03790 virtual BOOL SetSnapMode(int mode)=0;
03791
03792
03793
03806 virtual INode *PickNode(HWND hWnd,IPoint2 pt,PickNodeCallback *filt=NULL)=0;
03807
03808
03809
03825 virtual void BoxPickNode(ViewExp *vpt,IPoint2 *pt,BOOL crossing,PickNodeCallback *filt=NULL)=0;
03842 virtual void CirclePickNode(ViewExp *vpt,IPoint2 *pt,BOOL crossing,PickNodeCallback *filt=NULL)=0;
03862 virtual void FencePickNode(ViewExp *vpt,IPoint2 *pt,BOOL crossing,PickNodeCallback *filt=NULL)=0;
03863
03864
03865
03866
03867
03868
03869
03870
03871
03872
03873
03897 virtual void RegisterSubObjectTypes( const MCHAR **types, int count,
03898 int startIndex = 0)=0;
03899
03900
03901
03911 virtual void AppendSubObjectNamedSelSet(const MCHAR *set)=0;
03912
03913
03916 virtual void ClearSubObjectNamedSelSets()=0;
03917
03918
03921 virtual void ClearCurNamedSelSet()=0;
03922
03923
03929 virtual void SetCurNamedSelSet(MCHAR *setName)=0;
03930
03931
03932
03945 virtual void NamedSelSetListChanged()=0;
03946
03947
03948
03954 virtual int GetSubObjectLevel()=0;
03955
03956
03957
03958
03959
03960
03974 virtual void SetSubObjectLevel(int level, BOOL force = FALSE)=0;
03975
03976
03981 virtual int GetNumSubObjectLevels()=0;
03982
03983
03984
03985
03992 virtual void EnableSubObjectSelection(BOOL enable)=0;
03999 virtual BOOL IsSubObjectSelectionEnabled()=0;
04000
04001
04017 virtual void PipeSelLevelChanged()=0;
04018
04019
04020
04027 virtual void GetPipelineSubObjLevel(DWORDTab& levels)=0;
04028
04029
04030
04045 virtual void GetModContexts(ModContextList& list, INodeTab& nodes)=0;
04046
04047
04048
04051 virtual BaseObject* GetCurEditObject()=0;
04052
04053
04073 virtual int SubObHitTest(TimeValue t, int type, int crossing,
04074 int flags, IPoint2 *p, ViewExp *vpt)=0;
04075
04076
04081 virtual BOOL SelectionFrozen()=0;
04083 virtual void FreezeSelection()=0;
04085 virtual void ThawSelection()=0;
04086
04087
04096 virtual INode *GetSelNode(int i)=0;
04098 virtual int GetSelNodeCount()=0;
04099
04100
04109 virtual void EnableShowEndResult(BOOL enabled)=0;
04112 virtual BOOL GetShowEndResult ()=0;
04118 virtual void SetShowEndResult (BOOL show)=0;
04119
04120
04124 virtual BOOL GetCrossing()=0;
04125
04126
04127
04140 virtual void SetToolButtonState(int button, BOOL state )=0;
04141 virtual BOOL GetToolButtonState(int button)=0;
04142 virtual void EnableToolButton(int button, BOOL enable=TRUE )=0;
04143
04144
04145 virtual void EnableUndo(BOOL enable)=0;
04146
04147
04157 virtual int GetCommandPanelTaskMode()=0;
04168 virtual void SetCommandPanelTaskMode(int mode)=0;
04169
04170
04176 virtual ViewExp *GetViewport( HWND hwnd )=0;
04183 virtual void ReleaseViewport( ViewExp *vpt )=0;
04184
04185
04199 virtual void EnableAnimateButton(BOOL enable)=0;
04202 virtual BOOL IsAnimateEnabled()=0;
04203
04204
04209 virtual void SetAnimateButtonState(BOOL onOff)=0;
04210
04211
04212
04213
04214
04215
04216
04217
04218
04219
04220
04221
04222
04223
04224
04225
04226
04227
04230 virtual bool InProgressiveMode() =0;
04248 virtual void BeginProgressiveMode() =0;
04251 virtual void EndProgressiveMode() =0;
04252
04253
04254
04264 virtual void RegisterAxisChangeCallback(AxisChangeCallback *cb)=0;
04269 virtual void UnRegisterAxisChangeCallback(AxisChangeCallback *cb)=0;
04270
04271
04280 virtual int GetAxisConstraints()=0;
04291 virtual void SetAxisConstraints(int c)=0;
04304 virtual void EnableAxisConstraints(int c,BOOL enabled)=0;
04305
04319 virtual void PushAxisConstraints(int c) = 0;
04323 virtual void PopAxisConstraints() = 0;
04324
04325
04335 virtual int GetCoordCenter()=0;
04347 virtual void SetCoordCenter(int c)=0;
04352 virtual void EnableCoordCenter(BOOL enabled)=0;
04353
04354
04366 virtual int GetRefCoordSys()=0;
04379 virtual void SetRefCoordSys(int c)=0;
04384 virtual void EnableRefCoordSys(BOOL enabled)=0;
04385
04386
04388 virtual int GetSelectFilter()=0;
04393 virtual void SetSelectFilter(int c)=0;
04395 virtual int GetNumberSelectFilters()=0;
04401 virtual MCHAR* GetSelectFilterName(int index)=0;
04402
04407 virtual BOOL GetDisplayFilter(int index) = 0;
04414 virtual void SetDisplayFilter(int index, BOOL on) = 0;
04417 virtual int GetNumberDisplayFilters() = 0;
04430 virtual BOOL DisplayFilterIsNodeVisible(int index, int sid, Class_ID cid, INode *node) = 0;
04435 virtual MCHAR* GetDisplayFilterName(int index)=0;
04436
04437
04438
04439
04440
04441
04442
04443
04444
04474 virtual Matrix3 GetTransformAxis(INode *node,int subIndex,BOOL* local = NULL)=0;
04475
04476
04477
04478
04479
04480
04481
04482
04493 virtual int GetNumAxis()=0;
04494
04495
04501 virtual void LockAxisTripods(BOOL onOff)=0;
04503 virtual BOOL AxisTripodLocked()=0;
04504
04505
04516 virtual void RegisterDlgWnd( HWND hDlg )=0;
04523 virtual int UnRegisterDlgWnd( HWND hDlg )=0;
04524
04525
04526
04527
04535 virtual void RegisterAccelTable( HWND hWnd, HACCEL hAccel )=0;
04544 virtual int UnRegisterAccelTable( HWND hWnd, HACCEL hAccel )=0;
04545
04546
04547
04548
04553 virtual IActionManager* GetActionManager() = 0;
04554
04555
04556
04558 virtual IMenuManager* GetMenuManager() = 0;
04559
04560
04561
04622 virtual HWND AddRollupPage( HINSTANCE hInst, MCHAR *dlgTemplate,
04623 DLGPROC dlgProc, MCHAR *title, LPARAM param=0,DWORD flags=0, int category = ROLLUP_CAT_STANDARD )=0;
04624
04663 virtual HWND AddRollupPage( HINSTANCE hInst, DLGTEMPLATE *dlgTemplate,
04664 DLGPROC dlgProc, MCHAR *title, LPARAM param=0,DWORD flags=0, int category = ROLLUP_CAT_STANDARD )=0;
04665
04666
04672 virtual void DeleteRollupPage( HWND hRollup )=0;
04673
04674
04748 virtual HWND ReplaceRollupPage( HWND hOldRollup, HINSTANCE hInst, MCHAR *dlgTemplate,
04749 DLGPROC dlgProc, MCHAR *title, LPARAM param=0,DWORD flags=0, int category = ROLLUP_CAT_STANDARD )=0;
04750
04751 virtual HWND ReplaceRollupPage( HWND hOldRollup, HINSTANCE hInst, DLGTEMPLATE *dlgTemplate,
04752 DLGPROC dlgProc, MCHAR *title, LPARAM param=0,DWORD flags=0, int category = ROLLUP_CAT_STANDARD )=0;
04753
04754
04761 virtual IRollupWindow *GetCommandPanelRollup()=0;
04762
04763
04764
04786 virtual void RollupMouseMessage( HWND hDlg, UINT message,
04787 WPARAM wParam, LPARAM lParam )=0;
04788
04789
04794 virtual TimeValue GetTime()=0;
04803 virtual void SetTime(TimeValue t,BOOL redraw=TRUE)=0;
04804
04805
04810 virtual Interval GetAnimRange()=0;
04816 virtual void SetAnimRange(Interval range)=0;
04817
04818
04819
04825 virtual void RegisterTimeChangeCallback(TimeChangeCallback *tc)=0;
04830 virtual void UnRegisterTimeChangeCallback(TimeChangeCallback *tc)=0;
04831
04832
04833
04839 virtual void RegisterCommandModeChangedCallback(CommandModeChangedCallback *cb)=0;
04844 virtual void UnRegisterCommandModeChangedCallback(CommandModeChangedCallback *cb)=0;
04845
04846
04847
04869 virtual void RegisterViewportDisplayCallback(BOOL preScene,ViewportDisplayCallback *cb)=0;
04878 virtual void UnRegisterViewportDisplayCallback(BOOL preScene,ViewportDisplayCallback *cb)=0;
04906 virtual void NotifyViewportDisplayCallbackChanged(BOOL preScene,ViewportDisplayCallback *cb)=0;
04907
04908
04909
04910
04918 virtual void RegisterExitMAXCallback(ExitMAXCallback *cb)=0;
04924 virtual void UnRegisterExitMAXCallback(ExitMAXCallback *cb)=0;
04925
04931 virtual RightClickMenuManager* GetRightClickMenuManager()=0;
04932
04933
04942 virtual void RegisterDeleteUser(EventUser *user)=0;
04947 virtual void UnRegisterDeleteUser(EventUser *user)=0;
04948
04949
04950
04973 virtual void MakeNameUnique(MSTR &name)=0;
04986 virtual INode *CreateObjectNode( Object *obj)=0;
04988
04992 virtual GenCamera *CreateCameraObject(int type) = 0;
04993 virtual Object *CreateTargetObject() = 0;
04994 virtual GenLight *CreateLightObject(int type) = 0;
05009 virtual void *CreateInstance(SClass_ID superID, Class_ID classID)=0;
05020 virtual int BindToTarget(INode *laNode, INode *targNode)=0;
05031 virtual int IsCPEdgeOnInView()=0;
05033
05069 virtual unsigned int DeleteNode(INode *node, BOOL redraw=TRUE, BOOL overrideSlaves=FALSE)=0;
05070
05075 virtual INode *GetRootNode()=0;
05077 MAX_DEPRECATED void NodeInvalidateRect( INode* node );
05100 virtual void SelectNode( INode *node, int clearSel = 1)=0;
05105 virtual void DeSelectNode(INode *node)=0;
05115 virtual void SelectNodeTab(INodeTab &nodes,BOOL sel,BOOL redraw=TRUE)=0;
05121 virtual void ClearNodeSelection(BOOL redraw=TRUE)=0;
05127 virtual void AddLightToScene(INode *node)=0;
05129 virtual void AddGridToScene(INode *node) = 0;
05139 virtual void SetNodeTMRelConstPlane(INode *node, Matrix3& mat)=0;
05148 virtual void SetActiveGrid(INode *node)=0;
05150 virtual INode *GetActiveGrid()=0;
05151
05163 virtual void StopCreating()=0;
05164
05165
05166
05167
05178 virtual Object *NonMouseCreate(Matrix3 tm)=0;
05188 virtual void NonMouseCreateFinish(Matrix3 tm)=0;
05189
05190
05197 virtual const MCHAR *GetDir(int which)=0;
05204 virtual int GetPlugInEntryCount()=0;
05213 virtual const MCHAR *GetPlugInDesc(int i)=0;
05222 virtual const MCHAR *GetPlugInDir(int i)=0;
05223
05230 virtual int GetAssetDirCount(MaxSDK::AssetManagement::AssetType assetType)=0;
05231
05239 virtual const MCHAR *GetAssetDir(int i, MaxSDK::AssetManagement::AssetType assetType)=0;
05240
05248 virtual BOOL AddAssetDir(const MCHAR *dir, MaxSDK::AssetManagement::AssetType assetType)=0;
05249
05257 virtual BOOL AddSessionAssetDir(const MCHAR *dir, MaxSDK::AssetManagement::AssetType assetType,int update=TRUE)=0;
05258
05265 virtual int GetSessionAssetDirCount(MaxSDK::AssetManagement::AssetType assetType)=0;
05266
05273 virtual const MCHAR *GetSessionAssetDir(int i, MaxSDK::AssetManagement::AssetType assetType)=0;
05274
05282 virtual BOOL DeleteSessionAssetDir(int i, MaxSDK::AssetManagement::AssetType assetType, int update=TRUE)=0;
05283
05290 virtual int GetCurAssetDirCount(MaxSDK::AssetManagement::AssetType assetType)=0;
05291
05299 virtual const MCHAR *GetCurAssetDir(int i, MaxSDK::AssetManagement::AssetType assetType)=0;
05300
05303 virtual float GetLightConeConstraint()=0;
05304
05305
05317 virtual int DoExclusionListDialog(ExclList *nl, BOOL doShadows=TRUE)=0;
05318
05319
05327 virtual void ConvertNameTabToExclList(const NameTab *nt, ExclList *excList)=0;
05328
05346 virtual MtlBase *DoMaterialBrowseDlg(HWND hParent,DWORD flags,BOOL &newMat,BOOL &cancel)=0;
05347
05361 virtual void PutMtlToMtlEditor(MtlBase *mb, int slot=-1)=0;
05368 virtual MtlBase* GetMtlSlot(int slot)=0;
05371 virtual MtlBaseLib* GetSceneMtls()=0;
05372
05373
05374
05377 virtual BOOL OkMtlForScene(MtlBase *m)=0;
05378
05379
05384 virtual MSTR &GetCurFileName()=0;
05389 virtual MSTR &GetCurFilePath()=0;
05391 virtual MCHAR *GetMatLibFileName()=0;
05392
05393
05396 virtual void FileOpen()=0;
05401 virtual BOOL FileSave()=0;
05405 virtual BOOL FileSaveAs()=0;
05409 virtual void FileSaveSelected()=0;
05416 virtual void FileReset(BOOL noPrompt=FALSE)=0;
05420 virtual void FileMerge()=0;
05424 virtual void FileHold()=0;
05428 virtual void FileFetch()=0;
05434 virtual void FileOpenMatLib(HWND hWnd)=0;
05435 #ifndef NO_MATLIB_SAVING // orb 01-09-2002
05436
05443 virtual void FileSaveMatLib(HWND hWnd)=0;
05449 virtual void FileSaveAsMatLib(HWND hWnd)=0;
05450 #endif // NO_MATLIB_SAVING
05451
05455 virtual BOOL FileImport()=0;
05460 virtual BOOL FileExport()=0;
05461
05462
05465 virtual void LoadDefaultMatLib()=0;
05466
05467
05478 virtual int LoadFromFile(const MCHAR *name, BOOL refresh=TRUE)=0;
05479
05480
05481
05492 virtual int SaveToFile(const MCHAR *fname, BOOL clearNeedSaveFlag = TRUE, BOOL useNewFile = TRUE)=0;
05497 virtual void FileSaveSelected(MCHAR *fname)=0;
05505 virtual void FileSaveNodes(INodeTab* nodes, MCHAR *fname)=0;
05519 virtual int LoadMaterialLib(const MCHAR *name, MtlBaseLib *lib=NULL)=0;
05520 #ifndef NO_MATLIB_SAVING // orb 01-09-2002
05521
05530 virtual int SaveMaterialLib(const MCHAR *name, MtlBaseLib *lib=NULL)=0;
05531 #endif // #ifndef NO_MATLIB_SAVING // orb 01-09-2002
05532
05568 virtual int MergeFromFile(const MCHAR *name,
05569 BOOL mergeAll=FALSE,
05570 BOOL selMerged=FALSE,
05571 BOOL refresh=TRUE,
05572 int dupAction = MERGE_DUPS_PROMPT,
05573 NameTab* mrgList=NULL,
05574 int dupMtlAction = MERGE_DUP_MTL_PROMPT,
05575 int reparentAction = MERGE_REPARENT_PROMPT
05576 )=0;
05600 virtual BOOL ImportFromFile(const MCHAR *name, BOOL suppressPrompts=FALSE, Class_ID *importerID=NULL)=0;
05627 virtual BOOL ExportToFile(const MCHAR *name, BOOL suppressPrompts=FALSE, DWORD options=0, Class_ID *exporterID=NULL)=0;
05628
05629
05633 virtual BOOL InSlaveMode()=0;
05634
05635
05636
05637
05652 virtual BOOL NodeColorPicker(HWND hWnd,DWORD &col)=0;
05653
05654
05655
05656
05657
05658
05659
05660
05673 virtual INode *GroupNodes(INodeTab *nodes=NULL,MSTR *name=NULL,BOOL selGroup=TRUE)=0;
05679 virtual void UngroupNodes(INodeTab *nodes=NULL)=0;
05686 virtual void ExplodeNodes(INodeTab *nodes=NULL)=0;
05696 virtual void OpenGroup(INodeTab *nodes=NULL,BOOL clearSel=TRUE)=0;
05706 virtual void CloseGroup(INodeTab *nodes=NULL,BOOL selGroup=TRUE)=0;
05707
05719 virtual bool AttachNodesToGroup(INodeTab& nodes, INode& pTargetNode) = 0;
05728 virtual bool DetachNodesFromGroup(INodeTab& nodes) = 0;
05729
05730
05749 virtual void FlashNodes(INodeTab *nodes)=0;
05750
05751
05752
05753
05760 virtual void TranslateAndDispatchMAXMessage(MSG &msg)=0;
05761
05762
05763
05764
05784 virtual BOOL CheckMAXMessages()=0;
05785
05786
05792 virtual BOOL setBkgImageAsset(const MaxSDK::AssetManagement::AssetUser& asset)=0;
05795 virtual const MaxSDK::AssetManagement::AssetUser& getBkgImageAsset(void)=0;
05804 virtual void setBkgImageAspect(int t)=0;
05811 virtual int getBkgImageAspect()=0;
05819 virtual void setBkgImageAnimate(BOOL onOff)=0;
05822 virtual int getBkgImageAnimate(void)=0;
05832 virtual void setBkgFrameRange(int start, int end, int step=1)=0;
05840 virtual int getBkgFrameRangeVal(int which)=0;
05853 virtual void setBkgORType(int which, int type)=0;
05865 virtual int getBkgORType(int which)=0;
05871 virtual void setBkgStartTime(TimeValue t)=0;
05874 virtual TimeValue getBkgStartTime()=0;
05879 virtual void setBkgSyncFrame(int f)=0;
05881 virtual int getBkgSyncFrame()=0;
05889 virtual int getBkgFrameNum(TimeValue t)=0;
05890
05891
05894 virtual BOOL GetRealTimePlayback()=0;
05902 virtual void SetRealTimePlayback(BOOL realTime)=0;
05907 virtual BOOL GetPlayActiveOnly()=0;
05915 virtual void SetPlayActiveOnly(BOOL playActive)=0;
05922 virtual void StartAnimPlayback(int selOnly=FALSE)=0;
05924 virtual void EndAnimPlayback()=0;
05927 virtual BOOL IsAnimPlaying()=0;
05928 virtual int GetPlaybackSpeed()=0;
05929 virtual void SetPlaybackSpeed(int s)=0;
05934 virtual BOOL GetPlaybackLoop()=0;
05941 virtual void SetPlaybackLoop(BOOL loop)=0;
05942
05943
05944
05945
05946 virtual void IncrementValidityToken()=0;
05947 virtual unsigned int CurrentValidityToken()=0;
05948
05949
05950
05951
05952
05953
05954
05955
05956
05957
05958
05959
05960
05961
05982 virtual int OpenCurRenderer(INode *camNode,ViewExp *view, RendType t = RENDTYPE_NORMAL, int w=0, int h=0)=0;
05983
05984
06000 virtual int OpenCurRenderer(ViewParams *vpar, RendType t = RENDTYPE_NORMAL, int w=0, int h=0)=0;
06001
06002
06005 virtual void CloseCurRenderer()=0;
06006
06007
06008
06009
06010
06011
06012
06036 virtual int CurRendererRenderFrame(TimeValue t, Bitmap *bm, RendProgressCallback *prog=NULL, float frameDur = 1.0f, ViewParams *vp=NULL, RECT *regionRect = NULL)=0;
06037
06038
06042 virtual IScanRenderer *CreateDefaultScanlineRenderer()=0;
06043
06044
06051 virtual Renderer* CreateDefaultRenderer(RenderSettingID renderSettingID) = 0;
06052
06057 virtual Class_ID GetDefaultRendererClassID(RenderSettingID renderSettingID) = 0;
06058
06063 virtual void SetDefaultRendererClassID(RenderSettingID renderSettingID, Class_ID classID) = 0;
06064
06065
06087 virtual int OpenRenderer(Renderer *pRenderer, INode *camNode,ViewExp *view, RendType type = RENDTYPE_NORMAL, int w=0, int h=0)=0;
06104 virtual int OpenRenderer(Renderer *pRenderer, ViewParams *vpar, RendType type = RENDTYPE_NORMAL, int w=0, int h=0)=0;
06130 virtual int RendererRenderFrame(Renderer *pRenderer, TimeValue t, Bitmap *bm, RendProgressCallback *prog=NULL, float frameDur = 1.0f, ViewParams *vp=NULL, RECT *regionRect = NULL)=0;
06139 virtual void CloseRenderer(Renderer *pRenderer)=0;
06140
06141
06142
06143
06144
06145
06156 virtual Renderer *GetCurrentRenderer(bool createRendererIfItDoesntExist = true)=0;
06157
06158
06167 virtual Renderer *GetProductionRenderer(bool createRendererIfItDoesntExist = true)=0;
06176 virtual Renderer *GetDraftRenderer(bool createRendererIfItDoesntExist = true)=0;
06177
06178
06187 virtual Renderer *GetRenderer(RenderSettingID renderSettingID, bool createRendererIfItDoesntExist = true)=0;
06188
06189
06195 virtual void AssignCurRenderer(Renderer *rend)=0;
06196
06197
06202 virtual void AssignProductionRenderer(Renderer *rend)=0;
06207 virtual void AssignDraftRenderer(Renderer *rend)=0;
06208
06209
06217 virtual void AssignRenderer(RenderSettingID renderSettingID, Renderer *rend)=0;
06218
06219
06220
06221
06222
06223
06226 virtual void SetUseDraftRenderer(BOOL b)=0;
06227
06228
06229
06230
06234 virtual BOOL GetUseDraftRenderer()=0;
06235
06236
06237
06242 virtual void ChangeRenderSetting(RenderSettingID renderSettingID)=0;
06245 virtual RenderSettingID GetCurrentRenderSetting()=0;
06246
06248
06256 virtual Renderer* GetMEditRenderer(bool createRendererIfItDoesntExist = true) = 0;
06257
06259
06262 virtual void AssignMEditRenderer(Renderer* renderer) = 0;
06263
06265
06273 virtual Renderer* GetActualMEditRenderer(bool createRendererIfItDoesntExist = true) = 0;
06274
06278 virtual bool GetMEditRendererLocked() = 0;
06282 virtual void SetMEditRendererLocked(bool locked) = 0;
06283 virtual bool GetMEditRendererLocked_DefaultValue() = 0;
06284 virtual void SetMEditRendererLocked_DefaultValue(bool locked) = 0;
06285
06286
06287
06290 virtual IRenderElementMgr *GetCurRenderElementMgr()=0;
06291
06297 virtual IRenderElementMgr *GetRenderElementMgr(RenderSettingID renderSettingID)=0;
06298
06299
06300
06301
06302
06303
06304
06305
06335 virtual void SetupRendParams(RendParams &rp, ViewExp *vpt, RendType t = RENDTYPE_NORMAL)=0;
06336
06337
06338
06339
06350 virtual void GetViewParamsFromNode(INode* vnode, ViewParams& vp, TimeValue t)=0;
06351
06353
06355 virtual BOOL CheckForRenderAbort()=0;
06356
06359 virtual void AbortRender()=0;
06360
06361
06362
06363
06374 virtual int GetRendTimeType()=0;
06387 virtual void SetRendTimeType(int type)=0;
06389 virtual TimeValue GetRendStart()=0;
06394 virtual void SetRendStart(TimeValue start)=0;
06396 virtual TimeValue GetRendEnd()=0;
06401 virtual void SetRendEnd(TimeValue end)=0;
06403 virtual int GetRendNThFrame()=0;
06408 virtual void SetRendNThFrame(int n)=0;
06409
06412 virtual BOOL GetRendShowVFB()=0;
06418 virtual void SetRendShowVFB(BOOL onOff)=0;
06419
06422 virtual BOOL GetRendSaveFile()=0;
06427 virtual void SetRendSaveFile(BOOL onOff)=0;
06430 virtual BOOL GetRendUseDevice()=0;
06435 virtual void SetRendUseDevice(BOOL onOff)=0;
06438 virtual BOOL GetRendUseNet()=0;
06439
06444 virtual void SetRendUseNet(BOOL onOff)=0;
06445
06448 virtual BitmapInfo& GetRendFileBI()=0;
06451 virtual BitmapInfo& GetRendDeviceBI()=0;
06453 virtual int GetRendWidth()=0;
06458 virtual void SetRendWidth(int w)=0;
06460 virtual int GetRendHeight()=0;
06465 virtual void SetRendHeight(int h)=0;
06472 virtual float GetRendApect()=0;
06473
06478 virtual void SetRendAspect(float a)=0;
06479
06480
06483 virtual float GetRendImageAspect()=0;
06484
06487 virtual float GetRendApertureWidth()=0;
06488
06493 virtual void SetRendApertureWidth(float aw)=0;
06494
06497 virtual BOOL GetRendFieldRender()=0;
06498
06503 virtual void SetRendFieldRender(BOOL onOff)=0;
06504
06507 virtual BOOL GetRendColorCheck()=0;
06508
06513 virtual void SetRendColorCheck(BOOL onOff)=0;
06514
06517 virtual BOOL GetRendSuperBlack()=0;
06518
06523 virtual void SetRendSuperBlack(BOOL onOff)=0;
06524
06525
06528 virtual BOOL GetRendHidden()=0;
06533 virtual void SetRendHidden(BOOL onOff)=0;
06536 virtual BOOL GetRendForce2Side()=0;
06539 virtual void SetRendForce2Side(BOOL onOff)=0;
06540
06543 virtual BOOL GetRendAtmosphere()=0;
06544
06549 virtual void SetRendAtmosphere(BOOL onOff)=0;
06550
06554 virtual BOOL GetRendEffects()=0;
06555
06560 virtual void SetRendEffects(BOOL onOff)=0;
06561
06570 virtual BOOL GetRendDisplacement()=0;
06571
06576 virtual void SetRendDisplacement(BOOL onOff)=0;
06577
06578
06581 virtual MSTR& GetRendPickFramesString()=0;
06584 virtual BOOL GetRendDitherTrue()=0;
06589 virtual void SetRendDitherTrue(BOOL onOff)=0;
06592 virtual BOOL GetRendDither256()=0;
06597 virtual void SetRendDither256(BOOL onOff)=0;
06600 virtual BOOL GetRendMultiThread()=0;
06605 virtual void SetRendMultiThread(BOOL onOff)=0;
06609 virtual BOOL GetRendNThSerial()=0;
06615 virtual void SetRendNThSerial(BOOL onOff)=0;
06621 virtual int GetRendVidCorrectMethod()=0;
06629 virtual void SetRendVidCorrectMethod(int m)=0;
06634 virtual int GetRendFieldOrder()=0;
06641 virtual void SetRendFieldOrder(int fo)=0;
06646 virtual int GetRendNTSC_PAL()=0;
06653 virtual void SetRendNTSC_PAL(int np)=0;
06655 virtual int GetRendSuperBlackThresh()=0;
06656
06661 virtual void SetRendSuperBlackThresh(int sb)=0;
06662
06665 virtual int GetRendFileNumberBase()=0;
06671 virtual void SetRendFileNumberBase(int n)=0;
06674 virtual BOOL GetSkipRenderedFrames()=0;
06675
06680 virtual void SetSkipRenderedFrames(BOOL onOff)=0;
06681
06682
06685 virtual BOOL GetRendSimplifyAreaLights() = 0;
06686
06688
06690 virtual void SetRendSimplifyAreaLights(BOOL onOff) = 0;
06691
06703 virtual DWORD GetHideByCategoryFlags()=0;
06717 virtual void SetHideByCategoryFlags(DWORD f)=0;
06718
06747 virtual int GetViewportLayout()=0;
06753 virtual void SetViewportLayout(int layout)=0;
06756 virtual BOOL IsViewportMaxed()=0;
06762 virtual void SetViewportMax(BOOL max)=0;
06763
06764
06774 virtual void ViewportZoomExtents(BOOL doAll, BOOL skipPersp=FALSE)=0;
06775
06776
06785 virtual void ZoomToBounds(BOOL doAll, Box3 box) =0;
06786
06787
06795 virtual void GetSelectionWorldBox(TimeValue t,Box3 &box)=0;
06796
06797
06803 virtual INode *GetINodeByName(const MCHAR *name)=0;
06804
06805
06811 virtual INode *GetINodeByHandle(ULONG handle)=0;
06812
06813
06821 virtual INode *GetINodeFromRenderID(UWORD id)=0;
06822
06823
06846 virtual void ExecuteMAXCommand(int id)=0;
06847
06869 virtual NameMaker* NewNameMaker(BOOL initFromScene = TRUE)=0;
06870
06871
06877 virtual void SetViewportBGColor(const Point3 &color)=0;
06879 virtual Point3 GetViewportBGColor()=0;
06880
06881
06883 virtual Texmap *GetEnvironmentMap()=0;
06889 virtual void SetEnvironmentMap(Texmap *map)=0;
06892 virtual BOOL GetUseEnvironmentMap()=0;
06898 virtual void SetUseEnvironmentMap(BOOL onOff)=0;
06899
06909 virtual Point3 GetAmbient(TimeValue t,Interval &valid)=0;
06917 virtual void SetAmbient(TimeValue t, Point3 col)=0;
06920 virtual Control *GetAmbientController()=0;
06926 virtual void SetAmbientController(Control *c)=0;
06927
06936 virtual Point3 GetLightTint(TimeValue t,Interval &valid)=0;
06944 virtual void SetLightTint(TimeValue t, Point3 col)=0;
06946 virtual Control *GetLightTintController()=0;
06951 virtual void SetLightTintController(Control *c)=0;
06952
06961 virtual float GetLightLevel(TimeValue t,Interval &valid)=0;
06968 virtual void SetLightLevel(TimeValue t, float lev)=0;
06971 virtual Control *GetLightLevelController()=0;
06976 virtual void SetLightLevelController(Control *c)=0;
06977
06979 virtual int NumAtmospheric()=0;
06984 virtual Atmospheric *GetAtmospheric(int i)=0;
06991 virtual void SetAtmospheric(int i,Atmospheric *a)=0;
06996 virtual void AddAtmosphere(Atmospheric *atmos)=0;
07001 virtual void DeleteAtmosphere(int i)=0;
07010 virtual void EditAtmosphere(Atmospheric *a, INode *gizmo=NULL)=0;
07011
07013 virtual int NumEffects()=0;
07019 virtual Effect *GetEffect(int i)=0;
07026 virtual void SetEffect(int i,Effect *e)=0;
07032 virtual void AddEffect(Effect *eff)=0;
07037 virtual void DeleteEffect(int i)=0;
07045 virtual void EditEffect(Effect *e, INode *gizmo=NULL)=0;
07046
07055 virtual Point3 GetBackGround(TimeValue t,Interval &valid)=0;
07062 virtual void SetBackGround(TimeValue t,Point3 col)=0;
07064 virtual Control *GetBackGroundController()=0;
07069 virtual void SetBackGroundController(Control *c)=0;
07070
07071
07075 virtual SoundObj *GetSoundObject()=0;
07081 virtual void SetSoundObject(SoundObj *snd)=0;
07082
07083 #ifdef _OSNAP
07084
07088 virtual IOsnapManager *GetOsnapManager()=0;
07091 virtual MouseManager *GetMouseManager()=0;
07094 virtual void InvalidateOsnapdraw()=0;
07095 #endif
07096
07097
07101 virtual MtlBaseLib& GetMaterialLibrary()=0;
07102
07106 virtual BOOL IsNetServer()=0;
07107
07111 virtual void SetNetServer()=0;
07112
07113
07114
07115
07116
07117
07118
07122 virtual LogSys *Log()=0;
07123
07124
07125
07128 virtual DllDir& GetDllDir()=0;
07129
07130
07162 virtual INT_PTR Execute(int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0, ULONG_PTR arg4=0, ULONG_PTR arg5=0, ULONG_PTR arg6=0)=0;
07163
07164 virtual void *GetInterface(DWORD id)=0;
07165
07166
07167 virtual BaseInterface* GetInterface(Interface_ID id)=0;
07168
07169
07173 virtual ReferenceTarget *GetScenePointer()=0;
07174
07175
07178 virtual ITrackViewNode *GetTrackViewRootNode()=0;
07179
07180
07184 virtual void FreeSceneBitmaps()=0;
07185
07186
07189 virtual DllDir *GetDllDirectory()=0;
07190
07191
07203 virtual void EnumAuxFiles(AssetEnumCallback& assetEnum, DWORD flags)=0;
07204
07205
07225 virtual void RenderTexmap(
07226 Texmap *tex,
07227 Bitmap *bm,
07228 float scale3d=1.0f,
07229 BOOL filter=FALSE,
07230 BOOL display=FALSE,
07231 float z=0.0f,
07232 TimeValue t = GetCOREInterface()->GetTime()
07233 )=0;
07234
07235
07236
07237
07238
07250 CoreExport void DeActivateTexture(MtlBase *tx, Mtl *mtl, int subNum=-1);
07262 CoreExport void ActivateTexture(MtlBase *tx, Mtl *mtl, int subNum=-1);
07263
07264
07271 virtual void AssignNewName(Mtl *m)=0;
07278 virtual void AssignNewName(Texmap *m)=0;
07279
07280
07289 virtual void RescaleWorldUnits(float f, BOOL selected)=0;
07290
07291
07292
07300 virtual int InitSnapInfo(SnapInfo* info)=0;
07301
07302
07305 virtual BOOL GetKeyStepsSelOnly()=0;
07311 virtual void SetKeyStepsSelOnly(BOOL onOff)=0;
07314 virtual BOOL GetKeyStepsUseTrans()=0;
07320 virtual void SetKeyStepsUseTrans(BOOL onOff)=0;
07324 virtual BOOL GetKeyStepsPos()=0;
07330 virtual void SetKeyStepsPos(BOOL onOff)=0;
07334 virtual BOOL GetKeyStepsRot()=0;
07340 virtual void SetKeyStepsRot(BOOL onOff)=0;
07344 virtual BOOL GetKeyStepsScale()=0;
07350 virtual void SetKeyStepsScale(BOOL onOff)=0;
07353 virtual BOOL GetKeyStepsUseTrackBar()=0;
07359 virtual void SetKeyStepsUseTrackBar(BOOL onOff)=0;
07360
07361
07364 virtual BOOL GetUseTransformGizmo()=0;
07369 virtual void SetUseTransformGizmo(BOOL onOff)=0;
07370
07371
07378 virtual void SetTransformGizmoRestoreAxis(BOOL bOnOff)=0;
07381 virtual BOOL GetTransformGizmoRestoreAxis()=0;
07382
07383
07386 virtual BOOL GetConstantAxisRestriction()=0;
07391 virtual void SetConstantAxisRestriction(BOOL onOff)=0;
07392
07393
07412 virtual int HitTestTransformGizmo(IPoint2 *p, ViewExp *vpt, int axisFlags) = 0;
07413
07414
07415 virtual void DeactivateTransformGizmo() = 0;
07416
07417
07418
07423 virtual int ConfigureBitmapPaths()=0;
07424
07425
07426
07427
07435 virtual BOOL DoSpaceArrayDialog(SpaceArrayCallback *sacb=NULL)=0;
07436
07437
07438
07439
07440
07450 virtual int AddClass(ClassDesc *cd)=0;
07451
07452
07453
07454
07455
07465 virtual int DeleteClass(ClassDesc *cd)=0;
07466
07467
07469 virtual int GetCommandStackSize()=0;
07470
07478 virtual CommandMode* GetCommandStackEntry(int entry)=0;
07479
07480
07481
07482
07483
07491 virtual void AddSFXRollupPage(ULONG flags=0)=0;
07492
07493
07496 virtual void DeleteSFXRollupPage()=0;
07497
07498
07504 virtual void RefreshSFXRollupPage()=0;
07505
07506
07507
07508
07509
07510
07517 virtual int GetNumProperties(int PropertySet)=0;
07532 virtual int FindProperty(int PropertySet, const PROPSPEC* propspec)=0;
07545 virtual const PROPVARIANT* GetPropertyVariant(int PropertySet, int idx)=0;
07558 virtual const PROPSPEC* GetPropertySpec(int PropertySet, int idx)=0;
07571 virtual void AddProperty(int PropertySet, const PROPSPEC* propspec, const PROPVARIANT* propvar)=0;
07580 virtual void DeleteProperty(int PropertySet, const PROPSPEC* propspec)=0;
07581
07582
07589 virtual BOOL RegisterViewWindow(ViewWindow *vw)=0;
07596 virtual BOOL UnRegisterViewWindow(ViewWindow *vw)=0;
07597
07598
07599 virtual ShadowType *GetGlobalShadowGenerator()=0;
07600 virtual void SetGlobalShadowGenerator(ShadowType *st)=0;
07601
07602
07609 virtual BOOL GetImportZoomExtents()=0;
07615 virtual void SetImportZoomExtents(BOOL onOff)=0;
07616
07626 virtual BOOL CheckForSave()=0;
07627
07631 virtual ITrackBar* GetTrackBar()=0;
07632
07633
07634
07635
07636
07637
07638
07639
07640
07662 virtual void SetIncludeXRefsInHierarchy(BOOL onOff)=0;
07665 virtual BOOL GetIncludeXRefsInHierarchy()=0;
07666
07667
07675 virtual BOOL IsXRefAutoUpdateSuspended()=0;
07681 virtual void SetXRefAutoUpdateSuspended(BOOL onOff)=0;
07682
07683
07684 virtual MacroRecorder* GetMacroRecorder()=0;
07685
07686
07687
07693 virtual void UpdateMtlEditorBrackets()=0;
07694
07697 virtual bool IsTrialLicense() = 0;
07699 virtual bool IsNetworkLicense() = 0;
07700
07701
07707 virtual void SetMAXFileOpenDlg(MAXFileOpenDialog* dlg) = 0;
07713 virtual void SetMAXFileSaveDlg(MAXFileSaveDialog* dlg) = 0;
07714
07727 virtual void RAMPlayer(HWND hWndParent, MCHAR* szChanA=NULL, MCHAR* szChanB=NULL) = 0;
07728
07729
07733 virtual void FlushUndoBuffer() = 0;
07734
07735
07742 virtual bool DeferredPluginLoadingEnabled() = 0;
07751 virtual void EnableDeferredPluginLoading(bool onOff) = 0;
07752
07753
07759 virtual BOOL IsSceneXRefNode(INode *node)=0;
07760
07761
07768 virtual bool CanImportFile(const MCHAR* filename)=0;
07774 virtual bool IsMaxFile(const MCHAR* filename)=0;
07780 virtual bool IsInternetCachedFile(const MCHAR* filename)=0;
07781
07782
07791 virtual bool CanImportBitmap(const MCHAR* filename)=0;
07792
07793
07808 virtual bool CaptureSubObjectRegistration(bool OnOff, Class_ID cid)=0;
07809
07810
07811
07812 #define DOWNLOADDLG_NOPLACE 1<<0
07813
07829 virtual bool DownloadUrl(HWND hwnd, const MCHAR* url, const MCHAR* filename, DWORD flags = 0)=0;
07830
07831
07839 virtual INode* GetImportCtxNode(void)=0;
07840
07841
07871 virtual ITreeView* CreateTreeViewChild(ReferenceTarget* root, HWND hParent, DWORD style=0, ULONG id=0, int open=OPENTV_SPECIAL)=0;
07872
07873
07903 virtual void ConvertMtl(TimeValue t, Material& gm, Mtl* mtl, BOOL doTex,
07904 int subNum, float vis, BOOL& needDecal, INode* node,
07905 BitArray* needTex, GraphicsWindow* gw)=0;
07906
07907
07914 virtual int GetProductVersion()=0;
07923 virtual int GetLicenseBehavior()=0;
07924
07929 virtual bool IsFeatureLicensed(int subNum)=0;
07930
07935 virtual int GetLicenseDaysLeft()=0;
07936
07937
07962 virtual bool CloneNodes(INodeTab& nodes, Point3& offset, bool expandHierarchies = true, CloneType cloneType = NODE_COPY, INodeTab* resultSource = NULL, INodeTab* resultTarget = NULL) = 0;
07963
07964
07965 virtual void CollapseNode(INode *node, BOOL noWarning = FALSE)=0;
07966 virtual BOOL CollapseNodeTo(INode *node, int modIndex, BOOL noWarning = FALSE)=0;
07967 virtual BOOL ConvertNode(INode *node, Class_ID &cid)=0;
07968
07969
07970 virtual IRenderPresetsManager* GetRenderPresetsManager()=0;
07971
07972
07973
07974
07975 virtual DefaultActionSys *DefaultActions()=0;
07976
07978
07980 virtual BOOL SetQuietMode(BOOL onOff)=0;
07981
07983
07987 virtual BOOL GetQuietMode(BOOL checkNetSlave = TRUE)=0;
07988
07989 };
07990
07991 #pragma warning(pop)
07992
07993
07996 class Interface::SuspendSceneRedrawGuard : public MaxHeapOperators
07997 {
07998 public:
08000 SuspendSceneRedrawGuard() : mResumeRedrawRequired(false) {
08001 Suspend();
08002 }
08003
08005 ~SuspendSceneRedrawGuard() {
08006 Resume();
08007 }
08008
08010 void Suspend() {
08011 if (!mResumeRedrawRequired) {
08012 GetCOREInterface()->DisableSceneRedraw();
08013 mResumeRedrawRequired = true;
08014 }
08015 }
08016
08018 void Resume() {
08019 if (mResumeRedrawRequired) {
08020 GetCOREInterface()->EnableSceneRedraw();
08021 mResumeRedrawRequired = false;
08022 }
08023 }
08024
08025 private:
08026 bool mResumeRedrawRequired;
08027 };
08028
08033 class IObjParam : public Interface{};
08034
08039 class IObjCreate : public IObjParam{};
08040
08041
08042 class MAXScriptPrefs;
08043 class IMenu;
08044 class IMenuItem;
08045 class FrameRendParams;
08046 class DefaultLight;
08047 class ITabPage;
08048
08049
08053
08054 class Interface7 : public IObjCreate
08055 {
08056 public:
08057
08059 CoreExport static const Interface_ID kInterface7InterfaceID;
08060
08061
08064 virtual void GetSelNodeTab(INodeTab& selectedNodes) const = 0;
08065
08066
08068 enum PivotMode
08069 {
08071 kPIV_NONE = PIV_NONE,
08073 kPIV_PIVOT_ONLY = PIV_PIVOT_ONLY,
08075 kPIV_OBJECT_ONLY = PIV_OBJECT_ONLY,
08079 kPIV_HIERARCHY_ONLY = PIV_HIERARCHY_ONLY
08080 };
08081
08083 virtual PivotMode GetPivotMode() const = 0;
08085 virtual void SetPivotMode(PivotMode pivMode) = 0;
08086
08089 virtual bool GetAffectChildren() const = 0;
08093 virtual void SetAffectChildren(bool bAffectChildren) = 0;
08094
08096 virtual void GetCurRefCoordSysName(MSTR& name) const = 0;
08097
08100 virtual void AddRefCoordNode(INode *node) = 0;
08101 virtual INode* GetRefCoordNode() = 0;
08102
08103
08108 virtual bool ShouldContinueRenderOnError() const = 0;
08109
08110 virtual void SetupFrameRendParams(
08111 FrameRendParams &frp,
08112 RendParams &rp,
08113 ViewExp *vx,
08114 RECT *r) = 0;
08115 virtual void SetupFrameRendParams_MXS(
08116 FrameRendParams &frp,
08117 RendParams &rp,
08118 ViewExp *vx,
08119 RECT *r,
08120 bool useSelBox) = 0;
08121 virtual int InitDefaultLights(
08122 DefaultLight *dl,
08123 int maxn,
08124 BOOL applyGlobalLevel = FALSE,
08125 ViewExp *vx = NULL,
08126 BOOL forRenderer = FALSE) = 0;
08127
08129 virtual void IncrRenderActive() = 0;
08130 virtual void DecrRenderActive() = 0;
08131 virtual BOOL IsRenderActive() = 0;
08132
08133 virtual BOOL XRefRenderBegin() = 0;
08134 virtual void XRefRenderEnd() = 0;
08135
08136 virtual void OpenRenderDialog() = 0;
08137 virtual void CancelRenderDialog() = 0;
08138 virtual void CloseRenderDialog() = 0;
08139 virtual void CommitRenderDialogParameters() = 0;
08140 virtual void UpdateRenderDialogParameters() = 0;
08141 virtual BOOL RenderDialogOpen() = 0;
08142
08143 virtual Bitmap* GetLastRenderedImage() = 0;
08144
08145
08148 virtual HWND GetStatusPanelHWnd() = 0;
08149
08150
08151 virtual void SetListenerMiniHWnd(HWND wnd) = 0;
08152 virtual HWND GetListenerMiniHWnd() = 0;
08153
08155 virtual int MAXScriptHelp(MCHAR* keyword = NULL) = 0;
08156
08158 virtual MAXScriptPrefs& GetMAXScriptPrefs() = 0;
08159
08160
08161 virtual BOOL OpenTrackViewWindow(
08162 const MCHAR* tv_name,
08163 const MCHAR* layoutName = NULL,
08164 Point2 pos = Point2(-1.0f,-1.0f),
08165 int width = -1,
08166 int height = -1,
08167 int dock = TV_FLOAT) = 0;
08168
08170 virtual BOOL BringTrackViewWindowToTop(const MCHAR* tv_name) = 0;
08171
08172 virtual BOOL TrackViewZoomSelected(const MCHAR* tv_name) = 0;
08173 virtual BOOL TrackViewZoomOn(const MCHAR* tv_name, Animatable* parent, int subNum) = 0;
08174 virtual BOOL CloseTrackView(const MCHAR* tv_name) = 0;
08175 virtual int NumTrackViews() = 0;
08176 virtual const MCHAR* GetTrackViewName(int i) = 0;
08180 virtual BOOL SetTrackViewFilter(
08181 const MCHAR* tv_name,
08182 DWORD mask,
08183 int which,
08184 BOOL redraw = TRUE) = 0;
08185 virtual BOOL ClearTrackViewFilter(
08186 const MCHAR* tv_name,
08187 DWORD mask,
08188 int which,
08189 BOOL redraw = TRUE) = 0;
08190 virtual DWORD TestTrackViewFilter(const MCHAR* tv_name, DWORD mask, int which) = 0;
08191 virtual void FlushAllTrackViewWindows() = 0;
08192 virtual void UnFlushAllTrackViewWindows() = 0;
08193 virtual void CloseAllTrackViewWindows() = 0;
08194
08195
08196 virtual void SetCurEditObject(BaseObject *obj, BaseNode *hintNode = NULL) = 0;
08198 virtual BaseObject* GetCurEditObject() = 0;
08199 virtual void AddModToSelection(Modifier* mod) = 0;
08200 virtual void InvalidateObCache(INode* node) = 0;
08201 virtual INode* FindNodeFromBaseObject(ReferenceTarget* obj) = 0;
08202 virtual void SelectedHistoryChanged() = 0;
08203 virtual BOOL CmdPanelOpen() = 0;
08204 virtual void CmdPanelOpen(BOOL openClose) = 0;
08205
08207 virtual void SuspendEditing(
08208 DWORD whichPanels = (1<<TASK_MODE_MODIFY),
08209 BOOL alwaysSuspend = FALSE) = 0;
08210 virtual void ResumeEditing(
08211 DWORD whichPanels = (1<<TASK_MODE_MODIFY),
08212 BOOL alwaysSuspend = FALSE) = 0;
08213 virtual void SuspendMotionEditing() = 0;
08214 virtual void ResumeMotionEditing() = 0;
08215
08218 virtual int AddClass(
08219 ClassDesc *cdesc,
08220 int dllNum = -1,
08221 int index = -1,
08222 bool load = true) = 0;
08224 virtual void ReBuildSuperList() = 0;
08225
08227 virtual BOOL IsEditing() = 0;
08228
08230 virtual void ChangeHistory(int upDown) = 0;
08231
08232
08233 virtual void StartCreatingObject(ClassDesc* cd) = 0;
08234 virtual BOOL IsCreatingObject(Class_ID& id) = 0;
08235 virtual BOOL IsCreatingObject() = 0;
08237 virtual void UpdateLockCheckObjectCounts() = 0;
08238 virtual INode *CreateObjectNode( Object *obj, const MCHAR* name) = 0;
08239
08240
08242 virtual BOOL SetDir(int which, MCHAR *dir) = 0;
08243
08244
08253 virtual BOOL AddAssetDir(MCHAR *dir, MaxSDK::AssetManagement::AssetType assetType, int update=TRUE) = 0;
08254
08262 virtual BOOL DeleteAssetDir(int i, MaxSDK::AssetManagement::AssetType assetType,int update=TRUE) = 0;
08263
08270 virtual void UpdateAssetSection(MaxSDK::AssetManagement::AssetType assetType) = 0;
08271
08274 virtual BOOL AppendToCurFilePath(const MCHAR* toAppend) = 0;
08275
08277 virtual MSTR GetMAXIniFile() = 0;
08278
08280 #ifndef NO_SCHEMATICVIEW
08281 virtual BOOL OpenSchematicViewWindow(MCHAR* sv_name) = 0;
08282 virtual BOOL SchematicViewZoomSelected(MCHAR* sv_name) = 0;
08283 virtual BOOL CloseSchematicView(MCHAR* sv_name) = 0;
08284 virtual int NumSchematicViews() = 0;
08285 virtual MCHAR* GetSchematicViewName(int i) = 0;
08286 virtual void CloseAllSchematicViewWindows() = 0;
08287 virtual void FlushAllSchematicViewWindows() = 0;
08288 virtual void UnFlushAllSchematicViewWindows() = 0;
08289 #endif // NO_SCHEMATICVIEW
08290
08291
08292 virtual BOOL DrawingEnabled() = 0;
08293 virtual void EnableDrawing(BOOL onOff) = 0;
08294 virtual BOOL SceneResetting() = 0;
08295 virtual BOOL QuitingApp() = 0;
08296
08297 virtual BOOL GetHideFrozen() = 0;
08299 virtual void SetSceneDisplayFlag(DWORD flag, BOOL onOff, BOOL updateUI = TRUE) = 0;
08300 virtual BOOL GetSceneDisplayFlag(DWORD flag) = 0;
08301
08303 virtual IScene* GetScene() = 0;
08304
08305
08306 virtual void SetMtlSlot(int i, MtlBase* m) = 0;
08307 virtual int GetActiveMtlSlot() = 0;
08308 virtual void SetActiveMtlSlot(int i) = 0;
08309 virtual int NumMtlSlots() = 0;
08310 virtual void FlushMtlDlg() = 0;
08311 virtual void UnFlushMtlDlg() = 0;
08312 virtual BOOL IsMtlInstanced(MtlBase* m) = 0;
08313
08314 virtual Mtl *FindMtlNameInScene(MSTR &name) = 0;
08315 virtual void PutMaterial(
08316 MtlBase* mtl,
08317 MtlBase* oldMtl,
08318 BOOL delOld = 1,
08319 RefMakerHandle skipThis = 0) = 0;
08320
08322
08324 virtual BOOL IsMtlDlgShowing() = 0;
08325
08327
08329 virtual void OpenMtlDlg() = 0;
08330
08332
08334 virtual void CloseMtlDlg() = 0;
08335
08336
08338 virtual HWND GetViewPanelHWnd() = 0;
08340 virtual int getActiveViewportIndex() = 0;
08341 virtual BOOL setActiveViewport(int index) = 0;
08342 virtual int getNumViewports() = 0;
08343 virtual ViewExp *getViewport(int i) = 0;
08344 virtual void resetAllViews() = 0;
08345
08347 virtual MCHAR* getActiveViewportLabel() = 0;
08348 virtual MCHAR* getViewportLabel(int index) = 0;
08349
08351 virtual void SetRegionRect(int index, Rect r) = 0;
08352 virtual Rect GetRegionRect(int index) = 0;
08353 virtual void SetBlowupRect(int index, Rect r) = 0;
08354 virtual Rect GetBlowupRect(int index) = 0;
08355 virtual void SetRegionRect2(int index, Rect r) = 0;
08356 virtual Rect GetRegionRect2(int index) = 0;
08357 virtual void SetBlowupRect2(int index, Rect r) = 0;
08358 virtual Rect GetBlowupRect2(int index) = 0;
08359 virtual int GetRenderType() = 0;
08360 virtual void SetRenderType(int rtype) = 0;
08361 virtual BOOL GetLockImageAspRatio() = 0;
08362 virtual void SetLockImageAspRatio(BOOL on) = 0;
08363 virtual float GetImageAspRatio() = 0;
08364 virtual void SetImageAspRatio(float on) = 0;
08365 virtual BOOL GetLockPixelAspRatio() = 0;
08366 virtual void SetLockPixelAspRatio(BOOL on) = 0;
08367 virtual float GetPixelAspRatio() = 0;
08368 virtual void SetPixelAspRatio(float on) = 0;
08369
08370 virtual void SetViewportGridVisible(int index, BOOL state) = 0;
08371 virtual BOOL GetViewportGridVisible(int index) = 0;
08372
08373 virtual void ViewportInvalidate(int index) = 0;
08374 virtual void ViewportInvalidateBkgImage(int index) = 0;
08375 virtual void InvalidateAllViewportRects() = 0;
08376
08379 virtual void RedrawViewportsNow(
08380 TimeValue t,
08381 DWORD vpFlags = VP_DONT_SIMPLIFY) = 0;
08382
08385 virtual void RedrawViewportsLater(
08386 TimeValue t,
08387 DWORD vpFlags = VP_DONT_SIMPLIFY ) = 0;
08388
08391 virtual void SetActiveViewportRenderLevel(int level) = 0;
08394 virtual int GetActiveViewportRenderLevel() = 0;
08395
08397 virtual void SetActiveViewportShowEdgeFaces(BOOL show) = 0;
08398 virtual BOOL GetActiveViewportShowEdgeFaces() = 0;
08399
08404 virtual void SetActiveViewportTransparencyLevel(int level) = 0;
08405 virtual int GetActiveViewportTransparencyLevel() = 0;
08406
08408 virtual BOOL GetDualPlanes() = 0;
08409 virtual void SetDualPlanes(BOOL b) = 0;
08410
08411
08413 virtual void SetTestOnlyFrozen(int onOff) = 0;
08414
08415
08417 virtual void SetScaleMode(int mode) = 0;
08419 virtual void SetCenterMode(int mode) = 0;
08421 virtual BOOL InManipMode() = 0;
08422 virtual void StartManipulateMode() = 0;
08423 virtual void EndManipulateMode() = 0;
08424 virtual BOOL IsViewportCommandMode(CommandMode *m) = 0;
08425
08427
08428
08430 virtual void ConvertFlagedNodesToXRefs(
08431 const MaxSDK::AssetManagement::AssetUser &fname,
08432 INode *rootNode,
08433 Tab<INode*> &nodes,
08434 int xFlags) = 0;
08436 virtual void XRefSceneSetIgnoreFlag(int index, DWORD f, BOOL onOff) = 0;
08437 virtual void UpdateSceneXRefState() = 0;
08438
08439
08440 virtual BOOL GetSnapActive() = 0;
08441 virtual void SetSnapActive(BOOL onOff) = 0;
08442 virtual int GetSnapType() = 0;
08444 virtual void SetSnapType(int type) = 0;
08445 virtual void ToggleASnap() = 0;
08446 virtual int ASnapStatus() = 0;
08447 virtual void TogglePSnap() = 0;
08448 virtual int PSnapStatus() = 0;
08449 virtual float GetGridSpacing() = 0;
08450 virtual void SetGridSpacing(float newVal) = 0;
08451 virtual int GetGridMajorLines() = 0;
08452 virtual void SetGridMajorLines(float newVal) = 0;
08453 virtual float GetSnapAngle() = 0;
08454 virtual void SetSnapAngle(float newVal) = 0;
08455 virtual float GetSnapPercent() = 0;
08456 virtual void SetSnapPercent(float newVal) = 0;
08457
08458
08459 virtual BOOL GetPrimaryVisibility(INode* node) = 0;
08460 virtual void SetPrimaryVisibility(INode* node, BOOL onOff) = 0;
08461 virtual BOOL GetSecondaryVisibility(INode* node) = 0;
08462 virtual void SetSecondaryVisibility(INode* node, BOOL onOff) = 0;
08463
08468 virtual void SetNodeAttribute(INodeTab &nodes, int whatAttrib, int onOff) = 0;
08469
08474 virtual void SetNodeAttribute(INode *node, int whatAttrib, int onOff) = 0;
08475
08477 MAX_DEPRECATED void InvalidateNodeRect(INode* node, TimeValue t, BOOL oldPos=FALSE);
08478
08479
08480 virtual void SetExpertMode(int onOff) = 0;
08481 virtual int GetExpertMode() = 0;
08482 virtual void LoadCUIConfig(MCHAR* fileName) = 0;
08483 virtual void WriteCUIConfig() = 0;
08484 virtual void SaveCUIAs() = 0;
08485 virtual void LoadCUI() = 0;
08486 virtual void RevertToBackupCUI() = 0;
08487 virtual void ResetToFactoryDefaultCUI() = 0;
08488 virtual void DoUICustomization(int startPage) = 0;
08489
08490 virtual int GetDefaultImageListBaseIndex(SClass_ID sid, Class_ID cid) = 0;
08491 virtual MSTR* GetDefaultImageListFilePrefix(SClass_ID sid, Class_ID cid) = 0;
08492
08493 virtual float GetGridIntens() = 0;
08494 virtual void SetGridIntens(float f) = 0;
08495 virtual BOOL GetWhiteOrigin() = 0;
08496 virtual void SetWhiteOrigin(BOOL b) = 0;
08497 virtual BOOL GetUseGridColor() = 0;
08498 virtual void SetUseGridColor(BOOL b) = 0;
08499 virtual void UpdateColors(
08500 BOOL useGridColor,
08501 int gridIntensity,
08502 BOOL whiteOrigin) = 0;
08503
08504 virtual IMenu* GetIMenu() = 0;
08505 virtual IMenuItem* GetIMenuItem() = 0;
08506
08507 virtual void RepaintTimeSlider() = 0;
08508
08509 virtual MSTR GetTabPageTitle(ITabPage *page) = 0;
08510
08511
08512 virtual BOOL DoMaxFileSaveAsDlg(MSTR &fileName, BOOL setAsCurrent=TRUE) = 0;
08513 virtual BOOL DoMaxFileOpenDlg(MSTR &fileName, MSTR *defDir, MSTR *defFile) = 0;
08514 virtual BOOL DoMaxFileMergeDlg(MSTR &fileName, MSTR *defDir, MSTR *defFile) = 0;
08515 virtual BOOL DoMaxFileXRefDlg(MSTR &fileName, MSTR *defDir, MSTR *defFile) = 0;
08516
08517
08519 virtual void StartAnimPlayback2(int selOnly) = 0;
08520
08521
08522 enum ResCode
08523 {
08524 kRES_INTERNAL_ERROR = -3,
08525 kRES_MOD_NOT_FOUND = -2,
08526 kRES_MOD_NOT_APPLICABLE = -1,
08527 kRES_SUCCESS = 0,
08528 };
08530 virtual BOOL IsValidModForSelection(ClassEntry* ce) = 0;
08532 virtual BOOL IsValidModifier(INode& node, Modifier& mod) = 0;
08533
08547 virtual ResCode AddModifier(INode& node, Modifier& mod, int beforeIdx = 0) = 0;
08548
08552 virtual ResCode DeleteModifier(INode& node, Modifier& mod) = 0;
08553
08557 virtual ResCode DeleteModifier(INode& node, int modIdx) = 0;
08558
08564 virtual IDerivedObject* FindModifier(
08565 INode& node,
08566 Modifier& mod,
08567 int& modStackIdx,
08568 int& derivedObjIdx) = 0;
08569
08575 virtual IDerivedObject* FindModifier(
08576 INode& node,
08577 int modIdx,
08578 int& idx,
08579 Modifier*& mod) = 0;
08580
08588 virtual IDerivedObject* FindModifier(
08589 INode& node,
08590 Modifier& mod,
08591 ModContext& mc,
08592 int& modStackIdx,
08593 int& dobjidx) = 0;
08594
08595 virtual ResCode DoDeleteModifier(INode& node, IDerivedObject& dobj, int idx) = 0;
08596
08600 virtual Object* GetReplaceableObjRef(INode& node) = 0;
08601
08602
08603 #ifndef NO_RENDEREFFECTS
08604 virtual void OpenEnvEffectsDialog() = 0;
08605 virtual void CloseEnvEffectsDialog() = 0;
08606 virtual BOOL EnvEffectsDialogOpen() = 0;
08607 #endif // NO_RENDEREFFECTS
08608
08609 };
08610
08612
08615 class Interface8 : public Interface7
08616 {
08617 public:
08618
08620 CoreExport static const Interface_ID kInterface8InterfaceID;
08621
08622
08624
08625
08627
08634 virtual int QuickRender( TimeValue t=TIME_PosInfinity, Bitmap* rendbm=NULL, RendProgressCallback* prog=NULL )=0;
08636
08637 virtual void GetRendFrameList(IntTab& frameNums)=0;
08639
08640 virtual RendProgressCallback* GetRendProgressCallback()=0;
08642
08645 virtual void SetRendProgressCallback( RendProgressCallback* prog )=0;
08647
08648 virtual INode* GetRendCamNode()=0;
08650
08653 virtual void SetRendCamNode( INode* camNode )=0;
08655 virtual BOOL GetRendUseImgSeq()=0;
08657
08660 virtual void SetRendUseImgSeq(BOOL onOff)=0;
08662
08663 virtual int GetRendImgSeqType()=0;
08665
08666 virtual void SetRendImgSeqType(int type)=0;
08668
08670 virtual void CreateRendImgSeq( CreateRendImgSeqCallback* cb=NULL )=0;
08672 virtual const MaxSDK::AssetManagement::AssetUser& GetPreRendScriptAsset()=0;
08674
08679 virtual void SetPreRendScriptAsset( const MaxSDK::AssetManagement::AssetUser& script )=0;
08681 virtual BOOL GetUsePreRendScript()=0;
08683
08684 virtual void SetUsePreRendScript( BOOL onOff )=0;
08686 virtual BOOL GetLocalPreRendScript()=0;
08688
08691 virtual void SetLocalPreRendScript( BOOL onOff )=0;
08693 virtual const MaxSDK::AssetManagement::AssetUser& GetPostRendScriptAsset()=0;
08695
08697 virtual void SetPostRendScriptAsset( const MaxSDK::AssetManagement::AssetUser& script )=0;
08699 virtual BOOL GetUsePostRendScript()=0;
08701
08702 virtual void SetUsePostRendScript( BOOL onOff )=0;
08704
08705
08706
08708
08709
08710
08720 virtual BOOL GetControllerOverrideRangeDefault() = 0;
08722
08727 virtual void SetControllerOverrideRangeDefault(BOOL override) = 0;
08728
08733 virtual void GetDefaultTangentType(int &dfltInTangentType, int &dfltOutTangentType) = 0;
08739 virtual void SetDefaultTangentType(int dfltInTangentType, int dfltOutTangentType, BOOL writeInCfgFile = TRUE) = 0;
08740
08742
08750 virtual BOOL GetSpringQuickEditMode() const = 0;
08752
08755 virtual void SetSpringQuickEditMode(BOOL in_quickEdit) = 0;
08756
08758
08764 virtual void SetSpringRollingStart(int in_start) = 0;
08766
08769 virtual int GetSpringRollingStart() const = 0;
08771
08773
08781 virtual void ColorById(DWORD id, Color& c) = 0 ;
08782
08786 virtual void RegisterExitMAXCallback(ExitMAXCallback2 *cb)=0;
08787
08790 virtual void UnRegisterExitMAXCallback(ExitMAXCallback2 *cb)=0;
08791
08793
08817 virtual bool DoMaxSaveAsDialog( HWND parentWnd,
08818 const MSTR &title,
08819 MSTR &filename,
08820 MSTR &initialDir,
08821 FilterList &extensionList) =0;
08822
08824
08848 virtual bool DoMaxOpenDialog( HWND parentWnd,
08849 const MSTR &title,
08850 MSTR &filename,
08851 MSTR &initialDir,
08852 FilterList &extensionList) =0;
08853
08855
08869 virtual void RegisterModelessRenderWindow(HWND hWnd) =0;
08873 virtual void UnRegisterModelessRenderWindow(HWND hWnd) =0;
08874
08877 virtual bool IsSavingToFile() = 0;
08878
08880
08882 enum LoadFromFileFlags {
08886 kRefreshViewports = 0x01,
08891 kSuppressPrompts = 0x02,
08898 kUseFileUnits = 0x04,
08899
08907 kSetCurrentFilePath = 0x08
08908 };
08909
08911
08916 virtual bool LoadFromFile( const MCHAR* szFilename, unsigned long lFlags ) = 0;
08917
08919
08934 virtual bool RevealInExplorer(const MSTR& path) =0;
08935
08936 protected:
08937
08939
08941
08946 virtual const MCHAR *GetDir(int which)=0;
08948 virtual int GetPlugInEntryCount()=0;
08950 virtual const MCHAR *GetPlugInDesc(int i)=0;
08952 virtual const MCHAR *GetPlugInDir(int i)=0;
08954 virtual BOOL SetDir(int which, MCHAR *dir) = 0;
08956 virtual MSTR GetMAXIniFile() = 0;
08958 };
08959
08961
08964 class Interface9 : public Interface8 {
08965 public:
08967 CoreExport static const Interface_ID kInterface9InterfaceID;
08968
08970
08984 virtual bool DoMaxBrowseForFolder(
08985 HWND aOwner,
08986 const MSTR& aInstructions,
08987 MSTR& aDir) = 0;
08988
08990
09018 virtual unsigned int DeleteNodes(
09019 INodeTab& aNodes,
09020 bool aKeepChildTM = true,
09021 bool aRedraw = true,
09022 bool overrideSlaveTM = false
09023 ) = 0;
09024 };
09025
09029 class Interface10 : public Interface9
09030 {
09031 public:
09032
09034 CoreExport static const Interface_ID kInterface10InterfaceID;
09035
09036
09038
09039
09043 virtual bool GetTrajectoryMode()const =0;
09048 virtual void SetTrajectoryMode(bool flag) =0;
09052 virtual bool GetTrajectoryKeySubMode()const =0;
09057 virtual void SetTrajectoryKeySubMode(bool flag) =0;
09062 virtual bool GetTrajectoryAddKeyMode() const =0;
09068 virtual void SetTrajectoryAddKeyMode(bool flag) =0;
09070
09073 virtual void DeleteSelectedTrajectoryKey() =0;
09075
09076
09078
09079
09083 virtual BOOL GetAutoKeyDefaultKeyOn() const = 0;
09087 virtual void SetAutoKeyDefaultKeyOn(BOOL setKey) = 0;
09088
09093 virtual TimeValue GetAutoKeyDefaultKeyTime() const = 0;
09098 virtual void SetAutoKeyDefaultKeyTime(TimeValue t) = 0;
09100
09105 enum ENodeProperties
09106 {
09108 kNodeProp_Material = 1<<0,
09110 kNodeProp_Layer = 1<<1,
09112 kNodeProp_All = (kNodeProp_Material | kNodeProp_Layer),
09113 };
09115
09130 virtual void FindNodes(
09131 const Tab<INode*>& templateNodes,
09132 Tab<INode*>& foundNodes,
09133 const unsigned int nodePropsToMatch = kNodeProp_All) = 0;
09134
09136 virtual MSTR GetPrompt() = 0;
09137
09139 virtual void FormatRenderTime(DWORD msec, MSTR& str, BOOL hundredths=FALSE) = 0;
09140
09141 };
09142
09143
09144
09148 class Interface11 : public Interface10
09149 {
09150 public:
09151
09153 CoreExport static const Interface_ID kInterface11InterfaceID;
09154
09156
09217 virtual HRESULT OpenMAXStorageFile(const WCHAR* filename, IStorage** pIStorage) = 0;
09218
09220
09221 virtual BOOL GetRendUseActiveView() = 0;
09223
09225 virtual void SetRendUseActiveView( BOOL useActiveView ) = 0;
09226
09228
09229 virtual int GetRendViewIndex() = 0;
09231
09234 virtual void SetRendViewIndex( int i ) = 0;
09235
09237 virtual int GetRenderPresetMRUListCount() = 0;
09239
09241 virtual const MCHAR* GetRenderPresetMRUListDisplayName( int i ) = 0;
09243
09245 virtual const MCHAR* GetRenderPresetMRUListFileName( int i ) = 0;
09246
09247
09248
09250
09253 virtual Matrix3 GetTransformGizmoTM() const = 0;
09254
09256
09258 virtual void DisplayViewportConfigDialogPage( int i ) = 0;
09259
09260
09261 };
09262
09263
09264
09268 class Interface12 : public Interface11
09269 {
09270 public:
09271
09273 CoreExport static const Interface_ID kInterface12InterfaceID;
09274
09290 virtual RECT GetMainWindowClientRect() const = 0;
09291 };
09292
09293
09297 class Interface13 : public Interface12
09298 {
09299 public:
09300
09302 CoreExport static const Interface_ID kInterface13InterfaceID;
09303
09305
09312 virtual ClassDesc *DoPickClassDlg(HWND hParent, MCHAR *title, SClass_ID super, PickClassCallback *pPickClassCB = NULL) = 0;
09313
09315
09323 virtual int DoMultiplePickClassDlg(HWND hParent, MCHAR *title, SClass_ID super, PickClassCallback *pPickClassCB, Tab<ClassDesc *> *classDescTab) = 0;
09324
09326
09328 virtual BOOL GetRendUseIterative() = 0;
09330
09333 virtual void SetRendUseIterative( BOOL b ) = 0;
09334
09348 virtual bool SaveSceneAsVersion(
09349 const MCHAR* fname,
09350 bool clearNeedSaveFlag = true,
09351 bool useNewFile = true,
09352 unsigned long saveAsVersion = MAX_RELEASE) = 0;
09353
09364 virtual bool SaveNodesAsVersion(
09365 const MCHAR* fname,
09366 const INodeTab* nodes,
09367 unsigned long saveAsVersion = MAX_RELEASE) = 0;
09368
09378 virtual bool SaveSelectedNodesAsVersion(
09379 const MCHAR* fname,
09380 unsigned long saveAsVersion = MAX_RELEASE) = 0;
09381
09383 virtual ILayerManager* GetLayerManager() = 0;
09384
09387 enum MtlDlgMode {
09388 mtlDlgMode_Basic = 0,
09389 mtlDlgMode_Advanced = 1,
09390 };
09392
09394
09397 virtual int GetMtlDlgMode() = 0;
09398
09400
09403 virtual void SetMtlDlgMode( int mode ) = 0;
09404
09406
09408 virtual BOOL IsMtlDlgShowing( int mode ) = 0;
09409
09411
09414 virtual void OpenMtlDlg( int mode ) = 0;
09415
09417
09419 virtual void CloseMtlDlg( int mode ) = 0;
09420
09422
09423
09438 virtual void SetNameSuffixLength(unsigned short suffixLength) = 0;
09439
09444 virtual unsigned short GetNameSuffixLength() const = 0;
09446
09447 };
09448
09449
09459 CoreExport void SetDontRepeatRefMsg(bool value, bool commitToInit);
09461 CoreExport bool DontRepeatRefMsg();
09465 CoreExport void PreRefNotifyDependents();
09466 CoreExport void PostRefNotifyDependents();
09467
09468
09472 CoreExport void SetInvalidateTMOpt(bool value, bool commitToInit);
09473 CoreExport bool GetInvalidateTMOpt();
09474
09475
09476