[Bf-blender-cvs] [06a86b9] soc-2014-bge: attempting to fix slowparent rotation in the viewport

Ines Almeida noreply at git.blender.org
Wed Aug 6 18:41:43 CEST 2014


Commit: 06a86b9076f79409eb10b95f1409ddeda496582e
Author: Ines Almeida
Date:   Wed Aug 6 18:41:07 2014 +0200
Branches: soc-2014-bge
https://developer.blender.org/rB06a86b9076f79409eb10b95f1409ddeda496582e

attempting to fix slowparent rotation in the viewport

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

M	source/blender/blenkernel/intern/object.c

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

diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 98a197b..d78f4b5 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -2287,20 +2287,10 @@ static void solve_parenting(Scene *scene, Object *ob, Object *par, float obmat[4
 
 static bool where_is_object_parslow(Object *ob, float obmat[4][4], float slowmat[4][4])
 {
-	float *fp1, *fp2;
-	float fac1, fac2;
-	int a;
-
-	/* include framerate */
-	fac1 = (1.0f / (1.0f + fabsf(ob->sf)) );
+	float fac1 = (1.0f / (1.0f + fabsf(ob->sf)) );
 	if (fac1 >= 1.0f) return 0;
-	fac2 = 1.0f - fac1;
 
-	fp1 = obmat[0];
-	fp2 = slowmat[0];
-	for (a = 0; a < 16; a++, fp1++, fp2++) {
-		fp1[0] = fac1 * fp1[0] + fac2 * fp2[0];
-	}
+	blend_m4_m4m4(obmat, slowmat, obmat, fac1);
 
 	return 1;
 }




More information about the Bf-blender-cvs mailing list