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:
authorCampbell Barton <ideasman42@gmail.com>2020-01-08 04:59:48 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-01-08 04:59:48 +0300
commit0e37045f32f35ff2264838fbaadd48ca7f2a0117 (patch)
tree304a21791fc5c7586043efd1837b57e7fb01b71e /source/blender/editors/sculpt_paint
parent55daa0d44483e165d5ce10d161489d136fa0c4e4 (diff)
Cleanup: use paint/sculpt prefix in BKE_paint.h
PoseIKChain for example reads as if this is related to armature/pose when it's a sculpting feature.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c12
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c42
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_intern.h18
3 files changed, 37 insertions, 35 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 9bc587de6da..19b4b9f569c 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -252,14 +252,14 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima
TexSnapshot *target;
MTex *mtex = (primary) ? &br->mtex : &br->mask_mtex;
- eOverlayControlFlags overlay_flags = BKE_paint_get_overlay_flags();
+ ePaintOverlayControlFlags overlay_flags = BKE_paint_get_overlay_flags();
GLubyte *buffer = NULL;
int size;
bool refresh;
- eOverlayControlFlags invalid = ((primary) ?
- (overlay_flags & PAINT_OVERLAY_INVALID_TEXTURE_PRIMARY) :
- (overlay_flags & PAINT_OVERLAY_INVALID_TEXTURE_SECONDARY));
+ ePaintOverlayControlFlags invalid =
+ ((primary) ? (overlay_flags & PAINT_OVERLAY_INVALID_TEXTURE_PRIMARY) :
+ (overlay_flags & PAINT_OVERLAY_INVALID_TEXTURE_SECONDARY));
target = (primary) ? &primary_snap : &secondary_snap;
refresh = !target->overlay_texture || (invalid != 0) ||
@@ -422,7 +422,7 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom)
{
bool init;
- eOverlayControlFlags overlay_flags = BKE_paint_get_overlay_flags();
+ ePaintOverlayControlFlags overlay_flags = BKE_paint_get_overlay_flags();
GLubyte *buffer = NULL;
int size;
@@ -836,7 +836,7 @@ static bool paint_draw_alpha_overlay(UnifiedPaintSettings *ups,
bool alpha_overlay_active = false;
- eOverlayControlFlags flags = BKE_paint_get_overlay_flags();
+ ePaintOverlayControlFlags flags = BKE_paint_get_overlay_flags();
gpuPushAttr(GPU_DEPTH_BUFFER_BIT | GPU_BLEND_BIT);
/* Translate to region. */
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index c350cb3b48a..a9334edd39b 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -3535,15 +3535,15 @@ static void do_elastic_deform_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, in
static ePaintSymmetryAreas sculpt_get_vertex_symm_area(const float co[3])
{
- ePaintSymmetryAreas symm_area = AREA_SYMM_DEFAULT;
+ ePaintSymmetryAreas symm_area = PAINT_SYMM_AREA_DEFAULT;
if (co[0] < 0.0f) {
- symm_area |= AREA_SYMM_X;
+ symm_area |= PAINT_SYMM_AREA_X;
}
if (co[1] < 0.0f) {
- symm_area |= AREA_SYMM_Y;
+ symm_area |= PAINT_SYMM_AREA_Y;
}
if (co[2] < 0.0f) {
- symm_area |= AREA_SYMM_Z;
+ symm_area |= PAINT_SYMM_AREA_Z;
}
return symm_area;
}
@@ -3584,9 +3584,9 @@ static void sculpt_flip_quat_by_symm_area(float quat[3],
}
}
-static void pose_solve_ik_chain(PoseIKChain *ik_chain, const float initial_target[3])
+static void pose_solve_ik_chain(SculptPoseIKChain *ik_chain, const float initial_target[3])
{
- PoseIKChainSegment *segments = ik_chain->segments;
+ SculptPoseIKChainSegment *segments = ik_chain->segments;
int tot_segments = ik_chain->tot_segments;
float target[3];
@@ -3633,9 +3633,11 @@ static void pose_solve_ik_chain(PoseIKChain *ik_chain, const float initial_targe
}
}
-static void pose_solve_roll_chain(PoseIKChain *ik_chain, const Brush *brush, const float roll)
+static void pose_solve_roll_chain(SculptPoseIKChain *ik_chain,
+ const Brush *brush,
+ const float roll)
{
- PoseIKChainSegment *segments = ik_chain->segments;
+ SculptPoseIKChainSegment *segments = ik_chain->segments;
int tot_segments = ik_chain->tot_segments;
for (int i = 0; i < tot_segments; i++) {
@@ -3663,8 +3665,8 @@ static void do_pose_brush_task_cb_ex(void *__restrict userdata,
{
SculptThreadedTaskData *data = userdata;
SculptSession *ss = data->ob->sculpt;
- PoseIKChain *ik_chain = ss->cache->pose_ik_chain;
- PoseIKChainSegment *segments = ik_chain->segments;
+ SculptPoseIKChain *ik_chain = ss->cache->pose_ik_chain;
+ SculptPoseIKChainSegment *segments = ik_chain->segments;
PBVHVertexIter vd;
float disp[3], new_co[3];
@@ -3729,7 +3731,7 @@ static void do_pose_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
return;
}
- PoseIKChain *ik_chain = ss->cache->pose_ik_chain;
+ SculptPoseIKChain *ik_chain = ss->cache->pose_ik_chain;
/* Solve the positions and rotations of the IK chain. */
if (ss->cache->invert) {
@@ -4067,7 +4069,7 @@ static void pose_brush_init_task_cb_ex(void *__restrict userdata,
BKE_pbvh_vertex_iter_end;
}
-void sculpt_pose_ik_chain_free(PoseIKChain *ik_chain)
+void sculpt_pose_ik_chain_free(SculptPoseIKChain *ik_chain)
{
for (int i = 0; i < ik_chain->tot_segments; i++) {
MEM_SAFE_FREE(ik_chain->segments[i].weights);
@@ -4076,12 +4078,12 @@ void sculpt_pose_ik_chain_free(PoseIKChain *ik_chain)
MEM_SAFE_FREE(ik_chain);
}
-PoseIKChain *sculpt_pose_ik_chain_init(Sculpt *sd,
- Object *ob,
- SculptSession *ss,
- Brush *br,
- const float initial_location[3],
- const float radius)
+SculptPoseIKChain *sculpt_pose_ik_chain_init(Sculpt *sd,
+ Object *ob,
+ SculptSession *ss,
+ Brush *br,
+ const float initial_location[3],
+ const float radius)
{
float chain_end[3];
@@ -4105,9 +4107,9 @@ PoseIKChain *sculpt_pose_ik_chain_init(Sculpt *sd,
pose_factor_grow[nearest_vertex_index] = 1.0f;
/* Init the IK chain with empty weights. */
- PoseIKChain *ik_chain = MEM_callocN(sizeof(PoseIKChain), "Pose IK Chain");
+ SculptPoseIKChain *ik_chain = MEM_callocN(sizeof(SculptPoseIKChain), "Pose IK Chain");
ik_chain->tot_segments = br->pose_ik_segments;
- ik_chain->segments = MEM_callocN(ik_chain->tot_segments * sizeof(PoseIKChainSegment),
+ ik_chain->segments = MEM_callocN(ik_chain->tot_segments * sizeof(SculptPoseIKChainSegment),
"Pose IK Chain Segments");
for (int i = 0; i < br->pose_ik_segments; i++) {
ik_chain->segments[i].weights = MEM_callocN(totvert * sizeof(float), "Pose IK weights");
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index e8a6369c3b5..5d92b202997 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -37,7 +37,7 @@ struct KeyBlock;
struct Object;
struct SculptUndoNode;
struct bContext;
-struct PoseIKChainSegment;
+struct SculptPoseIKChainSegment;
bool sculpt_mode_poll(struct bContext *C);
bool sculpt_mode_poll_view3d(struct bContext *C);
@@ -75,14 +75,14 @@ void sculpt_pose_calc_pose_data(struct Sculpt *sd,
float *r_pose_origin,
float *r_pose_factor);
-struct PoseIKChain *sculpt_pose_ik_chain_init(struct Sculpt *sd,
- struct Object *ob,
- struct SculptSession *ss,
- struct Brush *br,
- const float initial_location[3],
- const float radius);
+struct SculptPoseIKChain *sculpt_pose_ik_chain_init(struct Sculpt *sd,
+ struct Object *ob,
+ struct SculptSession *ss,
+ struct Brush *br,
+ const float initial_location[3],
+ const float radius);
-void sculpt_pose_ik_chain_free(struct PoseIKChain *ik_chain);
+void sculpt_pose_ik_chain_free(struct SculptPoseIKChain *ik_chain);
/* Sculpt PBVH abstraction API */
const float *sculpt_vertex_co_get(struct SculptSession *ss, int index);
@@ -388,7 +388,7 @@ typedef struct StrokeCache {
float anchored_location[3];
/* Pose brush */
- struct PoseIKChain *pose_ik_chain;
+ struct SculptPoseIKChain *pose_ik_chain;
float vertex_rotation; /* amount to rotate the vertices when using rotate brush */
struct Dial *dial;