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_ID.h"
27 #include "DNA_defs.h"
28 
29 struct AnimData;
30 struct BPoint;
31 struct Ipo;
32 struct Key;
33 struct MDeformVert;
34 
35 #
36 #
37 typedef struct EditLatt {
38   struct Lattice *latt;
39 
40   int shapenr;
41 
42   /**
43    * ID data is older than edit-mode data.
44    * Set #Main.is_memfile_undo_flush_needed when enabling.
45    */
46   char needs_flush_to_id;
47 } EditLatt;
48 
49 typedef struct Lattice {
50   ID id;
51   struct AnimData *adt;
52 
53   short pntsu, pntsv, pntsw, flag;
54   short opntsu, opntsv, opntsw;
55   char _pad2[3];
56   char typeu, typev, typew;
57   /** Active element index, unset with LT_ACTBP_NONE. */
58   int actbp;
59 
60   float fu, fv, fw, du, dv, dw;
61 
62   struct BPoint *def;
63 
64   /** Old animation system, deprecated for 2.5. */
65   struct Ipo *ipo DNA_DEPRECATED;
66   struct Key *key;
67 
68   struct MDeformVert *dvert;
69   /** Multiply the influence, MAX_VGROUP_NAME. */
70   char vgroup[64];
71 
72   struct EditLatt *editlatt;
73   void *batch_cache;
74 } Lattice;
75 
76 /* ***************** LATTICE ********************* */
77 
78 /* flag */
79 #define LT_GRID 1
80 #define LT_OUTSIDE 2
81 
82 #define LT_DS_EXPAND 4
83 
84 #define LT_ACTBP_NONE -1
85