diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-10-15 20:13:29 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-10-15 20:15:04 +0300 |
commit | da7ace00d5fb534d8583c0b70497d7819bc7b273 (patch) | |
tree | e203ece2b10f309f1dd078d6bd0c2afc03276a6b /source/blender/blenkernel/BKE_paint.h | |
parent | b9e469664188ac675f3743e8d3938f34c996957e (diff) |
Sculpt: Use cursor depth in trimming gestures
This adds an operator property to use the paint cursor radius and
position for the depth of the trimming shape created by the trimming
tools.
When enabled, the shape is located in the surface point when the gesture
started and it will have the depth of the cursor radius. When the cursor
is not over the mesh, the shape will be positioned at the center of the
depth of the whole object from the viewport camera.
Reviewed By: dbystedt, sergey
Differential Revision: https://developer.blender.org/D9129
Diffstat (limited to 'source/blender/blenkernel/BKE_paint.h')
-rw-r--r-- | source/blender/blenkernel/BKE_paint.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index 614badb59f9..0d3241ba6b8 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -511,6 +511,11 @@ typedef struct SculptSession { float cursor_sampled_normal[3]; float cursor_view_normal[3]; + /* For Sculpt trimming gesture tools, initial raycast data from the position of the mouse when + * the gesture starts (intersection with the surface and if they ray hit the surface or not). */ + float gesture_initial_location[3]; + bool gesture_initial_hit; + /* TODO(jbakker): Replace rv3d adn v3d with ViewContext */ struct RegionView3D *rv3d; struct View3D *v3d; |