Philipp Oeser 40e036b63e Fix #122344: PLY exports non-normalized custom normals on scaled objects
On export, PLY creates a matrix (in `set_world_axes_transform`) -- the
inverse transpose of the regular matrix [seems like the usual way of
transforming normals]] --  by which the normals are multiplied. This can end
up in non-normalized custom normals on scaled objects though. Corrected
in this PR by just normalizing after said multiplication.

On import, `BKE_mesh_set_custom_normals_from_verts` is used with the raw
data -- which ends up in `mesh_normals_corner_custom_set` which in turn
"is expected to have normalized normals" (from the comment).
We _could_ also make sure to normalize on import, however, setting these
properly on export seems the primary choice.
Other importers also dont go the extra route of making sure to normalize
the incoming data, so this seems to be in line of what other Im-/Exports
do.

Pull Request: https://projects.blender.org/blender/blender/pulls/122432
2024-05-29 15:39:24 +02:00
2024-05-27 12:24:16 +02:00
2024-05-29 12:49:07 +10:00
2024-05-24 10:49:47 -06:00
2023-12-08 13:28:13 +11:00
2024-03-14 18:12:51 +01:00
2024-03-07 14:07:39 +11:00

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Blender screenshot

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.

See blender.org/about/license for details.

Description
No description provided
Readme 841 MiB
Languages
C++ 78%
Python 14.9%
C 2.9%
GLSL 1.9%
CMake 1.2%
Other 0.9%