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.
This commit is contained in:
@@ -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? */
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user