Reworked file structure

This commit is contained in:
antopilo
2025-01-30 22:41:17 -05:00
parent e8a84c98ec
commit 92a64f19ea
2215 changed files with 1832 additions and 2069 deletions

View File

@@ -0,0 +1,31 @@
#include "ModelResourceInspector.h"
#include <imgui/imgui.h>
#include "MaterialEditor.h"
ModelResourceInspector::ModelResourceInspector(Ref<Nuake::Model> model)
{
_model = model;
}
void ModelResourceInspector::Draw()
{
ImGui::BeginChild("modelInspector", ImVec2(0, 100 * std::size(_model->GetMeshes())), true);
{
for (uint32_t i = 0; i < std::size(_model->GetMeshes()); i++)
{
std::string headerLabel = "Mesh " + std::to_string(i);
if (ImGui::CollapsingHeader(headerLabel.c_str()))
{
std::string childId = "materialEditor" + std::to_string(i);
ImGui::BeginChild(childId.c_str(), ImVec2(0, 0), false);
{
MaterialEditor editor;
editor.Draw(_model->GetMeshes().at(i)->GetMaterial());
}
ImGui::EndChild();
}
}
}
ImGui::EndChild();
}