Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: if headless use original material #3511

Merged

Conversation

vwnd
Copy link
Contributor

@vwnd vwnd commented Jun 14, 2024

Description & motivation

Running headless, the copy of the RH.Material yields null when passed to RenderMaterial.FromMaterial(material, Doc), which results the conversion throwing since the following calls assume a non nullable Material.

Changes:

I have tried to make the minimum intervention.

  • Check if headless, and if so do not use the copy of the material but the original.

Screenshots:

Before and after 💯

image

References

https://developer.rhino3d.com/api/rhinocommon/rhino.render.rendermaterial/frommaterial

@vwnd vwnd marked this pull request as ready for review June 14, 2024 18:08
@didimitrie didimitrie requested a review from AlanRynne June 25, 2024 13:34
@JR-Morgan JR-Morgan changed the base branch from main to dev July 18, 2024 08:20
@JR-Morgan JR-Morgan merged commit c22a3fa into specklesystems:dev Jul 18, 2024
13 checks passed
@JR-Morgan JR-Morgan added this to the 2.20 milestone Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants