Skip to content

Fix extracting materials without a per-material override#120870

Open
aaronfranke wants to merge 1 commit into
godotengine:masterfrom
aaronfranke:import-fix-mat-no-override
Open

Fix extracting materials without a per-material override#120870
aaronfranke wants to merge 1 commit into
godotengine:masterfrom
aaronfranke:import-fix-mat-no-override

Conversation

@aaronfranke

Copy link
Copy Markdown
Member

What problem(s) does this PR solve?

Additional information

PR #115528 made it so that materials not present in p_material_data would be skipped and not extracted to external files. This could be argued to be better than the previous version of the code because it avoids an error, however, p_material_data does not contain information for materials that are not individually overridden in the Advanced Import Settings dialog, so when only using the Import dock, materials could not be extracted to files.

I looked into what populates p_material_data, and I believe it is correct to keep this empty for simple use cases involving only the Import dock. So, upon closer investigation, we should allow this to be empty, we just need to handle this case better, in a way that doesn't show any error messages.

This PR fixes the code to handle this case, reads existing file paths instead of always overwriting them, permits individual materials to opt-out of extracting, and adds several comments to improve the clarity of the code.

@aaronfranke aaronfranke added this to the 4.8 milestone Jul 2, 2026
@aaronfranke aaronfranke requested review from a team as code owners July 2, 2026 21:10
@aaronfranke aaronfranke added bug topic:import regression topic:3d cherrypick:4.7 Considered for cherry-picking into a future 4.7.x release topic:editor labels Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug cherrypick:4.7 Considered for cherry-picking into a future 4.7.x release regression topic:editor topic:import topic:3d

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import Dock material settings are not reliably applied to selected scenes

1 participant