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:
authorPablo Dobarro <pablodp606@gmail.com>2020-01-07 18:46:56 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-01-07 18:57:54 +0300
commitfdf89acc8634ecba4dfe66e20ff595c0c24ffdee (patch)
tree0c0f6398468259cca6e0f08ee5fca4079e3aca53 /source/blender/editors/sculpt_paint/sculpt_intern.h
parentbd766f8f0608d04c473544274b8dd9dcc00ec39a (diff)
Sculpt: Pose Brush with Inverse Kinematics
This commits introduces the pose_ik_segments brush property in the Pose Brush. When increasing the IK segments count, the brush generates more segments and weights associations following the topology of the mesh. When moving the brush, these segments are transformed using an IK solver and they are used to deform the mesh. When pressing Ctrl, the brush controls the segments' roll rotation instead of using the IK solver. The brush falloff controls how much rotation is propagated from the first to the last segment in the chain. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6389
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_intern.h')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_intern.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index e9ad31d6f25..e8a6369c3b5 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -37,6 +37,7 @@ struct KeyBlock;
struct Object;
struct SculptUndoNode;
struct bContext;
+struct PoseIKChainSegment;
bool sculpt_mode_poll(struct bContext *C);
bool sculpt_mode_poll_view3d(struct bContext *C);
@@ -74,6 +75,15 @@ 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);
+
+void sculpt_pose_ik_chain_free(struct PoseIKChain *ik_chain);
+
/* Sculpt PBVH abstraction API */
const float *sculpt_vertex_co_get(struct SculptSession *ss, int index);
@@ -201,10 +211,9 @@ typedef struct SculptThreadedTaskData {
float *prev_mask;
- float *pose_origin;
- float *pose_initial_co;
float *pose_factor;
- float (*transform_rot)[4], (*transform_trans)[4], (*transform_trans_inv)[4];
+ float *pose_initial_co;
+ int pose_chain_segment;
float multiplane_scrape_angle;
float multiplane_scrape_planes[2][4];
@@ -250,7 +259,7 @@ typedef struct {
struct Sculpt *sd;
struct SculptSession *ss;
float radius_squared;
- float *center;
+ const float *center;
bool original;
bool ignore_fully_masked;
} SculptSearchSphereData;
@@ -379,9 +388,7 @@ typedef struct StrokeCache {
float anchored_location[3];
/* Pose brush */
- float *pose_factor;
- float pose_initial_co[3];
- float pose_origin[3];
+ struct PoseIKChain *pose_ik_chain;
float vertex_rotation; /* amount to rotate the vertices when using rotate brush */
struct Dial *dial;