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

Merge materials #64

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Merge materials #64

wants to merge 14 commits into from

Conversation

pkratten
Copy link
Contributor

Merge materials on layer or object level.
Merge the default material.

This is to make the gltf more compact and organized.

Current behavior is that every object gets its own material if options.UseDisplayColorForUnsetMaterials is enabled; exceptions is sub-objects with different colors.
If options.ExportLayers is also enabled the layer color gets its own material for all (sub-)objects that are set to layer color.

The DefaultMaterial.RenderMaterial was giving different guids each call so i set it to 0.

@jrz371 jrz371 self-requested a review August 23, 2021 07:21
glTF-BinExporter/RhinoDocGltfConverter.cs Outdated Show resolved Hide resolved
glTF-BinExporter/RhinoDocGltfConverter.cs Outdated Show resolved Hide resolved
glTF-BinExporter/RhinoDocGltfConverter.cs Outdated Show resolved Hide resolved
@pkratten
Copy link
Contributor Author

I don't know much about the mac side of things. Good to know, thanks!

Copy link
Collaborator

@jrz371 jrz371 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the biggest fix is making that for loop that gathers the material indices more coherent and understandable.

glTF-BinExporter/RhinoDocGltfConverter.cs Outdated Show resolved Hide resolved
glTF-BinExporter/RhinoDocGltfConverter.cs Outdated Show resolved Hide resolved
glTF-BinExporter/RhinoDocGltfConverter.cs Outdated Show resolved Hide resolved
glTF-BinExporter/RhinoDocGltfConverter.cs Outdated Show resolved Hide resolved
glTF-BinExporter/RhinoDocGltfConverter.cs Outdated Show resolved Hide resolved
glTF-BinExporter/RhinoDocGltfConverter.cs Outdated Show resolved Hide resolved
@pkratten
Copy link
Contributor Author

pkratten commented Aug 23, 2021

Just letting you know that I found a problem that needs a bit longer to fix.

@pkratten
Copy link
Contributor Author

In my opinion this is good to go. Let me know if there is anything else!

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.

2 participants