Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2019-01-20 18:22:55 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-01-20 18:27:06 +0300
commit482c4d099ae88bea018712b92b2990617ef006f8 (patch)
treecdc6dd9d345da7a6edb2106ecb63d314d14b7a61 /source/blender/editors/physics
parentb0dee09a6d5531fb3bc7bbb00069c75e18dfbd1d (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')
-rw-r--r--source/blender/editors/physics/particle_edit.c13
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);