Fix #104665: FBX Export: Duplicate materials cause material indices to be offset #104667
No reviewers
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#104667
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Mysteryem/blender-addons:fix_duplicate_material_export_pr"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The export of duplicate materials was changed to skip incrementing the
material index for each duplicate in (0), however the connection was
still being added for each duplicate. Because the connections to
materials are what are indexed by the material indices, the material
indices would no longer match up with the materials, resulting in
incorrect exports.
The original code before the change in (0) was actually exporting FBX
files that worked in external software. The issue was instead in the
FBX importer where it removed duplicate materials without updating the
material indices. Changing the exporter in (0) appeared to fix the issue
because the importer would cause the duplicate materials and material
indices to realign.
Reverting (0) would also have fixed the export issue, however, removing
both the duplicate materials and their connections additionally avoids
the importer issue when these exported files are imported back into
Blender, and makes more sense because only one of each duplicate would
have been used by the exported file in the first place.
(0):
5c9ecad1d2
LGTM, thanks for the fix.