Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2015-04-17 03:27:27 +0300
committerJoshua Leung <aligorith@gmail.com>2015-04-17 04:02:45 +0300
commit582fa5e36e031e08b2af39d055ac6790a12941ee (patch)
tree9fab1bd3b125be9cf5edb2c5e1798e198fd799fa /source/blender/blenkernel/intern
parent4cd37541b0e44315716d898cd84ee99d89634964 (diff)
Fix for Grease Pencil and negative frames
While investigating T44412, I noticed some weirdness going on when trying to draw on frame 0 (i.e. strokes were getting added to frame 1 instead). Clearly, this seemed like an off-by-one error related to clamping to prevent negative frames which was also excluding frame 0. This commit reverts the fixes made for T36831 in: rBf18f2fbb33d90ecc91e6f3d063cb9f97f217e808 After thinking this over, I think these checks against drawing on negative frames aren't needed. Even if the current userpref setting doesn't allow navigating to negative frames, this may not be true for other users that may work on the same file (in a team environment). Also, negative frame values can get set via the dopesheet.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/gpencil.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 17d87394118..ba4077ed70a 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -133,7 +133,7 @@ bGPDframe *gpencil_frame_addnew(bGPDlayer *gpl, int cframe)
short state = 0;
/* error checking (neg frame only if they are not allowed in Blender!) */
- if ((gpl == NULL) || ((U.flag & USER_NONEGFRAMES) && (cframe <= 0)))
+ if (gpl == NULL)
return NULL;
/* allocate memory for this frame */
@@ -388,8 +388,6 @@ bGPDframe *gpencil_layer_getframe(bGPDlayer *gpl, int cframe, short addnew)
/* error checking */
if (gpl == NULL) return NULL;
- /* No reason to forbid negative frames when they are allowed in Blender! */
- if ((U.flag & USER_NONEGFRAMES) && cframe <= 0) cframe = 1;
/* check if there is already an active frame */
if (gpl->actframe) {