84 virtual Texture* DoUnproject(
int xSize,
int ySize,
bool want16BitFP =
false,
bool bTranparentBackground =
true);
92 #define NUM_CRASHFLAGS (128)
96 #define CRF_MENU_COMMAND 1
97 #define CRF_HARDWARE_RENDER 2
98 #define CRF_TEXTURE_PAINT 3
99 #define CRF_FAST_BRUSH 4
100 #define CRF_TEXTURE 5
102 #define CRF_SCENE_VIEW 7
104 #define CRF_SUBDIVIDE 9
105 #define CRF_TEXTURE_LAYERS 10
107 #define CRF_PAINT_BUFFER 12
108 #define CRF_IBL_MATERIAL 13
109 #define CRF_MB_MATERIAL 14
110 #define CRF_HW_PICKER 15
112 #define CRF_CAMERA 17
113 #define CRF_CAMERA_2 18
114 #define CRF_INTERFACE_1 19
115 #define CRF_INTERFACE_2 20
116 #define CRF_INTERFACE_3 21
117 #define CRF_INTERFACE_4 22
118 #define CRF_DIALOGS_1 23
119 #define CRF_DIALOGS_2 24
120 #define CRF_DIALOGS_3 25
121 #define CRF_DIALOGS_4 26
122 #define CRF_DIALOGS_5 27
123 #define CRF_DIALOGS_6 28
124 #define CRF_CG_MATERIAL 29
125 #define CRF_CG_MATERIAL_2 30
126 #define CRF_SCENE_VIEW_2 31
128 #define CRF_SCENE_2 33
129 #define CRF_IMAGE_BASE 34
134 #define CRF_00 ((unsigned int)(1u ))
135 #define CRF_01 ((unsigned int)(1u<< 1))
136 #define CRF_02 ((unsigned int)(1u<< 2))
137 #define CRF_03 ((unsigned int)(1u<< 3))
138 #define CRF_04 ((unsigned int)(1u<< 4))
139 #define CRF_05 ((unsigned int)(1u<< 5))
140 #define CRF_06 ((unsigned int)(1u<< 6))
141 #define CRF_07 ((unsigned int)(1u<< 7))
142 #define CRF_08 ((unsigned int)(1u<< 8))
143 #define CRF_09 ((unsigned int)(1u<< 9))
144 #define CRF_10 ((unsigned int)(1u<<10))
145 #define CRF_11 ((unsigned int)(1u<<11))
146 #define CRF_12 ((unsigned int)(1u<<12))
147 #define CRF_13 ((unsigned int)(1u<<13))
148 #define CRF_14 ((unsigned int)(1u<<14))
149 #define CRF_15 ((unsigned int)(1u<<15))
150 #define CRF_16 ((unsigned int)(1u<<16))
151 #define CRF_17 ((unsigned int)(1u<<17))
152 #define CRF_18 ((unsigned int)(1u<<18))
153 #define CRF_19 ((unsigned int)(1u<<19))
154 #define CRF_20 ((unsigned int)(1u<<20))
155 #define CRF_21 ((unsigned int)(1u<<21))
156 #define CRF_22 ((unsigned int)(1u<<22))
157 #define CRF_23 ((unsigned int)(1u<<23))
158 #define CRF_24 ((unsigned int)(1u<<24))
159 #define CRF_25 ((unsigned int)(1u<<25))
160 #define CRF_26 ((unsigned int)(1u<<26))
161 #define CRF_27 ((unsigned int)(1u<<27))
162 #define CRF_28 ((unsigned int)(1u<<28))
163 #define CRF_29 ((unsigned int)(1u<<29))
164 #define CRF_30 ((unsigned int)(1u<<30))
165 #define CRF_31 ((unsigned int)(1u<<31))
173 unsigned int m_MaxProgress, m_CurProgress;
179 char m_RingBuffer[256][256];
180 int m_head, m_count, m_total;
183 MBCrashInfo() : m_MaxProgress(0), m_CurProgress(0), m_head(0), m_count(0), m_total(0)
184 { memset(m_FlagArray, 0,
sizeof(m_FlagArray)); memset(m_RingBuffer, 0,
sizeof(m_RingBuffer)); }
186 void AddToFlag(
int flagNum,
unsigned int v) { m_FlagArray[flagNum] +=
v; }
187 void SubFromFlag(
int flagNum,
unsigned int v) { m_FlagArray[flagNum] -=
v; }
188 unsigned int GetFlag(
int flagNum)
const {
return m_FlagArray[flagNum]; }
190 void AddStringToRingBuffer(
const QString &prefix,
const QString &entry);
193 void ClearProgress() { m_ProgressName =
""; m_MaxProgress = 0; m_CurProgress = 0; }
197 friend class ::CIPModule;
226 void Log(
const QString &sMessage);
240 void LogMemoryStatus(
248 void LogMemoryBlocks(
249 float fSizeLimit = 0.01
255 bool CreateNewScene();
289 void RecordCommand(
const QString &sCommand );
295 class Scene *CreateDefaultScene(
void );
329 const char *sSourceFileName,
330 const char *sFunctionName,
336 const char *sSourceFileName,
337 const char *sFunctionName,
363 QString MudboxVersionName(
void )
const;
366 QString MudboxBuildID(
void )
const;
375 bool ExtractArchiveFile(
QString sArchiveFilePath,
QString sDestPath);
379 QString DataDirectory(
void )
const;
382 QString ApplicationDirectory(
void )
const;
385 QString ProjectFilesDirectory(
void )
const;
388 QString SafeWritableDirectory(
void )
const;
394 int CommandLineParameterCount(
void )
const;
397 QString CommandLineParameterName(
int iIndex )
const;
400 QString CommandLineParameterValue(
int iIndex )
const;
404 bool IsTestModeOn(
void )
const;
407 bool IsBetaVersion(
void )
const;
416 Image *ExtractUnprojectedTextures(
const QString &sChannel,
420 bool bTiledImg =
false,
421 bool allLayers =
false
424 Image *ExtractUnprojectedTextures(
int iWidth,
427 bool bTiledImg =
false,
428 bool allLayers =
false
441 Image *ExtractShadingMap(
int iWidth,
444 bool bTiledImg =
false
458 void ReportVideoMemoryUsage(
463 qint64 VideoMemoryUsage(
void )
const;
466 qint64 TotalVideoMemory(
void )
const;
482 void FlushUndoQueue();
520 FileEventNotifier::Type eType,
550 Timer(
const char *sName,
int &iIndex );
553 static unsigned int Current(
void );
556 static void ResetAll(
void );
558 static void LogAll(
void );
566 void AddRenderedPolygonCount(
unsigned int iPolygonCount );
567 int FrameCount(
void )
const;
575 template <
typename c >
615 template <
typename c >
621 inline Instance(
c* pObject ) : m_pObject( pObject ) {};
622 inline Instance(
void ) { m_pObject = CreateInstance<c>(); };
623 inline ~Instance(
void ) {
if( m_pObject )
delete m_pObject; };
624 inline c *operator ->(
void ) {
return m_pObject; };
625 inline const c *operator ->(
void )
const {
return m_pObject; };
626 inline operator c*(
void )
const {
return m_pObject; };
630 inline c *
Release() {
c* pTemp = m_pObject; m_pObject = 0;
return pTemp; }
645 static QString SanitizeFileName(
663 {
Kernel()->GetCrashInfo()->AddToFlag(flagNum,
v); }
666 {
Kernel()->GetCrashInfo()->SubFromFlag(m_flagNum, m_v); m_flagNum = 0; m_v = 0; }
c * CreateInstance(void)
This function provides an easy way to create objects based on interfaces.
aevent TangentMirrorUpdateEvent
This event is triggered when tangent mirror information is updated.
#define MBDLL_TEMPLATE_DECL
aevent ScenePreDeletedEvent
This event is triggered before a scene is going to be deleted.
aevent LowMemoryEvent
This event is triggered when the memory status gets critical.
MBCrashInfo * GetCrashInfo()
The Scene class is the container object for all the data in a Mudbox scene.
DumpFcnTyp GetImageStatsFcn() const
WindowPlugin is an interface to implement window based plugins.
Format
Image channel datatype type.
void SetCrashHelpString(const QString &st)
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
please do not access this pointer directly — Use the inline Kernel() function just below...
This is the base class for most classes in the Mudbox SDK.
void AddToFlag(int flagNum, unsigned int v)
unsigned int GetFlag(int flagNum) const
aevent StrokeEndEvent
This event is triggered when a stroke has ended. See the class EventGate for more details...
void SetProgressValue(unsigned int val)
c * Release()
Take ownership of m_pObject.
This class is collects miscellaneous utility functions.
void SetHelpString(const QString &st)
MBDLL_DECL class mudbox::Kernel * _g_pKernel__DO_NOT_USE_THIS_DIRECTLY_
MBCrashReporterFlag(int flagNum, unsigned int v=1)
void AddStringToCrashBuffer(const QString &prefix, const QString &entry)
aevent RestoreMemoryEvent
This event is triggered when memory status is no longer critical.
void AddStringToRingBuffer(const QString &prefix, const QString &entry)
This structure represents and describes a class.
aevent StrokeBeginEvent
This event is triggered when a new stroke is started. See the class EventGate for more details...
aptr< FileEventNotifier > FileEvent
This is a pointer to the latest file event.
This class represents an event receiver/triggerer point.
TrayAccessor allows plugins to access the trays in the GUI.
void SetProgressName(const QString &name, unsigned int maxVal)
DumpFcnTyp GetPaintBufferStatsFcn() const
Holds useful information about the current session of Mudbox.
Represents a texture tile inside a texture pool.
GLuint const GLchar * name
Class: ConvolutionKernel.
The base class of all operations.
The main API access point to Mudbox, contains low level functions and data.
void SetImageStatsFcn(DumpFcnTyp f)
Holds Mudbox application preferences.
QString(* DumpFcnTyp)(void)
This class will extract the unprojected current diffuse texture layer from the current camera positio...
#define DECLARE_CLASS
This macro should be used in declaration of classes which are inherited from the Node class (or any d...
The Interface class provides access to user interface related functions and events.
void SubFromFlag(int flagNum, unsigned int v)
aevent PostUndoRedoEvent
This event is triggered after an undo or redo operation is completed.
This is the base image type defining the interface to images.
#define Q_DECLARE_TR_FUNCTIONS(context)
Holds information about the a recent or in-progress file event.
XRef provides functionality to resolve relative paths to external files into absolute paths...
This is a helper class to manage class instances implemented in plugins, provided for convenience...
Represents the 3D viewport where Mudbox renders the scene.
astring NextCommand
This attribute always contains the next command. Plugins can link their own attribute to this one...
void SetPaintBufferStatsFcn(DumpFcnTyp f)