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:
authorAntony Riakiotakis <kalast@gmail.com>2013-03-13 07:46:22 +0400
committerAntony Riakiotakis <kalast@gmail.com>2013-03-13 07:46:22 +0400
commitacd3bef34e6a6b30df694f931dc0c622ca083f59 (patch)
tree5ed6c71a9d92b3e8a21c44ee69ee59eb39566fff /source/blender/makesdna
parent153b63e0fde21730cd54f16a501c18c793256ae2 (diff)
Texture sampling function refactoring:
ALERT! POSSIBLE BREAKING COMMIT, ESPECIALLY FOR SCULPT! Separate the sculpt sampling function so that it can be reused from other paint systems. This includes updating of the relevant coordinates for anchored and rake style brushes, which are now being updated as part of the stroke system. I left only code for area-style brush texture mapping in sculpt code, since it requires a few data structures not present on other paint systems. This commit makes it almost as easy to support rake on other systems as exposing the python UI for it. Also it makes it totally possible to have texture painting capabilities in vertex paint too :) These commits will follow very soon. Also, even if I did my best to keep the code from breaking, (even fixed a leftover bug from coordinate changes) this is a big change. Please test!
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_scene_types.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index fa6fd41f568..cd1acb53029 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -888,20 +888,25 @@ typedef struct UnifiedPaintSettings {
/* rake rotation */
/* record movement of mouse so that rake can start at an intuitive angle */
- float last_x, last_y;
- float last_angle;
+ float last_rake[2];
+ int pad;
- float special_rotation;
+ float brush_rotation;
// all this below is used to communicate with the cursor drawing routine
int draw_anchored;
int anchored_size;
- float anchored_location[3];
float anchored_initial_mouse[2];
/* drawing pressure */
int draw_pressure;
float pressure_value;
+
+ /* position of mouse, used to sample the texture */
+ float tex_mouse[2];
+ /* radius of brush, premultiplied with pressure.
+ * In case of anchored brushes contains that radius */
+ float pixel_radius;
} UnifiedPaintSettings;
typedef enum {