Merge pull request #55 from SpicyGangjeong/Model

20251110 정현빈
This commit is contained in:
hyunbin14
2025-11-10 16:20:05 +09:00
committed by GitHub
41 changed files with 46 additions and 41 deletions
@@ -132,42 +132,26 @@ void CLevel_ObjectViewer::Add_Human()
void CLevel_ObjectViewer::Show_ModelFilePath()
{
/*GUI::Begin("Model_List");
GUI::Begin("Model_List");
if(GUI::BeginTabBar("Model_List"))
{
if (GUI::BeginTabItem("Assimp_Model"))
{
if (m_pGameInstance->ModelFilePathCount() > 0)
{
for (_uint i = 0; i < m_pGameInstance->ModelFilePathCount(); i++)
{
GUI::Text(m_pGameInstance->Load_ModelFilePath(i));
GUI::SameLine();
std::string label = "Binary##" + std::to_string(i);
if (GUI::Button(label.c_str()))
{
m_pGameInstance->SaveAssimpModel(m_pGameInstance->Load_ModelFilePath(i));
}
}
GUI::EndTabItem();
}
}
if (GUI::BeginTabItem("Binary_Model"))
if (GUI::BeginTabItem("Model"))
{
if (m_pGameInstance->BinaryModelFilePathCount() > 0)
{
for (_uint i = 0; i < m_pGameInstance->BinaryModelFilePathCount(); i++)
{
GUI::Text(m_pGameInstance->Load_BinaryModelFilePath(i));
if (GUI::Button(m_pGameInstance->Load_BinaryModelFilePath(i)))
{
}
}
}
GUI::EndTabItem();
}
}
GUI::EndTabBar();
GUI::End();*/
GUI::End();
}
void CLevel_ObjectViewer::Show_AnimList()
+10 -13
View File
@@ -516,44 +516,41 @@ HRESULT CLoader::Loading_For_ObjectViewer()
m_strMessage = TEXT("Model Loading..");
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinBody_Model"),
CModel::Create(m_pDevice, m_pContext, "../Bin/Resources/Models/Goblin/GoblinBody.fbx", MODEL::ANIM, XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity(), 0))))
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_HumanBody_Model"),
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Body/Body", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Body/Body.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_HumanHead_Model"),
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Head/Head", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Head/Head.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_HumanHair_Model"),
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Hair/Hair", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Human/Hair/Hair.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinHead_Model"),
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Goblin/GoblinHead", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Goblin/GoblinHead.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
return E_FAIL;
m_strMessage = TEXT("Shader Loading..");
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinBody_Model"),
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Goblin/GoblinBody", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Goblin/GoblinBody.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Steve_Model"),
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Steve/Steve",XMMatrixScaling(0.01f,0.01f,0.01f)* XMMatrixIdentity()))))
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Steve/Steve.bin",XMMatrixScaling(0.01f,0.01f,0.01f)* XMMatrixIdentity()))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_TombProtector_Model"),
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/TombProtector/TombProtector", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/TombProtector/TombProtector.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Model"),
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Troll/Troll", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Troll/Troll.bin", XMMatrixScaling(0.001f, 0.001f, 0.001f) * XMMatrixIdentity()))))
return E_FAIL;
m_strMessage = TEXT("Shader Loading..");
m_strMessage = TEXT("Prototype Loading..");
/* For.Prototype_GameObject_RootModelPart */
+17 -5
View File
@@ -827,13 +827,25 @@ HRESULT CModel::Initialize_Prototype()
HRESULT CModel::Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _fmatrix PreTransformMatrix)
{
if (!LoadData(pModelFilePath))
_char szTextureFileName[MAX_PATH] = {};
_char szDir[MAX_PATH] = {};
_char szName[MAX_PATH] = {};
_char szEXT[MAX_PATH] = {};
_splitpath_s(pModelFilePath, nullptr, 0, szDir, MAX_PATH, szName, MAX_PATH, szEXT, MAX_PATH);
if (strcmp(".bin", szEXT) == 0)
{
LoadData(pModelFilePath);
}
else if (strcmp(".fbx", szEXT) == 0)
{
_char Temp[256];
strcpy_s(Temp, pModelFilePath);
strcat_s(Temp,".fbx");
Assimp_Model_Load(Temp, eType, PreTransformMatrix, 0);
SaveAssimpModel(pModelFilePath);
strcpy_s(Temp, szDir);
strcat_s(Temp, szName);
strcat_s(Temp, ".bin");
Assimp_Model_Load(pModelFilePath, eType, PreTransformMatrix, 0);
SaveAssimpModel(Temp);
return S_OK;
}
m_pSaveModel = m_pGameInstance->Load_SaveModel(pModelFilePath);