Grab all materials

This commit is contained in:
FakeShemp
2015-12-09 11:58:49 +01:00
parent ed8d0fb608
commit c8cb0ee939
7 changed files with 307 additions and 5 deletions
+10 -4
View File
@@ -141,9 +141,9 @@ void Menu::CancelClicked(bool)
void Menu::Button1Clicked(bool)
{
if(exportAnimationsButton->isChecked())
cout << "1 checked!" << endl;
MGlobal::displayInfo("1 checked!");
else
cout << "1 unchecked!" << endl;
MGlobal::displayInfo("1 unchecked!");
}
void Menu::Button2Clicked(bool)
@@ -222,11 +222,16 @@ void Menu::GetMeshData(MObject object)
}
void Menu::exportMaterial(MObject object)
void Menu::GetMaterialData()
{
MItDependencyNodes matIt(MFn::kLambert);
this->MaterialHandler = new Material();
// Traverse scene and return vector with all materials
std::vector<MaterialNode>* AllMaterials = MaterialHandler->DoIt();
// Access the colorR component of one material (example)
cout << AllMaterials->at(0).Color[0] << endl;
MGlobal::displayInfo(MString() + AllMaterials->at(0).Color[0]);
}
Menu::~Menu()
@@ -236,4 +241,5 @@ Menu::~Menu()
//delete exportPath;
//delete fileDialog;
fileDialog->~QFileDialog();
delete MaterialHandler;
}