mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Merge branch 'ModernEditorLayoutWIP' of https://github.com/Areloch/Torque3D into development
This commit is contained in:
commit
3697737498
148 changed files with 3463 additions and 547 deletions
|
|
@ -37,6 +37,8 @@
|
|||
#include "core/util/safeDelete.h"
|
||||
#include "ts/tsShape.h"
|
||||
|
||||
#include "gui/controls/guiTreeViewCtrl.h"
|
||||
|
||||
class MatInstParameters;
|
||||
|
||||
class MatInstanceParameterHandle : public MaterialParameterHandle
|
||||
|
|
@ -598,3 +600,35 @@ void MatInstance::dumpShaderInfo() const
|
|||
|
||||
mProcessedMaterial->dumpMaterialInfo();
|
||||
}
|
||||
|
||||
void MatInstance::getShaderInfo(GuiTreeViewCtrl* tree, U32 item) const
|
||||
{
|
||||
if (mMaterial == NULL)
|
||||
{
|
||||
Con::errorf("Trying to get Material information on an invalid MatInstance");
|
||||
return;
|
||||
}
|
||||
|
||||
if (mProcessedMaterial == NULL)
|
||||
{
|
||||
Con::printf(" [no processed material!]");
|
||||
return;
|
||||
}
|
||||
|
||||
const FeatureSet features = mProcessedMaterial->getFeatures();
|
||||
|
||||
String featureDesc = "";
|
||||
for (U32 i = 0; i < features.getCount(); i++)
|
||||
{
|
||||
const FeatureType& ft = features.getAt(i);
|
||||
|
||||
featureDesc += ft.getName();
|
||||
|
||||
if(i+1 < features.getCount())
|
||||
featureDesc += ", ";
|
||||
}
|
||||
|
||||
U32 newItem = tree->insertItem(item, featureDesc);
|
||||
|
||||
mProcessedMaterial->getMaterialInfo(tree, newItem);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue