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

Editor: Fix multi-material support. #27265

Merged
merged 1 commit into from
Nov 30, 2023
Merged

Editor: Fix multi-material support. #27265

merged 1 commit into from
Nov 30, 2023

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Nov 28, 2023

Related issue: -

Description

While debugging the FBX asset from #27259, I have noticed multi material support in the editor is broken. I have fixed the material panel except for the script section (since objects with multiple (raw) shader materials can't be configured anyway).

The basic idea of this PR is to use the materialSlot value not only in the commands but in the property classes as well in order to select the correct material.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Nov 28, 2023

@Mugen87 Mugen87 added this to the r160 milestone Nov 28, 2023
@Mugen87
Copy link
Collaborator Author

Mugen87 commented Nov 28, 2023

Added the PR to the r160 release so we have enough time for testing on dev.

@Mugen87 Mugen87 merged commit d33bab2 into mrdoob:dev Nov 30, 2023
11 checks passed
function update( currentObject, currentMaterialSlot = 0 ) {

object = currentObject;
materialSlot = currentMaterialSlot;

if ( object === null ) return;
if ( object.material === undefined ) return;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a correct check if now different expression is assigned to material? /ping @Mugen87

AdaRoseCannon pushed a commit to AdaRoseCannon/three.js that referenced this pull request Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants