I had just started thinking and trying to do an addon along these lines.
I settled on modifying a script I found to export all collections with “view in render” flag and naming the file after the collection. It’s here if you’re curious: GitHub - bastianlstrube/CollectionsBatchExport: Blender Batch Exporter of either collections, selected or all objects
The Collection Exporter is very useful for game development as @jonlampel mentioned, where you in general have blender files and the git or project folder separate and export into them.
I really like the functionality so far. It would be great to specify an external project folder from Preferences > File Paths. Likewise the file exported could be named the same as the collection. If needed, then you could enable specific options per collection like one of the following:
- Specific location or name (like in the build linked)
- Use external project folder from preferences ( /external/project/ + CollectionName.obj )
- Option to add sub directory ( /file/paths/external/project/ + Subdir/ + CollectionName.obj )
- Possibly make a hierarchy of Collections act as Subdirectories.
Another great option that would be to join all objects in a collection into one mesh.
I tried but failed at the context juggling in python and dealing the temporary copies of objects that then needed to be joined before export.
This idea would really benefit from the ability to specify global variables described in these suggestions:
The wording comes from houdini, but the concept to be able to specify your own paths to folders external to blender is really important in pipelines involving any other tools like houdini and maya and not least game engines like unity and unreal. At least, being able to set a project location once per user would be brilliant.