diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_filter_mesh.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_filter_mesh.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c index 1cbf9275a56..c2e90638994 100644 --- a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c +++ b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c @@ -97,6 +97,17 @@ void SCULPT_filter_to_object_space(float r_v[3], struct FilterCache *filter_cach } } +void SCULPT_filter_zero_disabled_axis_components(float r_v[3], struct FilterCache *filter_cache) +{ + SCULPT_filter_to_orientation_space(r_v, filter_cache); + for (int axis = 0; axis < 3; axis++) { + if (!filter_cache->enabled_force_axis[axis]) { + r_v[axis] = 0.0f; + } + } + SCULPT_filter_to_object_space(r_v, filter_cache); +} + static void filter_cache_init_task_cb(void *__restrict userdata, const int i, const TaskParallelTLS *__restrict UNUSED(tls)) |