Commit Graph

13 Commits

Author SHA1 Message Date
84bf3e48c0 style cleanup: use c style comments in C code 2012-07-06 23:56:59 +00:00
46cd2a6a38 Fix #31093: Brush's "Paint curve presets" in Image paint in UV\Image Editor doesn't work if weight paint mode is active
Some operators like curve presets, color sample and some more were using object's
mode to distinguish in which mode user is currently painting. Such approach fails
in cases when there's paint mode active in 3D viewport and Image Editor.

Changed logic here to use some context's state like active space which helps
distinguishing current paint mode more accurate.

Ported all areas which uses paint_get_active() to new paint_get_active_from_context().
There're still some calls to paint_get_active(), but that shouldn't be harmful due
to that places indeed have object's mode as priority when getting paint mode.
2012-06-04 07:29:45 +00:00
2d2d36fe3b code cleanup:
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
2012-05-20 19:49:27 +00:00
028e21adb3 Code cleanups for sculpt-related code.
* Renamed flip_coord as flip_v3_v3
* Added flip_v3 for same input/output
* Moved special case for grab brush's normal into calc_area_normal()
* Renamed 'fixed' texture mode as 'view plane', mirrors
  Brush.sculpt_plane terminology
2012-05-15 04:44:13 +00:00
084fedd03a code cleanup: brush/camera naming 2012-05-05 00:58:22 +00:00
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
c9f677d24d style cleanup: mainly whitespace around operators and indentation - paint/sculpt tools 2012-03-28 03:47:33 +00:00
ab4a2aaf4a style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:38:07 +00:00
a2c182e923 style cleanup - use aligned * prefixed blocks for descriptive comments (was already used a lot and part of proposed style guide). 2012-03-03 16:31:46 +00:00
a2f1cb40b0 Remove a couple more unneeded variables from paint cursor drawing. 2012-01-19 04:13:58 +00:00
d526fc3e20 Remove some unused alpha code in paint_cursor. 2012-01-19 04:00:03 +00:00
2953542c6e Remove stroke parameter from PaintStroke's StrokeGetLocation callback.
Only affected sculpt.
2012-01-19 03:13:01 +00:00
abf7b4d84a Move paint's WM paint cursor code into a new file.
The paint cursor code is fairly muddled still and needs futher cleanup
(commented in the new file.) Over half the paint_stroke code was just
called from the cursor draw function.

There should be no functional changes from this.
2012-01-19 02:06:09 +00:00