mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-06-26 19:08:07 +00:00
fix: not being able to write xmodel_export with omitted default armature
This commit is contained in:
@@ -532,6 +532,12 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
bool CanOmitDefaultArmature()
|
||||
{
|
||||
return ObjWriting::Configuration.ModelOutputFormat != ObjWriting::Configuration_t::ModelOutputFormat_e::XMODEL_EXPORT
|
||||
&& ObjWriting::Configuration.ModelOutputFormat != ObjWriting::Configuration_t::ModelOutputFormat_e::XMODEL_BIN;
|
||||
}
|
||||
|
||||
void PopulateXModelWriter(XModelCommon& out, const AssetDumpingContext& context, const unsigned lod, const XModel* model)
|
||||
{
|
||||
DistinctMapper<Material*> materialMapper(model->numsurfs);
|
||||
@@ -542,8 +548,8 @@ namespace
|
||||
AddXModelObjects(out, model, lod, materialMapper);
|
||||
AddXModelVertices(out, model, lod);
|
||||
AddXModelFaces(out, model, lod);
|
||||
|
||||
if (!HasDefaultArmature(model, lod))
|
||||
|
||||
if (!CanOmitDefaultArmature() || !HasDefaultArmature(model, lod))
|
||||
{
|
||||
AddXModelBones(out, context, model);
|
||||
AddXModelVertexBoneWeights(out, model, lod);
|
||||
|
||||
Reference in New Issue
Block a user