svcore.h

Go to the documentation of this file.
00001 //
00002 // Copyright 2010 Autodesk, Inc.  All rights reserved.
00003 //
00004 // Use of this software is subject to the terms of the Autodesk license
00005 // agreement provided at the time of installation or download, or which
00006 // otherwise accompanies this software in either electronic or hard copy form.  
00007 //
00008 #pragma once
00009 #include <WTypes.h>
00010 #include "maxheap.h"
00011 
00013 enum SvTraverseStatus
00014 {
00015     SVT_PROCEED,        
00016     SVT_EXISTS,         
00017     SVT_DO_NOT_PROCEED  
00018 };
00019 
00021 enum SvReferenceType
00022 {
00023     REFTYPE_CHILD,
00024     REFTYPE_SUBANIM,
00025     REFTYPE_PLUGIN
00026 };
00027 
00029 enum SvRelationshipType
00030 {
00031     RELTYPE_INSTANCE,
00032     RELTYPE_PARAMWIRE,
00033     RELTYPE_CONSTRAINT,
00034     RELTYPE_LIGHT,
00035     RELTYPE_MODIFIER,
00036     RELTYPE_CONTROLLER,
00037     RELTYPE_OTHER
00038 };
00039 
00040 
00042 
00043 static const DWORD SV_FILTER_SELOBJECTS     = (1<<0);   
00044 static const DWORD SV_FILTER_OBJECTMODS     = (1<<1);   
00045 static const DWORD SV_FILTER_BASEPARAMS     = (1<<2);   
00046 static const DWORD SV_FILTER_MATPARAMS      = (1<<3);   
00047 static const DWORD SV_FILTER_GEOM           = (1<<4);   
00048 static const DWORD SV_FILTER_SHAPES         = (1<<5);   
00049 static const DWORD SV_FILTER_LIGHTS         = (1<<6);   
00050 static const DWORD SV_FILTER_CAMERAS        = (1<<7);   
00051 static const DWORD SV_FILTER_HELPERS        = (1<<8);   
00052 static const DWORD SV_FILTER_WARPS          = (1<<9);   
00053 static const DWORD SV_FILTER_VISIBLE_OBJS   = (1<<10);  
00054 static const DWORD SV_FILTER_CONTROLLERS    = (1<<11);  
00055 static const DWORD SV_FILTER_ANIMATEDONLY   = (1<<12);  
00056 static const DWORD SV_FILTER_MAPS           = (1<<13);  
00057 static const DWORD SV_FILTER_BONES          = (1<<14);  
00058 static const DWORD SV_FILTER_BONEOBJECTS    = (1<<15);  
00059 static const DWORD SV_FILTER_PB_PARAMS      = (1<<16);
00060 static const DWORD SV_FILTER_PRS_POS        = (1<<17);
00061 static const DWORD SV_FILTER_PRS_ROT        = (1<<18);
00062 static const DWORD SV_FILTER_PRS_SCALE      = (1<<19);
00063 static const DWORD SV_FILTER_MASTER_POINT   = (1<<20);
00064 static const DWORD SV_FILTER_SKIN_DETAILS   = (1<<21);
00066 
00067 
00071 static const int SV_UICLR_WINBK               = 0;  
00072 static const int SV_UICLR_NODEBK              = 1;
00073 static const int SV_UICLR_SELNODEBK           = 2;
00074 static const int SV_UICLR_NODE_HIGHLIGHT      = 3;
00075 static const int SV_UICLR_MATERIAL_HIGHLIGHT  = 4;
00076 static const int SV_UICLR_MODIFIER_HIGHLIGHT  = 5;
00077 static const int SV_UICLR_PLUGIN_HIGHLIGHT    = 6;
00078 static const int SV_UICLR_SUBANIM_LINE        = 7;
00079 static const int SV_UICLR_CHILD_LINE          = 8;
00080 static const int SV_UICLR_FRAME               = 9;
00081 static const int SV_UICLR_SELTEXT             = 10;
00082 static const int SV_UICLR_TEXT                = 11;
00083 static const int SV_UICLR_FOCUS               = 12;
00084 static const int SV_UICLR_MARQUIS             = 13;
00085 static const int SV_UICLR_COLLAPSEARROW       = 14;
00086 static const int SV_UICLR_GEOMOBJECT_BK       = 15;
00087 static const int SV_UICLR_LIGHT_BK            = 16;
00088 static const int SV_UICLR_CAMERA_BK           = 17;
00089 static const int SV_UICLR_SHAPE_BK            = 18;
00090 static const int SV_UICLR_HELPER_BK           = 19;
00091 static const int SV_UICLR_SYSTEM_BK           = 20;
00092 static const int SV_UICLR_CONTROLLER_BK       = 21;
00093 static const int SV_UICLR_MODIFIER_BK         = 22;
00094 static const int SV_UICLR_MATERIAL_BK         = 23;
00095 static const int SV_UICLR_MAP_BK              = 24;
00096 static const int SV_UICLR_GRID                = 25;
00097 static const int SV_UICLR_REL_INSTANCE        = 26;
00098 static const int SV_UICLR_REL_CONSTRAINT      = 27;
00099 static const int SV_UICLR_REL_PARAMWIRE       = 28;
00100 static const int SV_UICLR_REL_LIGHT           = 29;
00101 static const int SV_UICLR_REL_MODIFIER        = 30;
00102 static const int SV_UICLR_REL_CONTROLLER      = 31;
00103 static const int SV_UICLR_REL_OTHER           = 32;
00104 static const int SV_UICLR_SPACEWARP_BK        = 33;
00105 static const int SV_UICLR_BASEOBJECT_BK       = 34;
00106 
00107 static const int SV_UICLR_CACHE_SIZE          = 35;
00109 
00112 static const int SV_NO_SWATCH                           = 0xFFFFFFFF;
00113 
00120 static const DWORD SV_INITIALLY_HIDDEN          = 0x00000001;
00121 
00124 static const DWORD SV_DUPLICATE_INSTANCES       = 0x00000002;
00125 
00130 static const DWORD SV_INITIALLY_CLOSED          = 0x00000004;
00132 
00138 static const int SV_NO_ID                       = 0x80000000;
00140 
00141 class IGraphNode;
00142 class Animatable;
00143 class IGraphObjectManager;
00144 
00266 class MultiSelectCallback: public MaxHeapOperators
00267     {
00268     public:
00269         virtual ~MultiSelectCallback() {}
00274     virtual int Priority() = 0;     // Used for sorting select order.
00279     virtual void Begin(IGraphObjectManager *gom, bool clear) = 0;
00284     virtual void Select(IGraphObjectManager *gom, IGraphNode *gNode, bool isSelected) = 0;
00288     virtual void End(IGraphObjectManager *gom) = 0;
00289     };
00290 
00293 class IGraphRef: public MaxHeapOperators
00294     {
00295     public:
00296     };
00297 
00301 class IGraphNode: public MaxHeapOperators
00302     {
00303     public:
00304 
00306     virtual Animatable *GetAnim() = 0;
00307 
00312     virtual IGraphNode *GetParentNode() = 0;
00313 
00317     virtual Animatable *GetOwner() = 0;
00318 
00324     virtual int GetID() = 0;
00325     };
00326 
00330 class SvGraphNodeReference: public MaxHeapOperators
00331     {
00332     public:
00333 
00335     IGraphNode *gNode;
00337     SvTraverseStatus stat;
00338 
00340     SvGraphNodeReference()
00341         {
00342         gNode= NULL;
00343         stat = SVT_DO_NOT_PROCEED;
00344         }
00345     };
00346 
00352 class IGraphObjectManager: public MaxHeapOperators
00353     {
00354     public:
00355 
00376     virtual void PushLevel(Animatable *anim, int id = SV_NO_ID) = 0;
00377     
00380     virtual void PopLevel() = 0;
00381 
00414     virtual SvGraphNodeReference AddAnimatable(Animatable *anim, Animatable *owner, int id, DWORD flags = 0) = 0;
00415 
00495     virtual IGraphRef *AddReference(IGraphNode *maker, IGraphNode *target, SvReferenceType type) = 0;
00496 
00503     virtual IGraphRef *AddRelationship( IGraphNode *maker, Animatable *anim, int id, SvRelationshipType type) = 0;
00504 
00506     virtual void SvEditSelectedNodeProperties() = 0;
00507 
00511     virtual void SvSelectInMaterialEditor(IGraphNode *gNode) = 0;
00512 
00516     virtual void SvSetCurEditObject(IGraphNode *gNode) = 0;
00517 
00520     virtual bool SvIsCurEditObject(IGraphNode *gNode) = 0;
00521 
00522     virtual bool ApplyModifier(IGraphNode *gModNode, IGraphNode *gParentNode) = 0;
00523     virtual bool DeleteModifier(IGraphNode *gNode) = 0;
00524 
00540     virtual bool ApplyController(IGraphNode *gSrcNode, IGraphNode *gDestNode) = 0;
00541 
00543     virtual void SvInvalidateView() = 0;
00544 
00547     virtual void SvInvalidateNode(IGraphNode *gNode) = 0;
00548 
00550     virtual void SvUpdateMaterialEditor() = 0;
00551 
00553     virtual void SvUpdateModifierPanel() = 0;
00554 
00557     virtual void SetFilter(DWORD mask) = 0;
00558     
00561     virtual void ClearFilter(DWORD mask) = 0;
00562     
00566     virtual bool TestFilter(DWORD mask) = 0;
00567 
00569     virtual COLORREF SvGetUIColor(int colorIndex) = 0;
00570 
00572     virtual HWND GetHWnd() = 0;
00573     };
00574 
00575