Skip to content

Commit

Permalink
Commentary for the invalid model fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sprunk authored Sep 13, 2023
1 parent b0494c9 commit 0cb6f16
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rts/Rendering/Models/AssParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ void CAssParser::Load(S3DModel& model, const std::string& modelFilePath)
if (!meshNode) {
LOG_SL(LOG_SECTION_MODEL, L_ERROR, "An assimp model has invalid pieces hierarchy. Missing a mesh named: \"%s\" in model[\"%s\"] path: %s. Looking for a likely candidate", meshName.c_str(), modelName.c_str(), modelPath.c_str());

/* Try to salvage the model since such "invalid" ones can actually be
* produced by industry standard tools (in particular, Blender). */
meshNode = FindFallbackNode(scene);
if (meshNode && meshNode->mParent)
LOG_SL(LOG_SECTION_MODEL, L_WARNING, "Found a likely replacement candidate for mesh \"%s\" - node \"%s\". It might be incorrect!", meshName.c_str(), meshNode->mName.data);
Expand Down

1 comment on commit 0cb6f16

@lhog
Copy link
Collaborator

@lhog lhog commented on 0cb6f16 Sep 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Please sign in to comment.