LEFT | RIGHT |
1 /* | 1 /* |
2 * ***** BEGIN GPL LICENSE BLOCK ***** | 2 * ***** BEGIN GPL LICENSE BLOCK ***** |
3 * | 3 * |
4 * This program is free software; you can redistribute it and/or | 4 * This program is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU General Public License | 5 * modify it under the terms of the GNU General Public License |
6 * as published by the Free Software Foundation; either version 2 | 6 * as published by the Free Software Foundation; either version 2 |
7 * of the License, or (at your option) any later version.· | 7 * of the License, or (at your option) any later version.· |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 11 matching lines...) Expand all Loading... |
22 * Contributor(s): Blender Foundation | 22 * Contributor(s): Blender Foundation |
23 * | 23 * |
24 * ***** END GPL LICENSE BLOCK ***** | 24 * ***** END GPL LICENSE BLOCK ***** |
25 */ | 25 */ |
26 | 26 |
27 /** \file blender/editors/sculpt_paint/paint_intern.h | 27 /** \file blender/editors/sculpt_paint/paint_intern.h |
28 * \ingroup edsculpt | 28 * \ingroup edsculpt |
29 */ | 29 */ |
30 | 30 |
31 | 31 |
32 #ifndef ED_PAINT_INTERN_H | 32 #ifndef __PAINT_INTERN_H__ |
33 #define ED_PAINT_INTERN_H | 33 #define __PAINT_INTERN_H__ |
34 | 34 |
35 struct ARegion; | 35 struct ARegion; |
36 struct bContext; | 36 struct bContext; |
37 struct bglMats; | 37 struct bglMats; |
38 struct Brush; | 38 struct Brush; |
39 struct ListBase; | 39 struct ListBase; |
40 struct Mesh; | 40 struct Mesh; |
41 struct Object; | 41 struct Object; |
42 struct PaintStroke; | 42 struct PaintStroke; |
43 struct PointerRNA; | 43 struct PointerRNA; |
| 44 struct rcti; |
44 struct Scene; | 45 struct Scene; |
| 46 struct RegionView3D; |
45 struct VPaint; | 47 struct VPaint; |
46 struct ViewContext; | 48 struct ViewContext; |
47 struct wmEvent; | 49 struct wmEvent; |
48 struct wmOperator; | 50 struct wmOperator; |
49 struct wmOperatorType; | 51 struct wmOperatorType; |
50 | 52 |
51 /* paint_stroke.c */ | 53 /* paint_stroke.c */ |
52 typedef int (*StrokeGetLocation)(struct bContext *C, struct PaintStroke *stroke,
float location[3], float mouse[2]); | 54 typedef int (*StrokeGetLocation)(struct bContext *C, float location[3], float mo
use[2]); |
53 typedef int (*StrokeTestStart)(struct bContext *C, struct wmOperator *op, struct
wmEvent *event); | 55 typedef int (*StrokeTestStart)(struct bContext *C, struct wmOperator *op, struct
wmEvent *event); |
54 typedef void (*StrokeUpdateStep)(struct bContext *C, struct PaintStroke *stroke,
struct PointerRNA *itemptr); | 56 typedef void (*StrokeUpdateStep)(struct bContext *C, struct PaintStroke *stroke,
struct PointerRNA *itemptr); |
55 typedef void (*StrokeDone)(struct bContext *C, struct PaintStroke *stroke); | 57 typedef void (*StrokeDone)(const struct bContext *C, struct PaintStroke *stroke)
; |
56 | 58 |
57 struct PaintStroke *paint_stroke_new(struct bContext *C, | 59 struct PaintStroke *paint_stroke_new(struct bContext *C, |
58 » » » » » StrokeGetLocation get_location, StrokeT
estStart test_start, | 60 StrokeGetLocation get_location, StrokeTestS
tart test_start, |
59 » » » » » StrokeUpdateStep update_step, StrokeDon
e done, int event_type); | 61 StrokeUpdateStep update_step, StrokeDone do
ne, int event_type); |
60 void paint_stroke_free(struct PaintStroke *stroke); | 62 void paint_stroke_data_free(struct wmOperator *op); |
61 | 63 |
62 int paint_space_stroke_enabled(struct Brush *br); | 64 int paint_space_stroke_enabled(struct Brush *br); |
63 | 65 |
| 66 struct wmKeyMap *paint_stroke_modal_keymap(struct wmKeyConfig *keyconf); |
64 int paint_stroke_modal(struct bContext *C, struct wmOperator *op, struct wmEvent
*event); | 67 int paint_stroke_modal(struct bContext *C, struct wmOperator *op, struct wmEvent
*event); |
65 int paint_stroke_exec(struct bContext *C, struct wmOperator *op); | 68 int paint_stroke_exec(struct bContext *C, struct wmOperator *op); |
66 int paint_stroke_cancel(struct bContext *C, struct wmOperator *op); | 69 int paint_stroke_cancel(struct bContext *C, struct wmOperator *op); |
67 struct ViewContext *paint_stroke_view_context(struct PaintStroke *stroke); | 70 struct ViewContext *paint_stroke_view_context(struct PaintStroke *stroke); |
68 void *paint_stroke_mode_data(struct PaintStroke *stroke); | 71 void *paint_stroke_mode_data(struct PaintStroke *stroke); |
69 void paint_stroke_set_mode_data(struct PaintStroke *stroke, void *mode_data); | 72 void paint_stroke_set_mode_data(struct PaintStroke *stroke, void *mode_data); |
70 int paint_poll(struct bContext *C); | 73 int paint_poll(struct bContext *C); |
71 void paint_cursor_start(struct bContext *C, int (*poll)(struct bContext *C)); | 74 void paint_cursor_start(struct bContext *C, int (*poll)(struct bContext *C)); |
72 | 75 |
73 /* paint_vertex.c */ | 76 /* paint_vertex.c */ |
(...skipping 16 matching lines...) Expand all Loading... |
90 void PAINT_OT_vertex_paint(struct wmOperatorType *ot); | 93 void PAINT_OT_vertex_paint(struct wmOperatorType *ot); |
91 | 94 |
92 unsigned int vpaint_get_current_col(struct VPaint *vp); | 95 unsigned int vpaint_get_current_col(struct VPaint *vp); |
93 | 96 |
94 /* paint_image.c */ | 97 /* paint_image.c */ |
95 int image_texture_paint_poll(struct bContext *C); | 98 int image_texture_paint_poll(struct bContext *C); |
96 | 99 |
97 void PAINT_OT_image_paint(struct wmOperatorType *ot); | 100 void PAINT_OT_image_paint(struct wmOperatorType *ot); |
98 void PAINT_OT_grab_clone(struct wmOperatorType *ot); | 101 void PAINT_OT_grab_clone(struct wmOperatorType *ot); |
99 void PAINT_OT_sample_color(struct wmOperatorType *ot); | 102 void PAINT_OT_sample_color(struct wmOperatorType *ot); |
100 void PAINT_OT_clone_cursor_set(struct wmOperatorType *ot); | |
101 void PAINT_OT_texture_paint_toggle(struct wmOperatorType *ot); | |
102 void PAINT_OT_project_image(struct wmOperatorType *ot); | 103 void PAINT_OT_project_image(struct wmOperatorType *ot); |
103 void PAINT_OT_image_from_view(struct wmOperatorType *ot); | 104 void PAINT_OT_image_from_view(struct wmOperatorType *ot); |
104 void PAINT_OT_weight_layers_images_from_view(struct wmOperatorType *ot); | |
105 void PAINT_OT_weight_layers_to_uv_images(struct wmOperatorType *ot); | |
106 | 105 |
107 /* uv sculpting */ | |
108 int uv_sculpt_poll(struct bContext *C); | |
109 void SCULPT_OT_uv_sculpt_stroke(struct wmOperatorType *ot); | |
110 | 106 |
111 /* paint_utils.c */ | 107 /* paint_utils.c */ |
112 void projectf(struct bglMats *mats, const float v[3], float p[2]); | |
113 float paint_calc_object_space_radius(struct ViewContext *vc, float center[3], fl
oat pixel_radius); | |
114 float paint_get_tex_pixel(struct Brush* br, float u, float v); | |
115 int imapaint_pick_face(struct ViewContext *vc, struct Mesh *me, const int mval[2
], unsigned int *index); | |
116 void imapaint_pick_uv(struct Scene *scene, struct Object *ob, unsigned int facei
ndex, const int xy[2], float uv[2]); | |
117 | 108 |
118 void paint_sample_color(struct Scene *scene, struct ARegion *ar, int x, int y); | |
119 void BRUSH_OT_curve_preset(struct wmOperatorType *ot); | |
120 | |
121 void PAINT_OT_face_select_linked(struct wmOperatorType *ot); | |
122 void PAINT_OT_face_select_linked_pick(struct wmOperatorType *ot); | |
123 void PAINT_OT_face_select_all(struct wmOperatorType *ot); | |
124 void PAINT_OT_face_select_inverse(struct wmOperatorType *ot); | |
125 void PAINT_OT_face_select_hide(struct wmOperatorType *ot); | |
126 void PAINT_OT_face_select_reveal(struct wmOperatorType *ot); | |
127 | |
128 void PAINT_OT_vert_select_all(struct wmOperatorType *ot); | |
129 void PAINT_OT_vert_select_inverse(struct wmOperatorType *ot); | |
130 int vert_paint_poll(struct bContext *C); | |
131 int mask_paint_poll(struct bContext *C); | |
132 | |
133 int facemask_paint_poll(struct bContext *C); | |
134 | |
135 /* stroke operator */ | |
136 typedef enum BrushStrokeMode { | |
137 BRUSH_STROKE_NORMAL, | |
138 BRUSH_STROKE_INVERT, | |
139 BRUSH_STROKE_SMOOTH, | |
140 } BrushStrokeMode; | |
141 | |
142 /* paint_undo.c */ | |
143 typedef void (*UndoRestoreCb)(struct bContext *C, struct ListBase *lb); | |
144 typedef void (*UndoFreeCb)(struct ListBase *lb); | |
145 | |
146 void undo_paint_push_begin(int type, const char *name, UndoRestoreCb restore, Un
doFreeCb free); | |
147 struct ListBase *undo_paint_push_get_list(int type); | |
148 void undo_paint_push_count_alloc(int type, int size); | |
149 void undo_paint_push_end(int type); | |
150 | |
151 #endif /* ED_PAINT_INTERN_H */ | |
152 | |
LEFT | RIGHT |