This should be the final fix for the applyrotation issue. It baffles me that the fix involves discarding the scale transformations for the normals but it works so I'm happy with it.
Details
Details
Diff Detail
Diff Detail
- Branch
- fix-bake-nonuniform-scale
Event Timeline
| source/blender/blenlib/intern/math_matrix.c | ||
|---|---|---|
| 1301 ↗ | (On Diff #1775) | Not sure this really needs its own function? It seems a very specific function, and the resulting matrix isn't generally useful for rotation, in use cases other then the one you need it for. Suggest to just do this inline: normalize_m3_m3(mat3_n, mat3);
if (is_negative_m3(mat3_n))
mul_m3_fl(mat3_n, -1.0f) |
| source/blender/render/intern/source/bake_api.c | ||
| 256 | No need for fabsf(), length is always positive | |
Comment Actions
Maybe it's not needed indeed, no problems.
I will incorporate those changes (test ;) and commit. Thanks Campbell
Comment Actions
Note: added negate_m3
normalize_m3_m3(mat3_n, mat3);
if (is_negative_m3(mat3_n))
negate_m3(mat3_n)| source/blender/editors/object/object_bake_api.c | ||
|---|---|---|
| 607 | This doesn't need to be initialized. | |
Comment Actions
- Merge remote-tracking branch 'upstream/master' into fix-bake-nonuniform-scale
- remove newly added math_matrix functions (will do it inline now)
- changes after revision (way simpler now)