[Bf-blender-cvs] [bb3efe61276] master: Blenlib: Assert when attempting to rotate point around vector and store result in the point

Sergey Sharybin noreply at git.blender.org
Thu Feb 15 12:27:53 CET 2018


Commit: bb3efe61276346f7ee12d24308d95d447941b0ec
Author: Sergey Sharybin
Date:   Wed Feb 14 14:29:37 2018 +0100
Branches: master
https://developer.blender.org/rBbb3efe61276346f7ee12d24308d95d447941b0ec

Blenlib: Assert when attempting to rotate point around vector and store result in the point

This isn't supported since there are subsequent reads to all point coordinates
after modification started.

Probably we need to create a temp copy of point, but that's like extra CPU
ticks.

===================================================================

M	source/blender/blenlib/intern/math_vector.c

===================================================================

diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c
index 05562502278..d6e48fa59e7 100644
--- a/source/blender/blenlib/intern/math_vector.c
+++ b/source/blender/blenlib/intern/math_vector.c
@@ -890,6 +890,8 @@ void rotate_normalized_v3_v3v3fl(float out[3], const float p[3], const float axi
 
 void rotate_v3_v3v3fl(float r[3], const float p[3], const float axis[3], const float angle)
 {
+	BLI_assert(r != p);
+
 	float axis_n[3];
 
 	normalize_v3_v3(axis_n, axis);



More information about the Bf-blender-cvs mailing list