Collada: Remove obsolete code
authorGaia Clary <gaia.clary@machinimatrix.org>
Tue, 27 Feb 2018 16:08:40 +0000 (17:08 +0100)
committerGaia Clary <gaia.clary@machinimatrix.org>
Tue, 27 Feb 2018 16:08:40 +0000 (17:08 +0100)
source/blender/collada/AnimationExporter.cpp
source/blender/collada/AnimationExporter.h

index cc9e7d2b0881196f219c6dd2c44048291c5da648..97d3b6b29b89f3e3c52070b47b9fa43aa4104965 100644 (file)
@@ -1938,49 +1938,3 @@ bool AnimationExporter::validateConstraints(bConstraint *con)
 
        return valid;
 }
-
-#if 0
-/*
- * Needed for sampled animations. 
- * This function calculates the object matrix at a given time,
- * also taking constraints into account.
- *
- * XXX: Why looking at the constraints here is necessary?
- *      Maybe this can be done better?
- */
-void AnimationExporter::calc_obmat_at_time(Object *ob, float ctime )
-{
-       BKE_scene_frame_set(scene, ctime);
-
-       Main *bmain = bc_get_main();
-       EvaluationContext *ev_context = bc_get_evaluation_context();
-       BKE_scene_update_for_newframe(ev_context, bmain, scene, scene->lay);
-
-       ListBase *conlist = get_active_constraints(ob);
-       bConstraint *con;
-       for (con = (bConstraint *)conlist->first; con; con = con->next) {
-               ListBase targets = {NULL, NULL};
-               
-               const bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
-               
-               if (cti && cti->get_constraint_targets) {
-                       bConstraintTarget *ct;
-                       Object *obtar;
-                       cti->get_constraint_targets(con, &targets);
-                       for (ct = (bConstraintTarget *)targets.first; ct; ct = ct->next) {
-                               obtar = ct->tar;
-
-                               if (obtar) {
-                                       BKE_animsys_evaluate_animdata(scene, &obtar->id, obtar->adt, ctime, ADT_RECALC_ANIM);
-                                       BKE_object_where_is_calc_time(scene, obtar, ctime);
-                               }
-                       }
-
-                       if (cti->flush_constraint_targets)
-                               cti->flush_constraint_targets(con, &targets, 1);
-               }
-       }
-       BKE_object_where_is_calc_time(scene, ob, ctime);
-}
-#endif
-
index 52b463535281cb8a5ebae5dadbac593b6f0a617b..a739b2b6cbe7865e17cf60062ec1fd7299e379d7 100644 (file)
@@ -200,6 +200,5 @@ protected:
 
        bool validateConstraints(bConstraint *con);
 
-       //void calc_obmat_at_time(Object *ob, float ctime);
 
 };