Skip to content

Merge materials#64

Open
pkratten wants to merge 14 commits intoStykka:masterfrom
pkratten:merge-materials
Open

Merge materials#64
pkratten wants to merge 14 commits intoStykka:masterfrom
pkratten:merge-materials

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
@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.

@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