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/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c28
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c4
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_multiplane_scrape.c8
3 files changed, 9 insertions, 31 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index 6fe1ba0b817..fed3c2f03a4 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -377,17 +377,6 @@ static void PALETTE_OT_extract_from_image(wmOperatorType *ot)
}
/* Sort Palette color by Hue and Saturation. */
-static bool palette_sort_poll(bContext *C)
-{
- Paint *paint = BKE_paint_get_active_from_context(C);
- Palette *palette = paint->palette;
- if (palette) {
- return true;
- }
-
- return false;
-}
-
static int palette_sort_exec(bContext *C, wmOperator *op)
{
const int type = RNA_enum_get(op->ptr, "type");
@@ -477,7 +466,7 @@ static void PALETTE_OT_sort(wmOperatorType *ot)
/* api callbacks */
ot->exec = palette_sort_exec;
- ot->poll = palette_sort_poll;
+ ot->poll = palette_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -522,7 +511,7 @@ static void PALETTE_OT_color_move(wmOperatorType *ot)
/* api callbacks */
ot->exec = palette_color_move_exec;
- ot->poll = palette_sort_poll;
+ ot->poll = palette_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -531,17 +520,6 @@ static void PALETTE_OT_color_move(wmOperatorType *ot)
}
/* Join Palette swatches. */
-static bool palette_join_poll(bContext *C)
-{
- Paint *paint = BKE_paint_get_active_from_context(C);
- Palette *palette = paint->palette;
- if (palette) {
- return true;
- }
-
- return false;
-}
-
static int palette_join_exec(bContext *C, wmOperator *op)
{
Main *bmain = CTX_data_main(C);
@@ -599,7 +577,7 @@ static void PALETTE_OT_join(wmOperatorType *ot)
/* api callbacks */
ot->exec = palette_join_exec;
- ot->poll = palette_join_poll;
+ ot->poll = palette_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index b25cdbe39c1..5a830a90092 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -7030,7 +7030,9 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob, Po
if (cache->first_time ||
!((brush->flag & BRUSH_ANCHORED) || (brush->sculpt_tool == SCULPT_TOOL_SNAKE_HOOK) ||
- (brush->sculpt_tool == SCULPT_TOOL_ROTATE))) {
+ (brush->sculpt_tool == SCULPT_TOOL_ROTATE) ||
+ (brush->sculpt_tool == SCULPT_TOOL_CLOTH &&
+ brush->cloth_deform_type == BRUSH_CLOTH_DEFORM_GRAB))) {
RNA_float_get_array(ptr, "location", cache->true_location);
}
diff --git a/source/blender/editors/sculpt_paint/sculpt_multiplane_scrape.c b/source/blender/editors/sculpt_paint/sculpt_multiplane_scrape.c
index 038d0e5a08c..f2671b66f7f 100644
--- a/source/blender/editors/sculpt_paint/sculpt_multiplane_scrape.c
+++ b/source/blender/editors/sculpt_paint/sculpt_multiplane_scrape.c
@@ -58,7 +58,6 @@
#include <math.h>
#include <stdlib.h>
-
typedef struct MultiplaneScrapeSampleData {
float area_cos[2][3];
float area_nos[2][3];
@@ -223,7 +222,6 @@ static void do_multiplane_scrape_brush_task_cb_ex(void *__restrict userdata,
BKE_pbvh_vertex_iter_end;
}
-
/* Public functions. */
/* Main Brush Function. */
@@ -400,9 +398,9 @@ void SCULPT_do_multiplane_scrape_brush(Sculpt *sd, Object *ob, PBVHNode **nodes,
}
void SCULPT_multiplane_scrape_preview_draw(const uint gpuattr,
- SculptSession *ss,
- const float outline_col[3],
- const float outline_alpha)
+ SculptSession *ss,
+ const float outline_col[3],
+ const float outline_alpha)
{
float local_mat_inv[4][4];
invert_m4_m4(local_mat_inv, ss->cache->stroke_local_mat);