restructure work
This commit is contained in:
parent
64c8492e5c
commit
e01595e155
3424 changed files with 492 additions and 1696851 deletions
4
engine/assets/export_embedded_fbx.py
Normal file
4
engine/assets/export_embedded_fbx.py
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
import sys
|
||||
|
||||
bpy.ops.export_scene.fbx(filepath=sys.argv[-1], path_mode='COPY', embed_textures=True)
|
||||
22
engine/assets/modelLoader.cpp
Normal file
22
engine/assets/modelLoader.cpp
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
#include "modelLoader.h"
|
||||
|
||||
namespace engine::assets
|
||||
{
|
||||
Model loadBlendModel(const char *path)
|
||||
{
|
||||
return Model(path);
|
||||
}
|
||||
Model loadModel(const char *path)
|
||||
{
|
||||
int length = strlen(path);
|
||||
const char *blendEnd = &path[length - 6];
|
||||
std::cout << blendEnd << std::endl;
|
||||
|
||||
if (std::strcmp(blendEnd, ".blend")) {
|
||||
return loadBlendModel(path);
|
||||
}
|
||||
|
||||
return Model(path);
|
||||
}
|
||||
}
|
||||
9
engine/assets/modelLoader.h
Normal file
9
engine/assets/modelLoader.h
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
#pragma once
|
||||
#include "engine/model.h"
|
||||
|
||||
namespace engine::assets
|
||||
{
|
||||
Model loadBlendModel(const char *path);
|
||||
Model loadModel(const char *path);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue