diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-11-28 09:03:30 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-11-28 09:03:30 +0300 |
commit | 34ea1cf0b23977ab76b23b06f6ceb1fda5631f88 (patch) | |
tree | fe8ed20a86405a088270ba5e8fef53ae1cb68972 /source/blender/editors/transform | |
parent | 9d3a17922cad62f1f73ba60eef669a091a2b8687 (diff) |
minor changes to the python api.
- pep8 script was giving an error on non utf8 scons source files.
- use PyList_SET_ITEM macro when list type is ensured.
- all mathutils types use subtypes to create new types when available.
- use defines MAT3_UNITY, MAT4_UNITY to initialize unit matrices.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform.c | 2 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_constraints.c | 3 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_manipulator.c | 3 |
3 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 34c0e17f7d2..f18839836c0 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -560,7 +560,7 @@ wmKeyMap* transform_modal_keymap(wmKeyConfig *keyconf) int transformEvent(TransInfo *t, wmEvent *event) { - float mati[3][3] = {{1.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 0.0f, 1.0f}}; + float mati[3][3]= MAT3_UNITY; char cmode = constraintModeToChar(t); int handled = 1; diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index f002bf9aeb9..60df20998e2 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -560,9 +560,8 @@ void setUserConstraint(TransInfo *t, short orientation, int mode, const char fte switch(orientation) { case V3D_MANIP_GLOBAL: { - float mtx[3][3]; + float mtx[3][3]= MAT3_UNITY; sprintf(text, ftext, "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 b03c5ef5395..25d19f18d34 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -1316,8 +1316,7 @@ static void draw_manipulator_rotate_cyl(View3D *v3d, RegionView3D *rv3d, int mov /* Screen aligned view rot circle */ if(drawflags & MAN_ROT_V) { - float unitmat[4][4]; - unit_m4(unitmat); + float unitmat[4][4]= MAT4_UNITY; if(G.f & G_PICKSEL) glLoadName(MAN_ROT_V); UI_ThemeColor(TH_TRANSFORM); |