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/blenkernel/intern/paint.c
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/blenkernel/intern/paint.c')
-rw-r--r--source/blender/blenkernel/intern/paint.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index 584f1ab1b0c..0c03f1db729 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -1096,6 +1096,14 @@ void BKE_sculptsession_free(Object *ob)
MEM_freeN(ss->preview_vert_index_list);
}
+ if (ss->pose_ik_chain_preview) {
+ for (int i = 0; i < ss->pose_ik_chain_preview->tot_segments; i++) {
+ MEM_SAFE_FREE(ss->pose_ik_chain_preview->segments[i].weights);
+ }
+ MEM_SAFE_FREE(ss->pose_ik_chain_preview->segments);
+ MEM_SAFE_FREE(ss->pose_ik_chain_preview);
+ }
+
BKE_sculptsession_free_vwpaint_data(ob->sculpt);
MEM_freeN(ss);