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/makesrna/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/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 6b61b37ce5c..2f4e7881843 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -568,7 +568,7 @@ static void rna_def_gpencil_frame(BlenderRNA *brna)
prop = RNA_def_property(srna, "frame_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "framenum");
/* XXX note: this cannot occur on the same frame as another sketch */
- RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
+ RNA_def_property_range(prop, -MAXFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "Frame Number", "The frame on which this sketch appears");
/* Flags */
@@ -579,7 +579,9 @@ static void rna_def_gpencil_frame(BlenderRNA *brna)
prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_FRAME_SELECT);
RNA_def_property_ui_text(prop, "Select", "Frame is selected for editing in the Dope Sheet");
-
+
+
+ /* API */
func = RNA_def_function(srna, "clear", "rna_GPencil_frame_clear");
RNA_def_function_ui_description(func, "Remove all the grease pencil frame data");
}