Skip to content

Commit

Permalink
fix GsaCustomMaterial can have a type that is not Custom
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristjan Nielsen committed Oct 9, 2023
1 parent f13048b commit bbdb25e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions GsaGH/Helpers/Assembly/Properties/Materials.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private void AddMaterial(GsaMaterial material, ref Prop2D prop2d) {
int id = ConvertMaterial(material);

// update API prop depending on std material type
if (material.MaterialType == MatType.Custom) {
if (material is GsaCustomMaterial || material.MaterialType == MatType.Custom) {
prop2d.MaterialGradeProperty = 0;
prop2d.MaterialAnalysisProperty = id;
} else {
Expand All @@ -143,7 +143,7 @@ private void AddMaterial(GsaMaterial material, ref Prop3D prop3d) {
int id = ConvertMaterial(material);

// update API prop depending on std material type
if (material.MaterialType == MatType.Custom) {
if (material is GsaCustomMaterial || material.MaterialType == MatType.Custom) {
prop3d.MaterialGradeProperty = 0;
prop3d.MaterialAnalysisProperty = id;
} else {
Expand All @@ -162,7 +162,7 @@ private void AddMaterial(GsaMaterial material, ref Section section) {
int id = ConvertMaterial(material);

// update API prop depending on std material type
if (material.MaterialType == MatType.Custom) {
if (material is GsaCustomMaterial || material.MaterialType == MatType.Custom) {
section.MaterialGradeProperty = 0;
section.MaterialAnalysisProperty = id;
} else {
Expand Down

0 comments on commit bbdb25e

Please sign in to comment.