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-11-26 02:37:56 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-11-27 02:18:41 +0300
commit64b58888fba96d189cda68918fbf8ac2c0a543b6 (patch)
treed6d098f14ce3e7368e18fe974588b6aa23557493 /source/blender/editors/sculpt_paint/sculpt_intern.h
parent26eb8d6aa0c8fcf59d427390f57765c61fde2c92 (diff)
Sculpt: Refactor transform code to allow incremental updates
This adds support for incremental updates in the sculpt transform code. Now tools can define if they need the displacement applied for the original coordinates or incrementally. This is needed for features like elastic transform or cloth deformation target in the transform tool. No functional changes. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9547
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_intern.h')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_intern.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index c5db078617f..99ee22328ea 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -1015,6 +1015,14 @@ typedef enum SculptFilterOrientation {
SCULPT_FILTER_ORIENTATION_VIEW = 2,
} SculptFilterOrientation;
+/* Defines how transform tools are going to apply its displacement. */
+typedef enum SculptTransformDisplacementMode {
+ /* Displaces the elements from their original coordinates. */
+ SCULPT_TRANSFORM_DISPLACEMENT_ORIGINAL = 0,
+ /* Displaces the elements incrementally from their previous position. */
+ SCULPT_TRANSFORM_DISPLACEMENT_INCREMENTAL = 1,
+} SculptTransformDisplacementMode;
+
void SCULPT_filter_to_orientation_space(float r_v[3], struct FilterCache *filter_cache);
void SCULPT_filter_to_object_space(float r_v[3], struct FilterCache *filter_cache);
void SCULPT_filter_zero_disabled_axis_components(float r_v[3], struct FilterCache *filter_cache);
@@ -1072,6 +1080,9 @@ typedef struct FilterCache {
int active_face_set;
+ /* Transform. */
+ SculptTransformDisplacementMode transform_displacement_mode;
+
/* Auto-masking. */
AutomaskingCache *automasking;
} FilterCache;