Commit Graph

291 Commits

Author SHA1 Message Date
1091030c11 mask now draws in the image view, misc minor edits. 2012-07-25 13:44:59 +00:00
558721ab59 More spell checking. 2012-07-04 15:04:38 +00:00
5534701e5d style cleanup: use capital camel case names for typedef's 2012-06-10 15:20:10 +00:00
8e01389a4e Fix #31559: second 3D viewport does not update when paiting vertex/weight
Added notification at the end of weight/vertex paint stroke so all opened
viewports would be updated (same was already done for sculpt mode).
2012-06-04 15:13:36 +00:00
20e49e7177 quiet warnings 2012-06-03 10:33:28 +00:00
9547b76c2e This fixes a precision issue in multi-paint so that near zero values do not cause flickering as you paint.
It also changes multi-paint's "zero weight color" to black again--it was unintentionally changed to red some time late last year when an aspect of the colors were changed.
2012-05-31 17:22:52 +00:00
4f90d757c7 add BLI_ghash_pop() which returns the value for a key and removes it at the same time, saves a lookup if you need to check if the item exists before removing. 2012-05-28 19:33:14 +00:00
5b8cbbe3fd code cleanup: fix possible use of uninitialized value and remove dead initializations. 2012-05-23 21:39:39 +00:00
5f95f7d2ad Add input sample averaging to PaintStroke.
Averages input samples to make the brush stroke smoother. Only mouse
location is averaged right now, not pressure/tilt/etc.

The DNA is in struct Paint.num_input_samples, RNA is
Paint.input_samples. In combination with PaintStroke usage this change
applies to sculpt, vpaint, and wpaint.

The range of useful values varies quite a bit depending on input
device; mouse needs higher values to match tablet pen, so set max
samples pretty high (64).

Release note section:
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Sculpting#Input_Stroke_Averaging
2012-05-21 23:32:46 +00:00
3896ad4cbb code cleanup: spelling 2012-05-20 21:23:26 +00:00
ed33320e3f Code cleanup: simplify standard GHash creation.
Added four new functions as shortcuts to creating GHashes that use the
standard ptr/str/int/pair hash and compare functions.

GHash *BLI_ghash_ptr_new(const char *info);
GHash *BLI_ghash_str_new(const char *info);
GHash *BLI_ghash_int_new(const char *info);
GHash *BLI_ghash_pair_new(const char *info);

Replaced almost all occurrences of BLI_ghash_new() with one of the
above functions.
2012-05-16 00:51:36 +00:00
145289ad95 code cleanup: minor improvements to float/vector usage. 2012-05-12 22:13:38 +00:00
a8e8775cb8 Code cleanup: make changes suggested by check_style for sculpt-related files. 2012-05-06 22:12:26 +00:00
53b221960a Last part of fix for [#31157]: Some (actually, 172) operators have no tooltip.
Only remaining undocumented one is IMAGE_OT_record_composite (not sure what it actually does, nor even whether it’s actually working or not...).

Note that I didn’t bother with operators flagged as OPTYPE_INTERNAL!
2012-05-06 15:03:31 +00:00
f3230c7897 Second part of fix for [#31157]: Some (actually, 172) operators have no tooltip.
About 30 undocumented ops remaining...
2012-05-05 17:10:51 +00:00
1dccd4c98a code cleanup: naming - pose/armature/image
also use ..._find_name(..., name) rather then ..._find_named(..., name) --- both were used.
2012-05-05 16:03:57 +00:00
a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
084fedd03a code cleanup: brush/camera naming 2012-05-05 00:58:22 +00:00
90b0be522c Patch [#30965] Cancel Sculpt Stroke w/ ESCAPE
If the RMB has not been released after starting a sculpt stroke, then hitting escape will cancel the stroke in progress and undo any changes to the mesh.

This is a slightly faster work-flow than using undo, is a feature available in other paint programs, and also puts in place the infrastructure to add other keys later that could tweak strokes in different ways.
2012-05-03 04:11:53 +00:00
a0642a2597 Fix wrong unified weight paint value version patch, was doing incorrect version check.
Fix #31209: weight paint sample & fill not using correct brush/unified value.
2012-05-02 16:05:25 +00:00
5369a867a3 fix shared vertex color (used with blur), to work with selection masking. 2012-04-30 21:46:58 +00:00
f7ec94cbc6 Add per-brush weight field.
Patch from Jaggz H, thanks!

[#31096] Weight-painting: Brush-specific weights
http://projects.blender.org/tracker/?func=detail&atid=127&aid=31096&group_id=9

Each brush's weight can now be set individually, can also enable
unified setting (same as size and strength have.)

Added readfile code to the patch: subversion bumped to 1, brushes get
default weight of 0.5, unified weight enabled by default and value
from old vgroup_weight field.
2012-04-29 20:04:25 +00:00
6701933f5c style cleanup 2012-04-21 12:51:47 +00:00
dbc3955253 code cleanup: remove bmesh todo, which infact is working fine. 2012-04-16 10:02:52 +00:00
320aa33e65 rename MPoly vars called mface or mf, to avoid confusion with MFace types. 2012-04-03 23:40:24 +00:00
c9f677d24d style cleanup: mainly whitespace around operators and indentation - paint/sculpt tools 2012-03-28 03:47:33 +00:00
e99a23fc6b style cleanup: operator/whitespace 2012-03-24 11:27:52 +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
4c3bb77012 style cleanup: spaces aroudn operators for operator definitions. 2012-03-22 07:26:09 +00:00
9dd0c4c232 rename define BM_INLINE -> BLI_INLINE to avoid confusion with bmesh defines. 2012-03-20 08:42:26 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
98b784a931 update vertex paint code for last commit, was still using ABGR order. 2012-03-17 21:11:28 +00:00
cae11a98f9 style cleanup 2012-03-11 23:47:41 +00:00
f6ae27daef style cleanup - comment spelling + translate some dutch. 2012-03-04 04:35:12 +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
9d49fa0e63 style cleanup - spelling corrections & update some incorrect comments. 2012-03-03 11:45:08 +00:00
7bbf4b7831 style cleanup
- spelling - turns out we had tessellation spelt wrong all over.
- use \directive for doxy (not @directive)
- remove BLI_sparsemap.h - was from bmesh merge IIRC but entire file commented and not used.
2012-03-02 16:05:54 +00:00
a71128828f Bugfix: vertexpaint blur brush was broken.
Just a minor loop iteration bug.
2012-02-29 00:14:58 +00:00
bc02db27c5 * Fixed some typos in the code, patch [#30247] by Vladimir Rutsky (rutsky). Thanks! 2012-02-23 09:23:29 +00:00
59d45d0ea6 * remove the MFace parts of join (we only need polygon data)
* other minor cleanups
2012-02-12 19:11:09 +00:00
b228685e92 fix [#30101] Vertex colors disappear after leaving edit mode
this commit makes vertex paint check if it needs to rebuild the modifier stack when painting.
- when painting with no modifiers, do partial updates from polys to tessfaces while painting, skip re-tesselation.
- when painting onto a modified mesh, dont bother adjusting tessface colors - since the modifier stack will do this anyway.

both cases should be faster then before.
2012-02-08 11:52:44 +00:00
2277241ea6 fix for vpaint fill not working, check loopcol rather then tessface color. 2012-02-05 04:40:45 +00:00
c7e8af13d4 remove cellalloc, from my tests jemalloc beats cellalloc, so we better just use a better malloc replacement.
See Details:

http://wiki.blender.org/index.php/User:Ideasman42/BMeshBranchReview#Update_43694
2012-01-25 20:18:12 +00:00
4966982a5a svn merge ^/trunk/blender -r43564:43609 2012-01-22 18:04:35 +00:00
af9ac97b2e fix for own error in recent paint refactor, subtract mode was broken. 2012-01-22 04:30:11 +00:00
a58ee6a6d8 fix errors in bmesh vertex paint
- was swapping matrix incorrectly, would fail when the object had any transform
- wasn't calling mesh_update_customdata_pointers() when adding MCol's in some cases
- was calling do_shared_vertexcol() twice when it didnt need to (blur painting only)
2012-01-18 08:43:27 +00:00
03b43a0db0 move bmesh painting code into its own function, trunk has vpaint_paint_face(), this adds vpaint_paint_poly() which does the same thing. 2012-01-15 10:48:39 +00:00
caca9cc8f6 svn merge ^/trunk/blender -r43381:43392 2012-01-15 10:33:41 +00:00
522a3b43ae modify the weight paint and vcol functions not to modify the color in place and instead return a new color.
also fix for error in last commit, the brushes alpha wasnt set for weight paint info struct.
2012-01-15 07:46:59 +00:00
52decb3c31 vertex/weight paint
- store brush_alpha() result so it doesnt need to be called for each vertex when paitning.
- use _pressure suffix rather then _final to show the pressure has been applied.
- weight paint was needlessly calculateing the test weight when multipaint was enabled.
2012-01-15 07:15:15 +00:00