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>2010-02-18 03:29:08 +0300
committerJoshua Leung <aligorith@gmail.com>2010-02-18 03:29:08 +0300
commit21a2350248fd526b898186ff7f1e2f5bc7457efd (patch)
treec329babd5fb61a903ccb389243d21bd7cbf7e9a0 /source/blender/makesdna
parent65cac9ae1392f9eeb00cf2154e9c154e7104ce6b (diff)
Animation Playback Option (No negative frames) and Other Bugfixes:
* Added a user-preference setting which disallows setting the current frame number to a negative number. This setting only applies when setting the current frame by scrubbing the time cursor in a timeline view, or by typing a value into the current frame number field. * Made the minimum frame number for the start frame to be 0, which should make setting keyframes by a regular step size less confusing. Also changed the MINFRAME define to 0 for consistency. Hopefully this doesn't cause any problems with any output formats. * Fixed some missing channel selection cases in animation editors.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_scene_types.h4
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h8
2 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index ef6202c5faa..c408fd69f4f 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -982,8 +982,8 @@ typedef struct Scene {
#define MAXFRAME 300000
#define MAXFRAMEF 300000.0f
-#define MINFRAME 1
-#define MINFRAMEF 1.0f
+#define MINFRAME 0
+#define MINFRAMEF 0.0f
/* (minimum frame number for current-frame) */
#define MINAFRAME -300000
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 436b52c9b8d..a2d18ed5d0a 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -405,6 +405,14 @@ extern UserDef U; /* from blenkernel blender.c */
#define USER_DRAGIMMEDIATE (1 << 21)
#define USER_DONT_DOSCRIPTLINKS (1 << 22)
#define USER_FILENOUI (1 << 23)
+#define USER_NONEGFRAMES (1 << 24)
+
+/* helper macro for checking frame clamping */
+#define FRAMENUMBER_MIN_CLAMP(cfra) \
+ { \
+ if ((U.flag & USER_NONEGFRAMES) && (cfra < 0)) \
+ cfra = 0; \
+ }
/* viewzom */
#define USER_ZOOM_CONT 0