Anim WIP
This commit is contained in:
parent
418dcaebfd
commit
457094dc50
Binary file not shown.
18
premake5.lua
18
premake5.lua
|
@ -1,14 +1,14 @@
|
|||
AssimpInclude = "%{prj.location}\\Dependencies\\assimp"
|
||||
|
||||
-- outputdir = "%{wks.location}/bin/%{cfg.buildcfg}"
|
||||
-- interdir = "%{wks.location}/bin_int"
|
||||
-- workspace "ModelCompile"
|
||||
-- architecture "x64"
|
||||
-- configurations
|
||||
-- {
|
||||
-- "Release",
|
||||
-- "Debug"
|
||||
-- }
|
||||
outputdir = "%{wks.location}/bin/%{cfg.buildcfg}"
|
||||
interdir = "%{wks.location}/bin_int"
|
||||
workspace "ModelCompile"
|
||||
architecture "x64"
|
||||
configurations
|
||||
{
|
||||
"Release",
|
||||
"Debug"
|
||||
}
|
||||
|
||||
project "ModelCompiler"
|
||||
kind "ConsoleApp"
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -182,9 +182,9 @@ namespace SH_COMP
|
|||
| aiProcess_FindInstances // search for instanced meshes and remove them by references to one master
|
||||
| aiProcess_CalcTangentSpace // calculate tangents and bitangents if possible
|
||||
| aiProcess_JoinIdenticalVertices // join identical vertices/ optimize indexing
|
||||
| aiProcess_RemoveRedundantMaterials // remove redundant materials
|
||||
| aiProcess_FindInvalidData // detect invalid model data, such as invalid normal vectors
|
||||
| aiProcess_FlipUVs // flip the V to match the Vulkans way of doing UVs
|
||||
| aiProcess_ValidateDataStructure
|
||||
);
|
||||
|
||||
if (!scene || !scene->HasMeshes())
|
||||
|
|
70
src/main.cpp
70
src/main.cpp
|
@ -16,42 +16,44 @@
|
|||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
std::vector<std::string> paths;
|
||||
//std::vector<std::string> paths;
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
if (std::filesystem::is_directory(ASSET_ROOT))
|
||||
{
|
||||
for (auto& dir :
|
||||
std::filesystem::recursive_directory_iterator{ ASSET_ROOT })
|
||||
{
|
||||
if (dir.path().extension().string() == GLTF_EXTENSION ||
|
||||
dir.path().extension().string() == FBX_EXTENSION)
|
||||
{
|
||||
auto path = dir.path();
|
||||
path.make_preferred();
|
||||
paths.push_back(path.string());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Default path not found!" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if (argc > 1)
|
||||
{
|
||||
for (int i { 1 }; i < argc; ++i)
|
||||
{
|
||||
paths.emplace_back(argv[i]);
|
||||
}
|
||||
}
|
||||
//if (argc == 1)
|
||||
//{
|
||||
// if (std::filesystem::is_directory(ASSET_ROOT))
|
||||
// {
|
||||
// for (auto& dir :
|
||||
// std::filesystem::recursive_directory_iterator{ ASSET_ROOT })
|
||||
// {
|
||||
// if (dir.path().extension().string() == GLTF_EXTENSION ||
|
||||
// dir.path().extension().string() == FBX_EXTENSION)
|
||||
// {
|
||||
// auto path = dir.path();
|
||||
// path.make_preferred();
|
||||
// paths.push_back(path.string());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// std::cout << "Default path not found!" << std::endl;
|
||||
// return 1;
|
||||
// }
|
||||
//}
|
||||
//else if (argc > 1)
|
||||
//{
|
||||
// for (int i { 1 }; i < argc; ++i)
|
||||
// {
|
||||
// paths.emplace_back(argv[i]);
|
||||
// }
|
||||
//}
|
||||
|
||||
for (auto const& path : paths)
|
||||
{
|
||||
SH_COMP::MeshCompiler::LoadAndCompile(path);
|
||||
}
|
||||
//for (auto const& path : paths)
|
||||
//{
|
||||
// SH_COMP::MeshCompiler::LoadAndCompile(path);
|
||||
//}
|
||||
|
||||
SH_COMP::MeshCompiler::LoadAndCompile("Racoon.gltf");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue