Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorRohan Rathi <rohanrathi08@gmail.com>2018-04-05 10:01:46 +0300
committerRohan Rathi <rohanrathi08@gmail.com>2018-04-05 10:01:46 +0300
commit4ae2d8daf978994d82bfa19606735addb73a6e8f (patch)
tree71744326d8a907d7134de4bfb675328f187527e1 /source
parentec52b7dbb6ef2c73b05b615729ac561210816305 (diff)
Changed rotation calculation in rotate_normal
Diffstat (limited to 'source')
-rw-r--r--source/blender/bmesh/bmesh_class.h2
-rw-r--r--source/blender/editors/transform/transform.c25
m---------source/tools0
3 files changed, 1 insertions, 26 deletions
diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h
index 155e51acbf5..8159aae1ab8 100644
--- a/source/blender/bmesh/bmesh_class.h
+++ b/source/blender/bmesh/bmesh_class.h
@@ -271,8 +271,6 @@ enum {
typedef struct BMLoopNorEditData {
int loop_index;
BMLoop *loop;
- float mtx[3][3];
- float smtx[3][3];
float niloc[3];
float nloc[3];
float *loc;
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 68ab54ad2a1..7708d1abe2e 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -4223,18 +4223,8 @@ static void applyTrackball(TransInfo *t, const int UNUSED(mval[2]))
static void storeCustomLNorValue(TransInfo *t, BMesh *bm)
{
- float mtx[3][3], smtx[3][3];
-
BMLoopNorEditDataArray *lnors_ed_arr = BM_loop_normal_editdata_array_init(bm);
-
- copy_m3_m4(mtx, t->obedit->obmat);
- pseudoinverse_m3_m3(smtx, mtx, PSEUDOINVERSE_EPSILON);
-
BMLoopNorEditData *lnor_ed = lnors_ed_arr->lnor_editdata;
- for (int i = 0; i < lnors_ed_arr->totloop; i++, lnor_ed++) {
- copy_m3_m3(lnor_ed->mtx, mtx);
- copy_m3_m3(lnor_ed->smtx, smtx);
- }
t->custom.mode.data = lnors_ed_arr;
t->custom.mode.free_cb = freeCustomNormalArray;
@@ -4327,20 +4317,7 @@ static void applyNormalRotation(TransInfo *t, const int UNUSED(mval[2]))
axis_angle_normalized_to_mat3(mat, axis, angle);
for (int i = 0; i < lnors_ed_arr->totloop; i++, lnor_ed++) {
- float center[3];
- float vec[3], totmat[3][3], smat[3][3];
- zero_v3(center);
-
- mul_m3_m3m3(totmat, mat, lnor_ed->mtx);
- mul_m3_m3m3(smat, lnor_ed->smtx, totmat);
-
- sub_v3_v3v3(vec, lnor_ed->niloc, center);
- mul_m3_v3(smat, vec);
-
- add_v3_v3v3(lnor_ed->nloc, vec, center);
-
- sub_v3_v3v3(vec, lnor_ed->nloc, lnor_ed->niloc);
- add_v3_v3v3(lnor_ed->nloc, lnor_ed->niloc, vec);
+ mul_v3_m3v3(lnor_ed->nloc, mat, lnor_ed->niloc);
BKE_lnor_space_custom_normal_to_data(
bm->lnor_spacearr->lspacearr[lnor_ed->loop_index], lnor_ed->nloc, lnor_ed->clnors_data);
diff --git a/source/tools b/source/tools
-Subproject 7695e14cfc5820ac66546e0e515914d85ab81af
+Subproject 88a1758d2d2e862cc69c08b5b40a4e75f71592d