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/armature | |
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/armature')
-rw-r--r-- | source/blender/editors/armature/editarmature.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index fc9324d1742..3bb0124bf03 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -5779,13 +5779,8 @@ EditBone * test_subdivideByCorrelation(Scene *scene, Object *obedit, ReebArc *ar if (scene->toolsettings->skgen_options & SKGEN_CUT_CORRELATION) { - float invmat[4][4] = { {1, 0, 0, 0}, - {0, 1, 0, 0}, - {0, 0, 1, 0}, - {0, 0, 0, 1}}; - float tmat[3][3] = { {1, 0, 0}, - {0, 1, 0}, - {0, 0, 1}}; + float invmat[4][4]= MAT4_UNITY; + float tmat[3][3]= MAT3_UNITY; ReebArcIterator arc_iter; BArcIterator *iter = (BArcIterator*)&arc_iter; bArmature *arm= obedit->data; @@ -5831,13 +5826,8 @@ EditBone * test_subdivideByLength(Scene *scene, Object *obedit, ReebArc *arc, Re if ((scene->toolsettings->skgen_options & SKGEN_CUT_LENGTH) && arcLengthRatio(arc) >= G.scene->toolsettings->skgen_length_ratio) { - float invmat[4][4] = { {1, 0, 0, 0}, - {0, 1, 0, 0}, - {0, 0, 1, 0}, - {0, 0, 0, 1}}; - float tmat[3][3] = { {1, 0, 0}, - {0, 1, 0}, - {0, 0, 1}}; + float invmat[4][4]= MAT4_UNITY; + float tmat[3][3]= MAT3_UNITY; ReebArcIterator arc_iter; BArcIterator *iter = (BArcIterator*)&arc_iter; bArmature *arm= obedit->data; |