Skip to content

Commit

Permalink
Correct property access for max 2023 (#1049)
Browse files Browse the repository at this point in the history
  • Loading branch information
pandaGaume authored May 5, 2022
1 parent 620fd27 commit 2a966db
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions 3ds Max/Max2Babylon/Exporter/BabylonExporter.Material.cs
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,11 @@ private void ExportPhysicalMaterial(IIGameMaterial materialNode, IIPropertyConta
babylonMaterial.occlusionTexture = ExportTexture(ambientOcclusionTexmap, babylonScene);
}

#if MAX2023
var normalMapAmount = propertyContainer.GetFloatProperty("bump_map_amt");
#else
var normalMapAmount = propertyContainer.GetFloatProperty(91);
#endif
babylonMaterial.normalTexture = ExportPBRTexture(materialNode, 30, babylonScene, normalMapAmount);

babylonMaterial.emissiveTexture = ExportPBRTexture(materialNode, 17, babylonScene);
Expand Down

0 comments on commit 2a966db

Please sign in to comment.