Skip to content

Commit ac59884

Browse files
Refactoring of PR assimp#6092 (assimp#6101)
* Fix fbx export. Nodes "LayerElementNormal" and "LayerElementColor" should be written only when actual data are exported. * Update FBXExporter.cpp - Fix intentions - use empty instead of size for checking data exists * refactoring --------- Co-authored-by: Kim Kulling <[email protected]>
1 parent 4ee7b9d commit ac59884

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

code/AssetLib/FBX/FBXExporter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,14 +1333,14 @@ void FBXExporter::WriteObjects () {
13331333
layer.AddChild("Version", int32_t(100));
13341334
FBX::Node le;
13351335

1336-
if (normal_data.size()) {
1336+
if (!normal_data.empty()) {
13371337
le = FBX::Node("LayerElement");
13381338
le.AddChild("Type", "LayerElementNormal");
13391339
le.AddChild("TypedIndex", int32_t(0));
13401340
layer.AddChild(le);
13411341
}
13421342

1343-
if (color_data.size()) {
1343+
if (!color_data.empty()) {
13441344
le = FBX::Node("LayerElement");
13451345
le.AddChild("Type", "LayerElementColor");
13461346
le.AddChild("TypedIndex", int32_t(0));

0 commit comments

Comments
 (0)