[Bf-blender-cvs] [a2779a4] master: Fix T48230: Home key when only one keyframe makes the DopeSheet acting weird.

Bastien Montagne noreply at git.blender.org
Fri Apr 22 14:43:24 CEST 2016


Commit: a2779a460669fbf49a8b8f1acc9e8ddbc10dd7cf
Author: Bastien Montagne
Date:   Fri Apr 22 14:38:46 2016 +0200
Branches: master
https://developer.blender.org/rBa2779a460669fbf49a8b8f1acc9e8ddbc10dd7cf

Fix T48230: Home key when only one keyframe makes the DopeSheet acting weird.

Simply apply same minimal range as in graph editor when we get a zero one from keyframes.

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

M	source/blender/editors/space_action/action_edit.c

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

diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index b69547b..c0947da 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -239,6 +239,11 @@ static bool get_keyframe_extents(bAnimContext *ac, float *min, float *max, const
 			}
 		}
 
+		if (fabsf(*max - *min) < 0.001f) {
+			*min -= 0.0005f;
+			*max += 0.0005f;
+		}
+
 		/* free memory */
 		ANIM_animdata_freelist(&anim_data);
 	}




More information about the Bf-blender-cvs mailing list