[Bf-blender-cvs] [6d495cc] temp_motionpaths: WIP Commit
Antony Riakiotakis
noreply at git.blender.org
Wed Jun 10 18:27:29 CEST 2015
Commit: 6d495cc4ef071171ff0686b2be898a41e05b8051
Author: Antony Riakiotakis
Date: Fri Mar 13 19:28:44 2015 +0100
Branches: temp_motionpaths
https://developer.blender.org/rB6d495cc4ef071171ff0686b2be898a41e05b8051
WIP Commit
===================================================================
M source/blender/blenkernel/BKE_anim.h
M source/blender/blenkernel/intern/anim.c
M source/blender/makesdna/DNA_action_types.h
===================================================================
diff --git a/source/blender/blenkernel/BKE_anim.h b/source/blender/blenkernel/BKE_anim.h
index 0d5078b..d1a5bcb 100644
--- a/source/blender/blenkernel/BKE_anim.h
+++ b/source/blender/blenkernel/BKE_anim.h
@@ -32,6 +32,7 @@
* \author nzc
* \since March 2001
*/
+struct bContext;
struct EvaluationContext;
struct Path;
struct Object;
@@ -55,6 +56,7 @@ struct bMotionPath *animviz_verify_motionpaths(struct ReportList *reports, struc
void animviz_get_object_motionpaths(struct Object *ob, ListBase *targets);
void animviz_calc_motionpaths(struct Scene *scene, ListBase *targets);
+void animviz_queue_object(const struct bContext *C, struct Object *ob);
/* ---------------------------------------------------- */
/* Curve Paths */
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index af1db8a..cdf05f8 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -91,6 +91,12 @@ void animviz_settings_init(bAnimVizSettings *avs)
avs->path_sf = 1; /* xxx - take from scene instead? */
avs->path_ef = 250; /* xxx - take from scene instead? */
+ avs->inv_start = avs->path_sf;
+ avs->inv_end = avs->path_ef;
+
+ /* max value shows invalid data */
+ avs->calc_end = avs->calc_start = INT32_MAX;
+
avs->path_viewflag = (MOTIONPATH_VIEW_KFRAS | MOTIONPATH_VIEW_KFNOS);
avs->path_step = 1;
@@ -189,6 +195,11 @@ bMotionPath *animviz_verify_motionpaths(ReportList *reports, Scene *scene, Objec
else {
/* clear the existing path (as the range has changed), and reallocate below */
animviz_free_motionpath_cache(mpath);
+ avs->inv_start = avs->path_sf;
+ avs->inv_end = avs->path_ef;
+
+ /* max value shows invalid data */
+ avs->calc_end = avs->calc_start = INT32_MAX;
}
}
}
@@ -563,7 +574,7 @@ static void motionpath_endjob(void *data)
/* add an object ot the thread calculating motionpaths */
-void animviz_add_object(const bContext *C, struct Object *ob)
+void animviz_queue_object(const bContext *C, struct Object *ob)
{
/* first, get the preview job, if it exists */
wmJob *wm_job;
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index 7b33118..47c84d9 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -113,6 +113,9 @@ typedef struct bAnimVizSettings {
int path_sf, path_ef; /* start and end frames of path-calculation range */
int path_bc, path_ac; /* number of frames before/after current frame to show */
+
+ int calc_start, calc_end; /* frames around which we have calculated motionpaths already */
+ int inv_start, inv_end; /* start of invalid frames in the motionpath */
} bAnimVizSettings;
More information about the Bf-blender-cvs
mailing list