[Bf-blender-cvs] [029a6c2] GPencil_Editing_Stage3: Fix: The "transform strokes on unkeyed frame creates new frame" feature didn't work on the first frame

Joshua Leung noreply at git.blender.org
Sat Oct 10 16:07:36 CEST 2015


Commit: 029a6c2383f5e4a04585c39bde2e87b92b66f961
Author: Joshua Leung
Date:   Sun Oct 11 03:06:49 2015 +1300
Branches: GPencil_Editing_Stage3
https://developer.blender.org/rB029a6c2383f5e4a04585c39bde2e87b92b66f961

Fix: The "transform strokes on unkeyed frame creates new frame" feature didn't work on the first frame

As a convenience feature, it is possible to jump to a frame without any existing
GP keyframe, and just use the transform tools to modify the stroke to create a new
keyframe on that frame. However, if the current frame was before the first GP keyframe,
the newly created keyframe would not work (if you scrub away), as it was getting
incorrectly added at the end of the list of keyframes, instead of in-order as expected.

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

M	source/blender/editors/transform/transform_conversions.c

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

diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index c12418f..ca735cb 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -7739,7 +7739,7 @@ static void createTransGPencil(bContext *C, TransInfo *t)
 				bool found = false;
 				
 				/* Find frame to insert it before */
-				for (gf = gpf->next; gf; gf = gf->next) {
+				for (gf = gpl->frames.first; gf; gf = gf->next) {
 					if (gf->framenum > cfra) {
 						/* Add it here */
 						BLI_insertlinkbefore(&gpl->frames, gf, new_frame);




More information about the Bf-blender-cvs mailing list