[Bf-blender-cvs] [aad731d] master: Code cleanup: remove BKE_object_where_is_calc_simul function.

Brecht Van Lommel noreply at git.blender.org
Thu Jan 9 00:39:09 CET 2014


Commit: aad731d51cdb77f81287300e7a81a00ffd05a38e
Author: Brecht Van Lommel
Date:   Thu Jan 9 00:17:18 2014 +0100
https://developer.blender.org/rBaad731d51cdb77f81287300e7a81a00ffd05a38e

Code cleanup: remove BKE_object_where_is_calc_simul function.

It doesn't make any sense anymore with the current depsgraph and probably was
not useful for a long time, just a leftover from the pre 2.04 game engine.

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

M	source/blender/blenkernel/BKE_object.h
M	source/blender/blenkernel/intern/object.c
M	source/blender/gpu/intern/gpu_draw.c

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

diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index 419b8de..80fdf10 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -119,7 +119,6 @@ void BKE_object_where_is_calc_ex(struct Scene *scene, struct RigidBodyWorld *rbw
 void BKE_object_where_is_calc_time(struct Scene *scene, struct Object *ob, float ctime);
 void BKE_object_where_is_calc_time_ex(struct Scene *scene, struct Object *ob, float ctime,
                                       struct RigidBodyWorld *rbw, float r_originmat[3][3]);
-void BKE_object_where_is_calc_simul(struct Scene *scene, struct Object *ob);
 void BKE_object_where_is_calc_mat4(struct Scene *scene, struct Object *ob, float obmat[4][4]);
 
 /* possibly belong in own moduke? */
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index c069abf..c0520e5 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -2414,47 +2414,6 @@ void BKE_object_where_is_calc(Scene *scene, Object *ob)
 	BKE_object_where_is_calc_time_ex(scene, ob, BKE_scene_frame_get(scene), NULL, NULL);
 }
 
-/* was written for the old game engine (until 2.04) */
-/* It seems that this function is only called
- * for a lamp that is the child of another object */
-void BKE_object_where_is_calc_simul(Scene *scene, Object *ob)
-{
-	Object *par;
-	float *fp1, *fp2;
-	float slowmat[4][4];
-	float fac1, fac2;
-	int a;
-	
-	/* NO TIMEOFFS */
-	if (ob->parent) {
-		par = ob->parent;
-		
-		solve_parenting(scene, ob, par, ob->obmat, slowmat, NULL, true);
-		
-		if (ob->partype & PARSLOW) {
-			fac1 = (float)(1.0 / (1.0 + fabs(ob->sf)));
-			fac2 = 1.0f - fac1;
-			fp1 = ob->obmat[0];
-			fp2 = slowmat[0];
-			for (a = 0; a < 16; a++, fp1++, fp2++) {
-				fp1[0] = fac1 * fp1[0] + fac2 * fp2[0];
-			}
-		}
-	}
-	else {
-		BKE_object_to_mat4(ob, ob->obmat);
-	}
-	
-	/* solve constraints */
-	if (ob->constraints.first) {
-		bConstraintOb *cob;
-		
-		cob = BKE_constraints_make_evalob(scene, ob, NULL, CONSTRAINT_OBTYPE_OBJECT);
-		BKE_solve_constraints(&ob->constraints, cob, BKE_scene_frame_get(scene));
-		BKE_constraints_clear_evalob(cob);
-	}
-}
-
 /* for calculation of the inverse parent transform, only used for editor */
 void BKE_object_workob_calc_parent(Scene *scene, Object *ob, Object *workob)
 {
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 5910941..72547bf 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -1767,8 +1767,6 @@ int GPU_scene_object_lights(Scene *scene, Object *ob, int lay, float viewmat[4][
 		glPushMatrix();
 		glLoadMatrixf((float *)viewmat);
 		
-		BKE_object_where_is_calc_simul(scene, base->object);
-		
 		if (la->type==LA_SUN) {
 			/* sun lamp */
 			copy_v3_v3(direction, base->object->obmat[2]);




More information about the Bf-blender-cvs mailing list