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:
authorJoshua Leung <aligorith@gmail.com>2010-03-26 05:57:49 +0300
committerJoshua Leung <aligorith@gmail.com>2010-03-26 05:57:49 +0300
commit3c872daa59774abaf3f53acaa2baf876e54308a5 (patch)
tree3ea1248e6675d16e0eebb8b154992115fa53c6f0 /source/blender/blenkernel
parentfda6082c682dcd8275f752e9a968ba4aa6e05441 (diff)
4 Devs in Agreement - End of the Road for Old Track
This commit removes the Old Track method (used to be found under Object -> Animation -> Track), with all existing instances of this being converted to Track To Constraints. In fact, while performing this removal, I found that this was supposed to have happened in version 2.27 already, but for some reason the options were left in, and this function managed to survive for a further decade. I've left the tracking axes around still, since it seems some curve tools still use that. However, that usage should probably get faded out in future too? Misc notes: * Fixed compiling error with constaints from harkyman's Maintain Volume patch. * Subversion of 2.52 now bumped up to .2
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_blender.h2
-rw-r--r--source/blender/blenkernel/intern/action.c1
-rw-r--r--source/blender/blenkernel/intern/anim.c2
-rw-r--r--source/blender/blenkernel/intern/constraint.c3
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c5
-rw-r--r--source/blender/blenkernel/intern/object.c71
6 files changed, 3 insertions, 81 deletions
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index 6b656f1d12e..8865757b85a 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -45,7 +45,7 @@ struct Scene;
struct Main;
#define BLENDER_VERSION 252
-#define BLENDER_SUBVERSION 1
+#define BLENDER_SUBVERSION 2
#define BLENDER_MINVERSION 250
#define BLENDER_MINSUBVERSION 0
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index afd0b3a0f57..52f59c1681a 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -1063,7 +1063,6 @@ void what_does_obaction (Scene *scene, Object *ob, Object *workob, bPose *pose,
copy_m4_m4(workob->parentinv, ob->parentinv);
copy_m4_m4(workob->constinv, ob->constinv);
workob->parent= ob->parent;
- workob->track= ob->track;
workob->rotmode= ob->rotmode;
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index b2ac32da138..1465f4550f5 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -668,7 +668,7 @@ static void frames_duplilist(ListBase *lb, Scene *scene, Object *ob, int level,
if(level>MAX_DUPLI_RECUR) return;
cfrao= scene->r.cfra;
- if(ob->parent==NULL && ob->track==NULL && ob->ipo==NULL && ob->constraints.first==NULL) return;
+ if(ob->parent==NULL && ob->constraints.first==NULL) return;
if(ob->transflag & OB_DUPLINOSPEED) enable_cu_speed= 0;
copyob= *ob; /* store transform info */
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 3ab5e9442b4..7994849a469 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -1867,7 +1867,7 @@ static void samevolume_new_data (void *cdata)
data->volume = 1.0f;
}
-static void samevolume_evaluate (bConstraint *con, bConstraintOb *cob)
+static void samevolume_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
{
bSameVolumeConstraint *data= con->data;
@@ -1896,7 +1896,6 @@ static void samevolume_evaluate (bConstraint *con, bConstraintOb *cob)
}
break;
}
-
}
static bConstraintTypeInfo CTI_SAMEVOL = {
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 4e0270315ad..86cafa733ff 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -468,11 +468,6 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
addtoroot = 0;
}
- if (ob->track) {
- node2 = dag_get_node(dag,ob->track);
- dag_add_relation(dag,node2,node,DAG_RL_OB_OB, "Track To");
- addtoroot = 0;
- }
if (ob->proxy) {
node2 = dag_get_node(dag, ob->proxy);
dag_add_relation(dag, node, node2, DAG_RL_DATA_DATA|DAG_RL_OB_OB, "Proxy");
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 2026bb3da6e..b9e4894a868 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -361,11 +361,6 @@ void unlink_object(Scene *scene, Object *ob)
obt->recalc |= OB_RECALC;
}
- if(obt->track==ob) {
- obt->track= NULL;
- obt->recalc |= OB_RECALC_OB;
- }
-
modifiers_foreachObjectLink(obt, unlink_object__unlinkModifierLinks, ob);
if ELEM(obt->type, OB_CURVE, OB_FONT) {
@@ -2037,31 +2032,6 @@ void where_is_object_time(Scene *scene, Object *ob, float ctime)
object_to_mat4(ob, ob->obmat);
}
- /* Handle tracking */
- if(ob->track) {
- /* Try to remove this tracking relationship if we can easily detect that
- * it is cyclic (i.e. direct tracking), and bound to cause us troubles.
- * For the other cases (i.e. a cyclic triangle, and higher orders), we can't
- * easily detect or know how to remove those relationships, safely, so just
- * let them be (with warnings).
- * Of course, this could also be a simple track that doesn't do anything bad either :)
- */
- if (ob->track->track == ob) {
- printf("Removed direct cyclic tracking between %s and %s\n", ob->id.name+2, ob->track->id.name+2);
- ob->track->track = NULL;
- ob->track = NULL;
- }
- else {
- /* NOTE: disabled recursive recalc for tracking for now, since this causes crashes
- * when users create cyclic dependencies (stack overflow). Really, this step ought
- * not to be needed anymore with the depsgraph, though this may not be the case.
- * -- Aligorith, 2010 Mar 26
- */
- //if( ctime != ob->track->ctime) where_is_object_time(scene, ob->track, ctime);
- solve_tracking(ob, ob->track->obmat);
- }
- }
-
/* solve constraints */
if (ob->constraints.first && !(ob->flag & OB_NO_CONSTRAINTS)) {
bConstraintOb *cob;
@@ -2157,33 +2127,6 @@ static void solve_parenting (Scene *scene, Object *ob, Object *par, float obmat[
}
}
-void solve_tracking (Object *ob, float targetmat[][4])
-{
- float quat[4];
- float vec[3];
- float totmat[3][3];
- float tmat[4][4];
-
- sub_v3_v3v3(vec, ob->obmat[3], targetmat[3]);
- vec_to_quat( quat,vec, ob->trackflag, ob->upflag);
- quat_to_mat3( totmat,quat);
-
- if(ob->parent && (ob->transflag & OB_POWERTRACK)) {
- /* 'temporal' : clear parent info */
- object_to_mat4(ob, tmat);
- tmat[0][3]= ob->obmat[0][3];
- tmat[1][3]= ob->obmat[1][3];
- tmat[2][3]= ob->obmat[2][3];
- tmat[3][0]= ob->obmat[3][0];
- tmat[3][1]= ob->obmat[3][1];
- tmat[3][2]= ob->obmat[3][2];
- tmat[3][3]= ob->obmat[3][3];
- }
- else copy_m4_m4(tmat, ob->obmat);
-
- mul_m4_m3m4(ob->obmat, totmat, tmat);
-
-}
void where_is_object(struct Scene *scene, Object *ob)
{
@@ -2204,12 +2147,6 @@ for a lamp that is the child of another object */
int a;
/* NO TIMEOFFS */
-
- /* no ipo! (because of dloc and realtime-ipos) */
- // XXX old animation system
- //ipo= ob->ipo;
- //ob->ipo= NULL;
-
if(ob->parent) {
par= ob->parent;
@@ -2231,9 +2168,6 @@ for a lamp that is the child of another object */
object_to_mat4(ob, ob->obmat);
}
- if(ob->track)
- solve_tracking(ob, ob->track->obmat);
-
/* solve constraints */
if (ob->constraints.first) {
bConstraintOb *cob;
@@ -2242,10 +2176,6 @@ for a lamp that is the child of another object */
solve_constraints(&ob->constraints, cob, (float)scene->r.cfra);
constraints_clear_evalob(cob);
}
-
- /* WATCH IT!!! */
- // XXX old animation system
- //ob->ipo= ipo;
}
/* for calculation of the inverse parent transform, only used for editor */
@@ -2257,7 +2187,6 @@ void what_does_parent(Scene *scene, Object *ob, Object *workob)
unit_m4(workob->parentinv);
unit_m4(workob->constinv);
workob->parent= ob->parent;
- workob->track= ob->track;
workob->trackflag= ob->trackflag;
workob->upflag= ob->upflag;