Ghostkeeper / Blender3mfFormat

Blender add-on to import/export 3MF files
GNU General Public License v2.0
173 stars 20 forks source link

Failed to export a simple structure in 3mf format #35

Closed VJM100 closed 3 years ago

VJM100 commented 3 years ago

I have just imported the 3mf input/export zip, and it imported a test file well. However, in exporting a slightly modified version (holes drilled), it reported an error. I attach a screen shot, in case it helps. 3mf error report.docx

Ghostkeeper commented 3 years ago

Hi! Thanks for reporting the bug here.

From what I can see, this means that context.scene.objects or context.selected_objects contained a None object, which is not expected according to Blender's API. I'm also unable to reproduce this myself.

I could make it ignore those invalid objects, but the issue might indicate that something deeper is going wrong. If that's the case the export is likely going to be incomplete.

One way in which I could perhaps better reproduce the problem is if you'd save the .blend file from when you export the object. Right before or right after you get this error message, doesn't matter. This should reproduce the entire Blender scene and hopefully allows me to get that same error message then. Once I have that I can dig into the code to see what's going wrong, where exactly this None object comes from.

VJM100 commented 3 years ago

Thank you for looking into this problem.  I seem to be unable to export any files in 3mf format, I'm afraid.  I was on Blender 2.90, but have just upgraded to 2.91.  It appears to have the same issue.I attach a 3mf file that I imported into Blender (no issues).I then saved it as a blend file (attached - why is it so big?)I then re-exported it as a 3mf, and it failed with a very similar message (the failed file is attached as well).Hope this helps.  I followed the instructions to load this add-on into Blender, as far as I can tell successfully.Yours,Vincent

Ghostkeeper commented 3 years ago

Attachments to e-mail replies don't get published here, I'm afraid. Could you visit your original issue report on the Github website and post it here? https://github.com/Ghostkeeper/Blender3mfFormat/issues/35

VJM100 commented 3 years ago

Apologies - time zone issues. I attach the three files as requested.

testBlender.zip

VJM100 commented 3 years ago

Further information. If I export a shape generated within Blender, it works fine. If I import an stl file, and then export in 3mf format, it is also fine. However, if I import a 3mf file, then re-export it, the problem occurs. This is an observation based on three simple files (attached), not an extensive test. best wishes, VJM testBlender2.zip

VJM100 commented 3 years ago

Do you require any additional information?  It seems to be a bug relating to the combination of 3mf import and export of the resulting design in Blender.Best wishes,VJM

Ghostkeeper commented 3 years ago

Sorry, I'm a bit behind on my notifications. It seems like the last upload contains all the information I could want for, so thanks :) I'll probably find some time to work on the plug-in next weekend, and I'll try debugging this too then.

VJM100 commented 3 years ago

My pleasure, and thank you for the effort you are putting in to this project!Best wishes,Vincent

Ghostkeeper commented 3 years ago

I was able to find the culprit and fix this bug. Thanks for the help!

I'm not planning to release a new version until this add-on is either accepted or denied by Blender in their add-on repository. It's taking a long time to get it through though. If you need it fixed for yourself, you can take this file and use it to replace the export_3mf.py file with the same name in the folder you installed this add-on with.

VJM100 commented 3 years ago

Many thanks - glad that I could be of assistance.  I will probably be using this add-on a reasonable amount, as I am very proficient in 3DBuilder, and struggling with Blender, unfortunately.  Oh, to have the excellent Blender engine with the excellent 3DBuilder user interface for 3D print model design!  ()Best wishes, and thanks again,Vincent