KhronosGroup / glTF-Blender-IO

Blender glTF 2.0 importer and exporter
https://docs.blender.org/manual/en/latest/addons/import_export/scene_gltf2.html
Apache License 2.0
1.48k stars 317 forks source link

Reset transform on export #2197

Open Disar opened 5 months ago

Disar commented 5 months ago

Im creating several assets intended for games and in my current workflow it's easier to model different objects relative to each other in the same scene. I export these objects individually. The problem is that their locations are baked into their scene location. Right now I have to make sure every object is at the origin of the world before exporting which disrupts my workflow.

An option to reset transforms to 0/0/0 on export would be great. There is one caveat: Some exported models are build from loose parts but are intended as one whole in-engine. Resetting the transforms for multiple selected objects should have an extra option to transform relatively around the active object. This way it's possible to batch export items with their transforms reset (option turned off ) or keep their relative transforms to the active object ( option turned on).

ItsCubeTime commented 1 week ago

+1

Although it seems this behavior is quite popular among Blenders exporters - I can't say I've ever heard anyone praising it

julienduroure commented 1 day ago

The officially proposed solution for this requirement is using collection export feature, release in 4.2

Cf https://developer.blender.org/docs/release_notes/4.2/pipeline_assets_io/#collection-exporters https://docs.blender.org/manual/en/latest/scene_layout/collections/collections.html#exporters

For collection exporter, a new option is available for resetting collection transform at export

image