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