-
-
Notifications
You must be signed in to change notification settings - Fork 36k
Closed
Labels
Description
The Blender exporter automatically bakes global transforms into meshes, but sometimes I need to export models without applying their global transform. Mostly, this is for exporting several separate models from the same Blender project.
Right now this can be done by commenting out lines 1,617 and 1,618 in export_threejs.py:
def extract_meshes(objects, scene, export_single_model, option_scale, flipyz):
# Other stuff...
if export_single_model:
if flipyz:
# that's what Blender's native export_obj.py does to flip YZ
X_ROT = mathutils.Matrix.Rotation(-math.pi/2, 4, 'X')
mesh.transform(X_ROT * object.matrix_world)
# When these next two lines are commented out, global transform is not applied:
# else:
# mesh.transform(object.matrix_world)
# More other stuff...
return meshes
I'd like to have this as an option in the export script (similar to the 'flipyz' option). Is this something other people would use, and is it likely to affect other stuff? (The exporter handles a lot of bones and animations and stuff I don't know anything about).