Skip to content

Fix mesh not loading for 3mf files generated by Bambu Studio#70

Open
YoakeNoTenshi wants to merge 1 commit intoGhostkeeper:masterfrom
YoakeNoTenshi:master
Open

Fix mesh not loading for 3mf files generated by Bambu Studio#70
YoakeNoTenshi wants to merge 1 commit intoGhostkeeper:masterfrom
YoakeNoTenshi:master

Conversation

@YoakeNoTenshi
Copy link

@YoakeNoTenshi YoakeNoTenshi commented Jun 1, 2024

This is to fix an issue with some 3mf files generated by Bambu Studio as described in #69

Basically the 3dmodel.model file contains references to components defined in other model files. So when it tries to build the build/items the script can't find the sub components in resource_objects and logs the error Build item with unknown resource ID. Sub components are loaded in resource_objects later on but never converted to actual Blender objects.

This fix loads all the models in the 3mf file in resource_objects and then creates all the Blender objects. This assumes all the object IDs are unique and I don't know if that's actually the case.

This was tested with the 3mf file here: https://makerworld.com/en/models/20200#profileId-20736

Before the fix:
image

After the fix:
image

@Ghostkeeper
Copy link
Owner

The automated code style check is complaining that there's whitespace characters on an empty line at line 146 of import_3mf.py. I'll fix that up for you if/when merging, it's a really minor thing.

@HeytalePazguato
Copy link

This issue is still present, when will it be fixed?

@Zoupers
Copy link

Zoupers commented Nov 11, 2024

Blender3mfFormat-1.0.2.zip
Here is a modified version for those who came here as a quick way.
File's md5sum is 8c6774ffad93b12b41cc6b6863c5d586

@wancoder
Copy link

Blender3mfFormat-1.0.2.zip Here is a modified version for those who came here as a quick way. File's md5sum is 8c6774ffad93b12b41cc6b6863c5d586

Cheers

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.

5 participants