mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-17 05:33:47 +00:00
Implements a Material Instance viewer to the material editor to see a feature-filtered dump of the generated shaders for a given material.
This commit is contained in:
parent
54b4d2eaaf
commit
2479d388f2
19 changed files with 626 additions and 12 deletions
|
|
@ -36,7 +36,7 @@
|
|||
#include "sfx/sfxTypes.h"
|
||||
#include "core/util/safeDelete.h"
|
||||
#include "T3D/accumulationVolume.h"
|
||||
|
||||
#include "gui/controls/guiTreeViewCtrl.h"
|
||||
|
||||
IMPLEMENT_CONOBJECT( Material );
|
||||
|
||||
|
|
@ -647,6 +647,12 @@ DefineEngineMethod( Material, dumpInstances, void, (),,
|
|||
MATMGR->dumpMaterialInstances( object );
|
||||
}
|
||||
|
||||
DefineEngineMethod(Material, getMaterialInstances, void, (GuiTreeViewCtrl* matTree), (nullAsType< GuiTreeViewCtrl*>()),
|
||||
"Dumps a formatted list of the currently allocated material instances for this material to the console.")
|
||||
{
|
||||
MATMGR->getMaterialInstances(object, matTree);
|
||||
}
|
||||
|
||||
DefineEngineMethod( Material, getAnimFlags, const char*, (U32 id), , "" )
|
||||
{
|
||||
char * animFlags = Con::getReturnBuffer(512);
|
||||
|
|
@ -706,6 +712,13 @@ DefineEngineMethod( Material, setAutoGenerated, void, (bool isAutoGenerated), ,
|
|||
object->setAutoGenerated(isAutoGenerated);
|
||||
}
|
||||
|
||||
DefineEngineMethod(Material, getAutogeneratedFile, const char*, (), , "Get filename of autogenerated shader file")
|
||||
{
|
||||
SimObject *material = static_cast<SimObject *>(object);
|
||||
return material->getFilename();
|
||||
}
|
||||
|
||||
|
||||
// Accumulation
|
||||
bool Material::_setAccuEnabled( void *object, const char *index, const char *data )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue