diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-11-24 23:40:18 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-11-24 23:40:52 +0300 |
commit | 697acebeb7f61ece1bd17d129d424b3f470438ba (patch) | |
tree | 9c58aa30b2874619c163b9062d7fe689f5d483bc /source/blender/makesdna/DNA_scene_types.h | |
parent | fe3aaac1184f0a09ba7b367380c03dedbfae86b9 (diff) |
Sculpting optimization: Avoid iterating the PBVH for intersection during
the paint cursor drawing when a stroke is underway; this information is
already available from the stroke itself.
Should improve performance when "show brush" is enabled (which is
always, for sane people). Finding an intersection is not always cheap,
especially on heavy meshes.
Cudos to the dyntopo test thread for the report and the sculpt love :)
Diffstat (limited to 'source/blender/makesdna/DNA_scene_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 2d0a4820a51..5e3dc6f648d 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1133,6 +1133,10 @@ typedef struct UnifiedPaintSettings { char draw_anchored; char do_linear_conversion; + /* store last location of stroke or whether the mesh was hit. Valid only while stroke is active */ + float last_location[3]; + int last_hit; + float anchored_initial_mouse[2]; /* radius of brush, premultiplied with pressure. |