diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-29 12:12:44 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-29 12:13:20 +0400 |
commit | 409fb4da0ce671d9c5cf54cb327770d6b4e97cb2 (patch) | |
tree | 37f4c7705463122fdf3d3e16a16a9d1feb89c967 /source/blender/editors/transform | |
parent | d8282da5452b9bb8487d9bce611b922244a74a08 (diff) |
Code cleanup: remove redundant matrix initialization
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform.c | 3 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_constraints.c | 3 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_manipulator.c | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index b52fba36cac..2cec4d61e3e 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -945,7 +945,6 @@ static void transform_event_xyz_constraint(TransInfo *t, short key_type, char cm int transformEvent(TransInfo *t, const wmEvent *event) { - float mati[3][3] = MAT3_UNITY; char cmode = constraintModeToChar(t); bool handled = false; @@ -1306,7 +1305,9 @@ int transformEvent(TransInfo *t, const wmEvent *event) } else { /* bit hackish... but it prevents mmb select to print the orientation from menu */ + float mati[3][3]; strcpy(t->spacename, "global"); + unit_m3(mati); initSelectConstraint(t, mati); } postSelectConstraint(t); diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index 4cc8833ba1e..749c45e316b 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -625,8 +625,9 @@ void setUserConstraint(TransInfo *t, short orientation, int mode, const char fte switch (orientation) { case V3D_MANIP_GLOBAL: { - float mtx[3][3] = MAT3_UNITY; + float mtx[3][3]; BLI_snprintf(text, sizeof(text), ftext, IFACE_("global")); + unit_m3(mtx); setConstraint(t, mtx, mode, text); break; } diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index a2b53da831b..aaa67e58eaf 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -1507,7 +1507,9 @@ static void draw_manipulator_rotate_cyl( /* Screen aligned view rot circle */ if (drawflags & MAN_ROT_V) { - float unitmat[4][4] = MAT4_UNITY; + float unitmat[4][4]; + + unit_m4(unitmat); if (is_picksel) glLoadName(MAN_ROT_V); UI_ThemeColor(TH_TRANSFORM); |