diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-01-20 18:22:55 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-01-20 18:27:06 +0300 |
commit | 482c4d099ae88bea018712b92b2990617ef006f8 (patch) | |
tree | cdc6dd9d345da7a6edb2106ecb63d314d14b7a61 /source/blender/editors/physics/particle_edit.c | |
parent | b0dee09a6d5531fb3bc7bbb00069c75e18dfbd1d (diff) |
Cleanup: remove all BLI_utiledefines' ugly vectorial macros.
Not only were those often making doublons with already existing
BLI_math's stuff, but they were also used to hide implicit type
conversions...
As usual this adds some more exotic inlined vector functions (one of
the rare cases where I really miss C++ and its templates... ;) ).
Diffstat (limited to 'source/blender/editors/physics/particle_edit.c')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index cf47ecae268..145b024af06 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -1325,25 +1325,26 @@ void recalc_emitter_field(Depsgraph *UNUSED(depsgraph), Object *UNUSED(ob), Part mvert = &mesh->mvert[mface->v1]; copy_v3_v3(vec, mvert->co); - VECCOPY(nor, mvert->no); + copy_v3fl_v3s(nor, mvert->no); mvert = &mesh->mvert[mface->v2]; add_v3_v3v3(vec, vec, mvert->co); - VECADD(nor, nor, mvert->no); + add_v3fl_v3fl_v3s(nor, nor, mvert->no); mvert = &mesh->mvert[mface->v3]; add_v3_v3v3(vec, vec, mvert->co); - VECADD(nor, nor, mvert->no); + add_v3fl_v3fl_v3s(nor, nor, mvert->no); if (mface->v4) { mvert = &mesh->mvert[mface->v4]; add_v3_v3v3(vec, vec, mvert->co); - VECADD(nor, nor, mvert->no); + add_v3fl_v3fl_v3s(nor, nor, mvert->no); mul_v3_fl(vec, 0.25); } - else + else { mul_v3_fl(vec, 1.0f / 3.0f); + } normalize_v3(nor); @@ -4360,7 +4361,7 @@ static void brush_edit_apply_event(bContext *C, wmOperator *op, const wmEvent *e PointerRNA itemptr; float mouse[2]; - VECCOPY2D(mouse, event->mval); + copy_v2fl_v2i(mouse, event->mval); /* fill in stroke */ RNA_collection_add(op->ptr, "stroke", &itemptr); |