Add Features: Export as Batch / Name objects after filenames#38
Add Features: Export as Batch / Name objects after filenames#38TheTiEr wants to merge 7 commits intoGhostkeeper:masterfrom
Conversation
Ghostkeeper
left a comment
There was a problem hiding this comment.
The automated tests are failing at the moment, due to these changes.
| except EnvironmentError as e: | ||
| log.error(f"Unable to complete writing to 3MF archive: {e}") | ||
| return {'CANCELLED'} | ||
| elif self.batch_mode == 'OBJECT': |
There was a problem hiding this comment.
We're going to need some tests for this mode.
| archive.close() | ||
| except EnvironmentError as e: | ||
| log.error(f"Unable to complete writing to 3MF archive: {e}") | ||
| return {'CANCELLED'} |
There was a problem hiding this comment.
Can we do something about the code duplication in this section?
| if context.scene.unit_settings.scale_length != 0: | ||
| scale *= context.scene.unit_settings.scale_length # Apply the global scale of the units in Blender. | ||
| #if context.scene.unit_settings.scale_length != 0: | ||
| # scale *= context.scene.unit_settings.scale_length # Apply the global scale of the units in Blender. |
There was a problem hiding this comment.
This means that the unit scale in Blender has no effect any more on how big the model becomes that gets imported. That is a bug.
3MF specifies that the model coordinates are always in millimetres. So the actual size of the model is known and should be loaded in correctly. STL has no such specification. The units are units. Pretty much all STL files assume that the unit is millimetres, although some STL files are generated in inches as well. For STL then it is important that the unit and/or scale is set correctly when importing the STL. Sadly, Blender defaults to using metres as units, which is almost always wrong. That is an issue with the STL importer though and should be fixed there.
Making STL and 3MF import at the same scale by removing the scaling from 3MF effectively makes both the STL and the 3MF files import wrongly (STL semi-wrong since it doesn't specify the unit length, and 3MF definitely wrong).
There are 3 essential and very helpful changes in this pull request: