Page MenuHome

STL Export: add "Join Objects" option
AbandonedPublic

Authored by Campbell Barton (campbellbarton) on Oct 26 2015, 1:11 PM.

Details

Summary

STL Export: add "Batch Mode" option

two options: "Object" / "Off"
if "Off" this will join selected objects as before, the "Object" option
will give the opportunity to disable this and write multiple selected
objects to individual files quickly (without having to call the operator
multiple times)

naming convention:
specified in export dialog: "prefix.stl"
selected: "Cube", Cube.001"
output: "prefix-Cube.stl", "prefix-Cube_001.stl"

request from bconf 2015 "ask us anything" meeting

Diff Detail

Event Timeline

Philipp Oeser (lichtwerk) retitled this revision from to STL Export: add "Join Objects" option.
Philipp Oeser (lichtwerk) updated this object.

forgot to not pass new "join" keyword

Campbell Barton (campbellbarton) requested changes to this revision.Oct 26 2015, 1:31 PM
Campbell Barton (campbellbarton) edited edge metadata.

I'd prefer if this matched behavior of OBJ/3DS/FBX/X3D (... all other bundled exporters).
Theres no real benefit to have special behavior for stl.

See release/scripts/addons/io_scene_obj/__init__.py:

use_selection = BoolProperty(
        name="Selection Only",
        description="Export selected objects only",
        default=False,
        )
This revision now requires changes to proceed.Oct 26 2015, 1:31 PM
Philipp Oeser (lichtwerk) edited edge metadata.

better avoid python "dir" keyword, use "folder" instead

I misunderstood the purpose of this option, but still I think it can be done different.

FBX has an option "Batch Mode", and you can choose to Scenes or Groups, I think the same logic could be applied here. (Scenes, Groups, Objects) for eg.

not quite sure if a batch mode for "scenes" (or "groups" even) make too much sense in the context of STL.
[this is just geometry... if you really want to 'organize' this, you could join objects beforehand; FBX is a different story, you've got Lamps, Cameras, Geo and what not, "grouping" makes more sense there...]

problem: selection vs. batchmode

atm. STL export is based on selection only. thats fine, users know what to expect.
we would need to preserve this behaviour [as additional use_selection option] (3D printing toolbox is depending on that e.g.)
Now if we also offer the batchmode for groups/scenes, this then doesnt play well with the selection paradigm.
This is what FBX does: if use_selection is on, it will write everything selected into one file; if one of the batch modes are used, it will write multiple files, but selection is ignored.
Combining selection and batchmode wouldnt work for groups/scenes (as it leads to more questions: "if only one object of a group is selected, export the whole group?")

The only batchmode that would be able to handle selection well is "batchmode for objects" (and this is pretty much what the patch does already)
So, how to proceed?

Philipp Oeser (lichtwerk) updated this object.
Philipp Oeser (lichtwerk) edited edge metadata.

called this "Batch Mode" now (as the FBX exporter does)