mirror of https://github.com/AxioDL/metaforce.git
bmesh generation tweaks
This commit is contained in:
parent
cb7c642dac
commit
40c39ee83b
|
@ -145,6 +145,16 @@ void FinishBlenderMesh(HECL::BlenderConnection::PyOutStream& os,
|
|||
"\n"
|
||||
"bm.to_mesh(mesh)\n"
|
||||
"bm.free()\n"
|
||||
"\n"
|
||||
"# Remove redundant materials\n"
|
||||
"present_mats = set()\n"
|
||||
"for poly in mesh.polygons:\n"
|
||||
" present_mats.add(poly.material_index)\n"
|
||||
"for mat_idx in reversed(range(len(mesh.materials))):\n"
|
||||
" if mat_idx not in present_mats:\n"
|
||||
" mesh.materials.pop(index=mat_idx, update_data=True)\n"
|
||||
"\n"
|
||||
"mesh.update()\n"
|
||||
"\n";
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
make_dnalist(liblist
|
||||
CMDL)
|
||||
CMDL
|
||||
DeafBabe)
|
||||
add_library(DNACommon
|
||||
DNACommon.hpp DNACommon.cpp
|
||||
${liblist}
|
||||
|
@ -10,5 +11,6 @@ add_library(DNACommon
|
|||
TXTR.hpp TXTR.cpp
|
||||
ANCS.hpp
|
||||
ANIM.hpp ANIM.cpp
|
||||
DeafBabe.cpp
|
||||
Tweaks/ITweakPlayer.hpp
|
||||
Tweaks/ITweakPlayerControl.hpp)
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
#ifndef _DNACOMMON_DEAFBABE_HPP_
|
||||
#define _DNACOMMON_DEAFBABE_HPP_
|
||||
|
||||
#include "DNACommon.hpp"
|
||||
|
||||
namespace Retro
|
||||
{
|
||||
namespace DNACommon
|
||||
{
|
||||
|
||||
struct DeafBabe : BigDNA
|
||||
{
|
||||
Delete expl;
|
||||
std::vector<atUint64> materials;
|
||||
std::vector<atUint8> vertMats;
|
||||
std::vector<atUint8> edgeMats;
|
||||
std::vector<atUint8> polyMats;
|
||||
std::vector<std::pair<atUint16, atUint16>> edgeVertConnections;
|
||||
std::vector<std::pair<atUint16, atUint16>> triangleEdgeConnections;
|
||||
void read(Athena::io::IStreamReader& reader)
|
||||
{
|
||||
}
|
||||
void write(Athena::io::IStreamWriter& writer) const
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _DNACOMMON_DEAFBABE_HPP_
|
Loading…
Reference in New Issue