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/physics | |
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/physics')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 1fd9e91095f..12370e5b1ac 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -593,7 +593,7 @@ static void foreach_mouse_hit_key(PEData *data, ForKeyMatFunc func, int selected ParticleSystemModifierData *psmd = NULL; ParticleEditSettings *pset= PE_settings(data->scene); POINT_P; KEY_K; - float mat[4][4], imat[4][4]; + float mat[4][4]= MAT4_UNITY, imat[4][4]= MAT4_UNITY; if(edit->psys) psmd= psys_get_modifier(data->ob, edit->psys); @@ -602,9 +602,6 @@ static void foreach_mouse_hit_key(PEData *data, ForKeyMatFunc func, int selected if(pset->selectmode==SCE_SELECT_PATH) selected= 0; - unit_m4(imat); - unit_m4(mat); - LOOP_VISIBLE_POINTS { if(pset->selectmode==SCE_SELECT_END) { /* only do end keys */ @@ -1605,7 +1602,7 @@ int PE_lasso_select(bContext *C, short mcords[][2], short moves, short extend, s ParticleSystem *psys = edit->psys; ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys); POINT_P; KEY_K; - float co[3], mat[4][4]; + float co[3], mat[4][4]= MAT4_UNITY; short vertco[2]; PEData data; @@ -1619,8 +1616,6 @@ int PE_lasso_select(bContext *C, short mcords[][2], short moves, short extend, s /* only for depths */ PE_set_view3d_data(C, &data); - unit_m4(mat); - LOOP_VISIBLE_POINTS { if(edit->psys && !(psys->flag & PSYS_GLOBAL_HAIR)) psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, psys->particles + p, mat); |