1 /* 2 * This program is free software; you can redistribute it and/or 3 * modify it under the terms of the GNU General Public License 4 * as published by the Free Software Foundation; either version 2 5 * of the License, or (at your option) any later version. 6 * 7 * This program is distributed in the hope that it will be useful, 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * GNU General Public License for more details. 11 * 12 * You should have received a copy of the GNU General Public License 13 * along with this program; if not, write to the Free Software Foundation, 14 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 * 16 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 * All rights reserved. 18 */ 19 20 /** \file 21 * \ingroup DNA 22 */ 23 24 #pragma once 25 26 #include "DNA_listBase.h" 27 28 struct Ipo; 29 struct Object; 30 struct bAction; 31 32 /* simple uniform modifier structure, assumed it can hold all type info */ 33 typedef struct bActionModifier { 34 struct bActionModifier *next, *prev; 35 short type, flag; 36 char channel[32]; 37 38 /* noise modifier */ 39 float noisesize, turbul; 40 short channels; 41 42 /* path deform modifier */ 43 short no_rot_axis; 44 struct Object *ob; 45 } bActionModifier; 46 47 /* NLA-Modifier Types (UNUSED) */ 48 // #define ACTSTRIP_MOD_DEFORM 0 49 // #define ACTSTRIP_MOD_NOISE 1 50 51 typedef struct bActionStrip { 52 struct bActionStrip *next, *prev; 53 short flag, mode; 54 /** Axis 0=x, 1=y, 2=z. */ 55 short stride_axis; 56 /** Current modifier for buttons. */ 57 short curmod; 58 59 /** Blending ipo - was used for some old NAN era experiments. Non-functional currently. */ 60 struct Ipo *ipo; 61 /** The action referenced by this strip. */ 62 struct bAction *act; 63 /** For groups, the actual object being nla'ed. */ 64 struct Object *object; 65 /** The range of frames covered by this strip. */ 66 float start, end; 67 /** The range of frames taken from the action. */ 68 float actstart, actend; 69 /** Offset within action, for cycles and striding. */ 70 float actoffs; 71 /** The stridelength (considered when flag & ACT_USESTRIDE). */ 72 float stridelen; 73 /** The number of times to repeat the action range. */ 74 float repeat; 75 /** The amount the action range is scaled by. */ 76 float scale; 77 78 /** The number of frames on either end of the strip's length to fade in/out. */ 79 float blendin, blendout; 80 81 /** Instead of stridelen, it uses an action channel. */ 82 char stridechannel[32]; 83 /** If repeat, use this bone/channel for defining offset. */ 84 char offs_bone[32]; 85 86 /** Modifier stack. */ 87 ListBase modifiers; 88 } bActionStrip; 89 90 /* strip->mode (these defines aren't really used, but are here for reference) */ 91 #define ACTSTRIPMODE_BLEND 0 92 #define ACTSTRIPMODE_ADD 1 93 94 /* strip->flag */ 95 typedef enum eActStrip_Flag { 96 ACTSTRIP_SELECT = (1 << 0), 97 ACTSTRIP_USESTRIDE = (1 << 1), 98 /* Not implemented. Is not used anywhere */ 99 /* ACTSTRIP_BLENDTONEXT = (1 << 2), */ /* UNUSED */ 100 ACTSTRIP_HOLDLASTFRAME = (1 << 3), 101 ACTSTRIP_ACTIVE = (1 << 4), 102 ACTSTRIP_LOCK_ACTION = (1 << 5), 103 ACTSTRIP_MUTE = (1 << 6), 104 /* This has yet to be implemented. To indicate that a strip should be played backwards */ 105 ACTSTRIP_REVERSE = (1 << 7), 106 ACTSTRIP_AUTO_BLENDS = (1 << 11), 107 } eActStrip_Flag; 108