Skip to content

Commit

Permalink
Fix(rhino): Remove square brackets from material name (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhankoral authored Aug 26, 2024
1 parent e369292 commit 41c96a0
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public void BakeMaterials(List<RenderMaterialProxy> speckleRenderMaterialProxies
// POC: Currently we're relying on the render material name for identification if it's coming from speckle and from which model; could we do something else?
string materialId = speckleRenderMaterial.applicationId ?? speckleRenderMaterial.id;
string matName = $"{speckleRenderMaterial.name}-({materialId})-{baseLayerName}";
matName = matName.Replace("[", "").Replace("]", ""); // "Material" doesn't like square brackets if we create from here. Once they created from Rhino UI, all good..
Color diffuse = Color.FromArgb(speckleRenderMaterial.diffuse);
Color emissive = Color.FromArgb(speckleRenderMaterial.emissive);
double transparency = 1 - speckleRenderMaterial.opacity;
Expand Down

0 comments on commit 41c96a0

Please sign in to comment.