[Bf-blender-cvs] [3bbb402] master: Motionpaths: Use scene range option, takes start/end frame and preview settings into account.

Antony Riakiotakis noreply at git.blender.org
Fri May 8 12:36:03 CEST 2015


Commit: 3bbb4020e7f0fae80a5edd31e19b7fa97d2149e4
Author: Antony Riakiotakis
Date:   Fri May 8 12:35:38 2015 +0200
Branches: master
https://developer.blender.org/rB3bbb4020e7f0fae80a5edd31e19b7fa97d2149e4

Motionpaths: Use scene range option, takes start/end frame and preview
settings into account.

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

M	source/blender/editors/space_view3d/drawanimviz.c
M	source/blender/makesdna/DNA_action_types.h
M	source/blender/makesrna/intern/rna_animviz.c

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

diff --git a/source/blender/editors/space_view3d/drawanimviz.c b/source/blender/editors/space_view3d/drawanimviz.c
index d753ad6..aa06f5e 100644
--- a/source/blender/editors/space_view3d/drawanimviz.c
+++ b/source/blender/editors/space_view3d/drawanimviz.c
@@ -95,6 +95,10 @@ void draw_motion_path_instance(Scene *scene,
 		sfra = CFRA - avs->path_bc;
 		efra = CFRA + avs->path_ac;
 	}
+	else if (avs->path_type == MOTIONPATH_TYPE_SCENE_RANGE) {
+		sfra = PSFRA;
+		efra = PEFRA;
+	}
 	else {
 		/* Use the current display range */
 		sfra = avs->path_sf;
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index 761e76e..bc30c7f 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -148,6 +148,7 @@ typedef enum eMotionPaths_Types {
 	MOTIONPATH_TYPE_RANGE = 0,
 	/* only show the parts of the paths around the current frame */
 	MOTIONPATH_TYPE_ACFRA = 1,
+	MOTIONPATH_TYPE_SCENE_RANGE = 2,
 } eMotionPath_Types;
 
 /* bAnimVizSettings->path_viewflag */
diff --git a/source/blender/makesrna/intern/rna_animviz.c b/source/blender/makesrna/intern/rna_animviz.c
index 719eb9f..f156f61 100644
--- a/source/blender/makesrna/intern/rna_animviz.c
+++ b/source/blender/makesrna/intern/rna_animviz.c
@@ -252,6 +252,7 @@ static void rna_def_animviz_paths(BlenderRNA *brna)
 		{MOTIONPATH_TYPE_ACFRA, "CURRENT_FRAME", 0, "Around Frame",
 		 "Display Paths of poses within a fixed number of frames around the current frame"},
 		{MOTIONPATH_TYPE_RANGE, "RANGE", 0, "In Range", "Display Paths of poses within specified range"},
+		{MOTIONPATH_TYPE_SCENE_RANGE, "SCENE", 0, "Scene Range", "Display Paths based on scene start/end frames (preview setting taken into account)"},
 		{0, NULL, 0, NULL, NULL}
 	};




More information about the Bf-blender-cvs mailing list