2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * The Original Code is Copyright (C) 2006 by Nicholas Bishop
19 * All rights reserved.
21 * The Original Code is: all of this file.
23 * Contributor(s): none yet.
25 * ***** END GPL LICENSE BLOCK *****
28 /** \file blender/editors/sculpt_paint/sculpt_intern.h
33 #ifndef __SCULPT_INTERN_H__
34 #define __SCULPT_INTERN_H__
36 #include "DNA_listBase.h"
37 #include "DNA_vec_types.h"
38 #include "DNA_key_types.h"
40 #include "BLI_bitmap.h"
47 struct MultiresModifierData;
54 struct MultiresModifierData *sculpt_multires_active(struct Scene *scene, struct Object *ob);
56 void sculpt(struct Sculpt *sd);
58 int sculpt_mode_poll(struct bContext *C);
59 int sculpt_poll(struct bContext *C);
60 void sculpt_update_mesh_elements(struct Scene *scene, struct Sculpt *sd, struct Object *ob, int need_pmap);
62 /* Deformed mesh sculpt */
63 void free_sculptsession_deformMats(struct SculptSession *ss);
66 int sculpt_stroke_get_location(bContext *C, float out[3], float mouse[2]);
76 typedef struct SculptUndoNode {
77 struct SculptUndoNode *next, *prev;
81 char idname[MAX_ID_NAME]; /* name instead of pointer*/
82 void *node; /* only during push, not valid afterwards! */
91 int maxvert; /* to verify if totvert it still the same */
92 int *index; /* to restore into right location */
93 BLI_bitmap vert_hidden;
96 int maxgrid; /* same for grid */
97 int gridsize; /* same for grid */
98 int totgrid; /* to restore into right location */
99 int *grids; /* to restore into right location */
100 BLI_bitmap *grid_hidden;
106 char shapeName[sizeof(((KeyBlock *)0))->name];
109 SculptUndoNode *sculpt_undo_push_node(Object *ob, PBVHNode *node, SculptUndoType type);
110 SculptUndoNode *sculpt_undo_get_node(PBVHNode *node);
111 void sculpt_undo_push_begin(const char *name);
112 void sculpt_undo_push_end(void);
114 void sculpt_vertcos_to_key(Object *ob, KeyBlock *kb, float (*vertCos)[3]);