Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/BKE_paint.h')
-rw-r--r--source/blender/blenkernel/BKE_paint.h51
1 files changed, 27 insertions, 24 deletions
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h
index 4eafdae9ebd..bf1cfb263eb 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -37,12 +37,12 @@ struct BMesh;
struct BMFace;
struct Brush;
struct CurveMapping;
-struct MDisps;
struct MeshElemMap;
struct GridPaintMask;
struct Main;
+struct MLoop;
+struct MLoopTri;
struct MFace;
-struct MultireModifierData;
struct MVert;
struct Object;
struct Paint;
@@ -50,13 +50,13 @@ struct PaintCurve;
struct Palette;
struct PaletteColor;
struct PBVH;
+struct ReportList;
struct Scene;
struct Sculpt;
struct StrokeCache;
struct Tex;
struct ImagePool;
struct UnifiedPaintSettings;
-struct wmOperator;
enum OverlayFlags;
@@ -66,13 +66,13 @@ extern const char PAINT_CURSOR_WEIGHT_PAINT[3];
extern const char PAINT_CURSOR_TEXTURE_PAINT[3];
typedef enum PaintMode {
- PAINT_SCULPT = 0,
- PAINT_VERTEX = 1,
- PAINT_WEIGHT = 2,
- PAINT_TEXTURE_PROJECTIVE = 3,
- PAINT_TEXTURE_2D = 4,
- PAINT_SCULPT_UV = 5,
- PAINT_INVALID = 6
+ ePaintSculpt = 0,
+ ePaintVertex = 1,
+ ePaintWeight = 2,
+ ePaintTextureProjective = 3,
+ ePaintTexture2D = 4,
+ ePaintSculptUV = 5,
+ ePaintInvalid = 6
} PaintMode;
/* overlay invalidation */
@@ -102,16 +102,20 @@ struct Palette *BKE_palette_add(struct Main *bmain, const char *name);
struct PaletteColor *BKE_palette_color_add(struct Palette *palette);
bool BKE_palette_is_empty(const struct Palette *palette);
void BKE_palette_color_remove(struct Palette *palette, struct PaletteColor *color);
-void BKE_palette_cleanup(struct Palette *palette);
+void BKE_palette_clear(struct Palette *palette);
/* paint curves */
struct PaintCurve *BKE_paint_curve_add(struct Main *bmain, const char *name);
void BKE_paint_curve_free(struct PaintCurve *pc);
-void BKE_paint_init(struct Paint *p, const char col[3]);
+void BKE_paint_init(struct Scene *sce, PaintMode mode, const char col[3]);
void BKE_paint_free(struct Paint *p);
void BKE_paint_copy(struct Paint *src, struct Paint *tar);
+void BKE_paint_cavity_curve_preset(struct Paint *p, int preset);
+
+short BKE_paint_object_mode_from_paint_mode(PaintMode mode);
+struct Paint *BKE_paint_get_active_from_paintmode(struct Scene *sce, PaintMode mode);
struct Paint *BKE_paint_get_active(struct Scene *sce);
struct Paint *BKE_paint_get_active_from_context(const struct bContext *C);
PaintMode BKE_paintmode_get_active_from_context(const struct bContext *C);
@@ -120,6 +124,10 @@ void BKE_paint_brush_set(struct Paint *paint, struct Brush *br);
struct Palette *BKE_paint_palette(struct Paint *paint);
void BKE_paint_palette_set(struct Paint *p, struct Palette *palette);
void BKE_paint_curve_set(struct Brush *br, struct PaintCurve *pc);
+void BKE_paint_curve_clamp_endpoint_add_index(struct PaintCurve *pc, const int add_index);
+
+void BKE_paint_data_warning(struct ReportList *reports, bool uvs, bool mat, bool tex, bool stencil);
+bool BKE_paint_proj_mesh_data_check(struct Scene *scene, struct Object *ob, bool *uvs, bool *mat, bool *tex, bool *stencil);
/* testing face select mode
* Texture paint could be removed since selected faces are not used
@@ -129,7 +137,7 @@ bool BKE_paint_select_vert_test(struct Object *ob);
bool BKE_paint_select_elem_test(struct Object *ob);
/* partial visibility */
-bool paint_is_face_hidden(const struct MFace *f, const struct MVert *mvert);
+bool paint_is_face_hidden(const struct MLoopTri *lt, const struct MVert *mvert, const struct MLoop *mloop);
bool paint_is_grid_face_hidden(const unsigned int *grid_hidden,
int gridsize, int x, int y);
bool paint_is_bmesh_face_hidden(struct BMFace *f);
@@ -139,7 +147,10 @@ float paint_grid_paint_mask(const struct GridPaintMask *gpm, unsigned level,
unsigned x, unsigned y);
/* stroke related */
-void paint_calculate_rake_rotation(struct UnifiedPaintSettings *ups, const float mouse_pos[2]);
+void paint_calculate_rake_rotation(struct UnifiedPaintSettings *ups, struct Brush *brush, const float mouse_pos[2]);
+void paint_update_brush_rake_rotation(struct UnifiedPaintSettings *ups, struct Brush *brush, float rotation);
+
+void BKE_paint_stroke_get_average(struct Scene *scene, struct Object *ob, float stroke[3]);
/* Session data (mode-specific) */
@@ -150,7 +161,6 @@ typedef struct SculptSession {
struct MPoly *mpoly;
struct MLoop *mloop;
int totvert, totpoly;
- float (*face_normals)[3];
struct KeyBlock *kb;
float *vmask;
@@ -187,17 +197,10 @@ typedef struct SculptSession {
struct SculptStroke *stroke;
struct StrokeCache *cache;
-
- /* last paint/sculpt stroke location */
- bool last_stroke_valid;
- float last_stroke[3];
-
- float average_stroke_accum[3];
- int average_stroke_counter;
} SculptSession;
-void BKE_free_sculptsession(struct Object *ob);
-void BKE_free_sculptsession_deformMats(struct SculptSession *ss);
+void BKE_sculptsession_free(struct Object *ob);
+void BKE_sculptsession_free_deformMats(struct SculptSession *ss);
void BKE_sculptsession_bm_to_me(struct Object *ob, bool reorder);
void BKE_sculptsession_bm_to_me_for_render(struct Object *object);
void BKE_sculpt_update_mesh_elements(struct Scene *scene, struct Sculpt *sd, struct Object *ob,