Merge branch 'ModernEditorLayoutWIP' of https://github.com/Areloch/Torque3D into development

This commit is contained in:
Areloch 2019-05-13 00:28:23 -05:00
commit 3697737498
148 changed files with 3463 additions and 547 deletions

View file

@ -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);
}