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>2019-09-27 19:03:18 +0300
committerPablo Dobarro <pablodp606@gmail.com>2019-09-27 19:35:42 +0300
commit6a74b7c14b393c769f85e78360ec0e74198199cf (patch)
tree9e5eed6ce58313371848198b108200b798b450f7 /source/blender/editors/sculpt_paint/sculpt_intern.h
parent7ae549448eabe633091a0c94257dc6090eda0d64 (diff)
Sculpt: Pose brush origin offset
With the previous behavior, it was impossible to manipulate areas with a lot of complex shapes like fingers, as the pose origin was calculated only with the topology inside the radius. With pose offset, the previous method is used to calculate the direction of the "bone", and an extra offset is added on top of it. This way you can set the pose origin in the correct place in this kind of situations. The pose factor grows to fit the new rotation origin. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D5841
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_intern.h')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_intern.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index ba7c2e601ff..94ceb25c011 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -63,6 +63,7 @@ void sculpt_pose_calc_pose_data(struct Sculpt *sd,
struct SculptSession *ss,
float initial_location[3],
float radius,
+ float pose_offset,
float *r_pose_origin,
float *r_pose_factor);
@@ -198,8 +199,12 @@ typedef struct SculptThreadedTaskData {
float *pose_origin;
float *pose_initial_co;
+ float *pose_factor;
float (*transform_rot)[4], (*transform_trans)[4], (*transform_trans_inv)[4];
+ float tot_pos_avg[3];
+ int tot_pos_count;
+
float max_distance_squared;
float nearest_vertex_search_co[3];
int nearest_vertex_index;