Skip to content

Commit

Permalink
Fix on RenderMaterialConverter.SetChildSlot for Rhino 8.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
kike-garbo committed Nov 18, 2023
1 parent aa3d1fa commit a9f2922
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/RhinoInside.Revit/Convert/Render/RenderMaterialConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -501,18 +501,15 @@ RhinoDoc doc
if (simulated is SimulatedProceduralTexture procedural && procedural.ContentType != ContentUuids.SimpleBitmapTextureType)
{
if (procedural.ContentType == ContentUuids.BitmapTextureType)
{
texture = RenderTexture.NewBitmapTexture(simulated, doc);
}
else
{
texture = RenderContentType.NewContentFromTypeId(procedural.ContentType, doc) as RenderTexture;
texture.SetProjectionMode((TextureProjectionMode) (int) simulated.ProjectionMode, RenderContent.ChangeContexts.Program);
texture.SetMappingChannel(simulated.MappingChannel, RenderContent.ChangeContexts.Program);
texture.SetOffset(new Rhino.Geometry.Vector3d(simulated.Offset.X, simulated.Offset.Y, 0.0), RenderContent.ChangeContexts.Program);
texture.SetRepeat(new Rhino.Geometry.Vector3d(simulated.Repeat.X, simulated.Repeat.Y, 1.0), RenderContent.ChangeContexts.Program);
texture.SetRotation(new Rhino.Geometry.Vector3d(0.0, 0.0, simulated.Rotation), RenderContent.ChangeContexts.Program);
}

texture.SetProjectionMode((TextureProjectionMode) (int) simulated.ProjectionMode, RenderContent.ChangeContexts.Program);
texture.SetMappingChannel(simulated.MappingChannel, RenderContent.ChangeContexts.Program);
texture.SetOffset(new Rhino.Geometry.Vector3d(simulated.Offset.X, simulated.Offset.Y, 0.0), RenderContent.ChangeContexts.Program);
texture.SetRepeat(new Rhino.Geometry.Vector3d(simulated.Repeat.X, simulated.Repeat.Y, 1.0), RenderContent.ChangeContexts.Program);
texture.SetRotation(new Rhino.Geometry.Vector3d(0.0, 0.0, simulated.Rotation), RenderContent.ChangeContexts.Program);

SetFieldValues(texture.Fields, procedural.Fields);
}
Expand Down

0 comments on commit a9f2922

Please sign in to comment.