3D Print toolbox, deselection an object still allows to do an export, but the file is broken #97652

Closed
opened 2022-04-27 13:09:07 +02:00 by Jan · 9 comments

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1050/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.15

Blender Version
Broken: version: 3.1.2, branch: master, commit date: 2022-03-31 17:40, hash: blender/blender@cc66d1020c
Worked: (newest version of Blender that worked as expected)

Addon Information
Name: 3D-Print Toolbox ()
Author: Campbell Barton

Short description of error
When an object is not selected, you can still export it to STL, if it was selected before. This results in an empty/broken STL file

Exact steps for others to reproduce the error
Startup blender (with default cube)
Make sure the 3D-Print Toolbox is an active plugin
Select the Cube,
and go to the 3D-Print Toolbox tab. and press the export button.
The STL file ends up in the given location. When you open it in any other program (like 3D Builder) it will be fine.
Then deselect the cube, (by clicking next to the object)
Then go to the 3D-Print Toolbox tab. and press the export button again.
It shows that the same file (cube) is exported again. (also with the same filename)
But if you try to open it is is broken (the file is also only 1kbyte (always)).

This problem happens to me a lot, because if files have some sort of issue (manifolds for instance) the object is not selected the second time I try to export it.

Hope this helps to make this plug in even better then it already is. Because I use it a lot.

Regards,

Jan

**System Information** Operating system: Windows-10-10.0.19044-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1050/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.15 **Blender Version** Broken: version: 3.1.2, branch: master, commit date: 2022-03-31 17:40, hash: `blender/blender@cc66d1020c` Worked: (newest version of Blender that worked as expected) **Addon Information** Name: 3D-Print Toolbox () Author: Campbell Barton **Short description of error** When an object is not selected, you can still export it to STL, if it was selected before. This results in an empty/broken STL file **Exact steps for others to reproduce the error** Startup blender (with default cube) Make sure the 3D-Print Toolbox is an active plugin Select the Cube, and go to the 3D-Print Toolbox tab. and press the export button. The STL file ends up in the given location. When you open it in any other program (like 3D Builder) it will be fine. Then deselect the cube, (by clicking next to the object) Then go to the 3D-Print Toolbox tab. and press the export button again. It shows that the same file (cube) is exported again. (also with the same filename) But if you try to open it is is broken (the file is also only 1kbyte (always)). This problem happens to me a lot, because if files have some sort of issue (manifolds for instance) the object is not selected the second time I try to export it. Hope this helps to make this plug in even better then it already is. Because I use it a lot. Regards, Jan
Author

Added subscriber: @J.Mosselaar

Added subscriber: @J.Mosselaar
Jan changed title from 3D Print toolbox, selection error to 3D Print toolbox, deselection an object still allows to do an export, but the file is broken 2022-04-27 13:09:56 +02:00

Added subscribers: @ideasman42, @mano-wii

Added subscribers: @ideasman42, @mano-wii

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Contributor

Looks like the export.write_mesh() function doesn't check to make sure an object is selected.

Do we fix the function or remove it? Blender can already save STLs with the File>Export dialogue. No functionality would be lost if this button was just removed.

Looks like the export.write_mesh() function doesn't check to make sure an object is selected. Do we fix the function or remove it? Blender can already save STLs with the File>Export dialogue. No functionality would be lost if this button was just removed.
Contributor

I fixed it on my machine, but I'm not OSS-savy enough to submit a patch.

Update: Patch submitted!

I fixed it on my machine, but I'm not OSS-savy enough to submit a patch. Update: Patch submitted!
Author

Looks good to me. The problem is still here in the latest version.

Looks good to me. The problem is still here in the latest version.
Contributor

This could take a while. I don't know the release schedule for the addon collection.

If it's bothering you, you can find export.py in your Blender installation and insert the lines in my screenshot.

This could take a while. I don't know the release schedule for the addon collection. If it's bothering you, you can find export.py in your Blender installation and insert the lines in my screenshot.
Author

That is not needed, I have a workaround, that prevents me from making this mistake. Thanks for the fix

That is not needed, I have a workaround, that prevents me from making this mistake. Thanks for the fix
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2024-03-12 01:27:04 +01:00
Contributor

Please close #105189 and #100232 as well.

Please close #105189 and #100232 as well.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#97652
No description provided.