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>2007-12-07 07:24:02 +0300
committerJoshua Leung <aligorith@gmail.com>2007-12-07 07:24:02 +0300
commitab02e9140e6c8b1d8c9169b18fa5025a1fb54377 (patch)
treed4a6fbb81c1b729a71a965738a5543e52e377926 /source/blender/makesdna/DNA_nla_types.h
parent90715580b93d633aa01e1c0e12b057301658cc59 (diff)
== NLA - Scale Setting for Strips ==
NLA-Strips now have a new setting: Scale. It determines how much the action-range is scaled for each repeat, instead of the scaling being implicitly determined based on repeats + strip-length. One of the instant benefits of this, is that when increasing the number of repeats, the strip length increases by the right amount. Thus, increasing the number of repeats retains a constant speed. Hopefully we can prevent weirdly scaled actions this way. (i.e. 0.00001 frames long action * 10000 or so) Todo: - Transform code needs to be able to set the scale setting (it doesn't yet) - Add a new option to "apply scaling", to fix up problems with old files that have really bad scaling. Situations when this is needed could get indicated in the interface too... (red background for "Scale" field?)
Diffstat (limited to 'source/blender/makesdna/DNA_nla_types.h')
-rw-r--r--source/blender/makesdna/DNA_nla_types.h32
1 files changed, 17 insertions, 15 deletions
diff --git a/source/blender/makesdna/DNA_nla_types.h b/source/blender/makesdna/DNA_nla_types.h
index d7ccfe01085..e9a0a3d0602 100644
--- a/source/blender/makesdna/DNA_nla_types.h
+++ b/source/blender/makesdna/DNA_nla_types.h
@@ -70,17 +70,17 @@ typedef struct bActionStrip {
struct Object *object; /* For groups, the actual object being nla'ed */
float start, end; /* The range of frames covered by this strip */
float actstart, actend; /* The range of frames taken from the action */
- float actoffs, padf; /* Offset within action, for cycles and striding */
+ float actoffs; /* Offset within action, for cycles and striding */
float stridelen; /* The stridelength (considered when flag & ACT_USESTRIDE) */
float repeat; /* The number of times to repeat the action range */
+ float scale; /* The amount the action range is scaled by */
float blendin, blendout; /* The number of frames on either end of the strip's length to fade in/out */
char stridechannel[32]; /* Instead of stridelen, it uses an action channel */
char offs_bone[32]; /* if repeat, use this bone/channel for defining offset */
- struct ListBase modifiers; /* modifier stack */
-
+ ListBase modifiers; /* modifier stack */
} bActionStrip;
/* strip->mode (these defines aren't really used, but are here for reference) */
@@ -88,18 +88,20 @@ typedef struct bActionStrip {
#define ACTSTRIPMODE_ADD 1
/* strip->flag */
-#define ACTSTRIP_SELECT 0x01
-#define ACTSTRIP_USESTRIDE 0x02
-#define ACTSTRIP_BLENDTONEXT 0x04 /* Not implemented. Is not used anywhere */
-#define ACTSTRIP_HOLDLASTFRAME 0x08
-#define ACTSTRIP_ACTIVE 0x10
-#define ACTSTRIP_LOCK_ACTION 0x20
-#define ACTSTRIP_MUTE 0x40
-#define ACTSTRIP_REVERSE 0x80 /* This has yet to be implemented. To indicate that a strip should be played backwards */
-#define ACTSTRIP_CYCLIC_USEX 0x100
-#define ACTSTRIP_CYCLIC_USEY 0x200
-#define ACTSTRIP_CYCLIC_USEZ 0x400
-#define ACTSTRIP_AUTO_BLENDS 0x800
+typedef enum eActStrip_Flag {
+ ACTSTRIP_SELECT = (1<<0),
+ ACTSTRIP_USESTRIDE = (1<<1),
+ ACTSTRIP_BLENDTONEXT = (1<<2), /* Not implemented. Is not used anywhere */
+ ACTSTRIP_HOLDLASTFRAME = (1<<3),
+ ACTSTRIP_ACTIVE = (1<<4),
+ ACTSTRIP_LOCK_ACTION = (1<<5),
+ ACTSTRIP_MUTE = (1<<6),
+ ACTSTRIP_REVERSE = (1<<7), /* This has yet to be implemented. To indicate that a strip should be played backwards */
+ ACTSTRIP_CYCLIC_USEX = (1<<8),
+ ACTSTRIP_CYCLIC_USEY = (1<<9),
+ ACTSTRIP_CYCLIC_USEZ = (1<<10),
+ ACTSTRIP_AUTO_BLENDS = (1<<11)
+} eActStrip_Flag;
#endif