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-08-17 19:47:00 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-08-18 16:19:54 +0300
commit89a374cd9640ddaec12d6216ddb910592fe42950 (patch)
tree32499fa475a1ea78f9238b09bc19f59ce9bcb32a /source/blender/editors/sculpt_paint/sculpt_intern.h
parent017941057f8a36925de4d3d7ce6fd16338846bf1 (diff)
Sculpt: Sculpt Filter Orientation Options
Previously, the XYZ deform axis of the Mesh Filter were limited to object space (which is the default for sculpt mode). Now it is possible to limit the XYZ displacement in Local, Global or View space. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8582
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_intern.h')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_intern.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index 14928ba933a..65006031bb3 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -337,7 +337,7 @@ float *SCULPT_boundary_automasking_init(Object *ob,
float *automask_factor);
/* Filters. */
-void SCULPT_filter_cache_init(Object *ob, Sculpt *sd, const int undo_type);
+void SCULPT_filter_cache_init(struct bContext *C, Object *ob, Sculpt *sd, const int undo_type);
void SCULPT_filter_cache_free(SculptSession *ss);
void SCULPT_mask_filter_smooth_apply(
@@ -944,6 +944,16 @@ typedef struct StrokeCache {
} StrokeCache;
+/* Sculpt Filters */
+typedef enum SculptFilterOrientation {
+ SCULPT_FILTER_ORIENTATION_LOCAL = 0,
+ SCULPT_FILTER_ORIENTATION_WORLD = 1,
+ SCULPT_FILTER_ORIENTATION_VIEW = 2,
+} SculptFilterOrientation;
+
+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);
+
typedef struct FilterCache {
bool enabled_axis[3];
bool enabled_force_axis[3];
@@ -965,6 +975,13 @@ typedef struct FilterCache {
float *sharpen_factor;
float (*sharpen_detail_directions)[3];
+ /* Filter orientaiton. */
+ SculptFilterOrientation orientation;
+ float obmat[4][4];
+ float obmat_inv[4][4];
+ float viewmat[4][4];
+ float viewmat_inv[4][4];
+
/* unmasked nodes */
PBVHNode **nodes;
int totnode;