4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 * The Original Code is Copyright (C) 2006 by Nicholas Bishop
21 * All rights reserved.
23 * The Original Code is: all of this file.
25 * Contributor(s): none yet.
27 * ***** END GPL LICENSE BLOCK *****
30 /** \file blender/editors/sculpt_paint/sculpt_intern.h
35 #ifndef BDR_SCULPTMODE_H
36 #define BDR_SCULPTMODE_H
38 #include "DNA_listBase.h"
39 #include "DNA_vec_types.h"
40 #include "DNA_key_types.h"
48 struct MultiresModifierData;
55 void sculptmode_selectbrush_menu(void);
56 void sculptmode_draw_mesh(int);
57 void sculpt_paint_brush(char clear);
58 void sculpt_stroke_draw(struct SculptStroke *);
59 void sculpt_radialcontrol_start(int mode);
60 struct MultiresModifierData *sculpt_multires_active(struct Scene *scene, struct Object *ob);
62 struct Brush *sculptmode_brush(void);
64 void sculpt(Sculpt *sd);
66 int sculpt_poll(struct bContext *C);
67 void sculpt_update_mesh_elements(struct Scene *scene, struct Sculpt *sd, struct Object *ob, int need_fmap);
69 /* Deformed mesh sculpt */
70 void sculpt_free_deformMats(struct SculptSession *ss);
73 struct SculptStroke *sculpt_stroke_new(const int max);
74 void sculpt_stroke_free(struct SculptStroke *);
75 void sculpt_stroke_add_point(struct SculptStroke *, const short x, const short y);
76 void sculpt_stroke_apply(struct Sculpt *sd, struct SculptStroke *);
77 void sculpt_stroke_apply_all(struct Sculpt *sd, struct SculptStroke *);
78 int sculpt_stroke_get_location(bContext *C, struct PaintStroke *stroke, float out[3], float mouse[2]);
82 typedef struct SculptUndoNode {
83 struct SculptUndoNode *next, *prev;
85 char idname[MAX_ID_NAME]; /* name instead of pointer*/
86 void *node; /* only during push, not valid afterwards! */
94 int maxvert; /* to verify if totvert it still the same */
95 int *index; /* to restore into right location */
98 int maxgrid; /* same for grid */
99 int gridsize; /* same for grid */
100 int totgrid; /* to restore into right location */
101 int *grids; /* to restore into right location */
107 char shapeName[sizeof(((KeyBlock *)0))->name];
110 SculptUndoNode *sculpt_undo_push_node(Object *ob, PBVHNode *node);
111 SculptUndoNode *sculpt_undo_get_node(PBVHNode *node);
112 void sculpt_undo_push_begin(const char *name);
113 void sculpt_undo_push_end(void);
115 void sculpt_vertcos_to_key(Object *ob, KeyBlock *kb, float (*vertCos)[3]);