Blender V2.61 - r43446

DNA_key_types.h

Go to the documentation of this file.
00001 /*
00002  * ***** BEGIN GPL LICENSE BLOCK *****
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  *
00018  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
00019  * All rights reserved.
00020  *
00021  * The Original Code is: all of this file.
00022  *
00023  * Contributor(s): none yet.
00024  *
00025  * ***** END GPL LICENSE BLOCK *****
00026  */
00027 #ifndef DNA_KEY_TYPES_H
00028 #define DNA_KEY_TYPES_H
00029 
00034 #include "DNA_defs.h"
00035 #include "DNA_listBase.h"
00036 #include "DNA_ID.h"
00037 
00038 struct AnimData;
00039 struct Ipo;
00040 
00041 typedef struct KeyBlock {
00042     struct KeyBlock *next, *prev;
00043     
00044     float pos;
00045     float curval;
00046     short type, adrcode, relative, flag;    /* relative == 0 means first key is reference */
00047     int totelem, pad2;
00048     
00049     void *data;
00050     float *weights;
00051     char  name[64]; /* MAX_NAME */
00052     char vgroup[64];    /* MAX_VGROUP_NAME */
00053 
00054     float slidermin;
00055     float slidermax;
00056 } KeyBlock;
00057 
00058 
00059 typedef struct Key {
00060     ID id;
00061     struct AnimData *adt;   /* animation data (must be immediately after id for utilities to use it) */ 
00062     
00063     KeyBlock *refkey;
00064     char elemstr[64];   /* MAX_NAME */
00065     int elemsize;
00066     float curval  DNA_DEPRECATED;
00067     
00068     ListBase block;
00069     struct Ipo *ipo  DNA_DEPRECATED;  /* old animation system, deprecated for 2.5 */
00070     
00071     ID *from;
00072 
00073     short type, totkey;
00074     short slurph, flag;
00075 } Key;
00076 
00077 /* **************** KEY ********************* */
00078 
00079 /* key->type */
00080 #define KEY_NORMAL      0
00081 #define KEY_RELATIVE    1
00082 
00083 /* key->flag */
00084 #define KEY_DS_EXPAND   1
00085 
00086 /* keyblock->type */
00087 #define KEY_LINEAR      0
00088 #define KEY_CARDINAL    1
00089 #define KEY_BSPLINE     2
00090 
00091 /* keyblock->flag */
00092 #define KEYBLOCK_MUTE           (1<<0)
00093 #define KEYBLOCK_SEL            (1<<1)
00094 #define KEYBLOCK_LOCKED         (1<<2)
00095 
00096 #endif