Alexander Gavrilov
c6afa36f47
Fix group flipping when syncing mirror weights
...
Corrects mirror syncing for invert, levels & smooth.
Note that the code changed to process mirroring even if both verts are selected,
since group flipping can mean that is still meaningful.
2016-02-09 00:19:28 +11:00
Campbell Barton
172143d4f8
Cleanup: use doxy comments for deform.c
2016-02-08 22:40:57 +11:00
Alexander Gavrilov
b88b73816a
Weight Paint: 'Sample' now supports multi-paint
...
Since the coloring uses sum or average of the weights of all selected
groups, the weight pick tool should also use that instead of reading
the weight of the single active group that you can't see.
2016-01-21 07:11:56 +11:00
Campbell Barton
1fb512f4a9
Fix T46611: Vertex group locking fails
2015-11-04 03:00:50 +11:00
Bastien Montagne
8172712841
Fix T46508: data_transfer of normals fails in case objects are transformed.
...
The final stage of the process (copying/interpolating new dst cddata from src cddata)
was simply broken in normal case, where we need to convert from source to destination
object space.
This patch is a bit verbose, but I cannot see how to avoid it really.
To think this code is in master since over 6 months and it only gets reported now... :/
2015-10-16 21:56:42 +02:00
Campbell Barton
2e2dc9b9e3
Refactor translation code out of blenfont
...
- Add blentranslation `BLT_*` module.
- moved & split `BLF_translation.h` into (`BLT_translation.h`, `BLT_lang.h`).
- moved `BLF_*_unifont` functions from `blf_translation.c` to new source file `blf_font_i18n.c`.
2015-08-18 07:01:26 +10:00
Campbell Barton
ced9381e20
Simplify defvert_remove_group(), use realloc
...
Patch by @chadf
2015-08-06 16:52:39 +10:00
Campbell Barton
2de497eee0
BKE_deform: assert on invalid args
...
Will phase these out eventually
2015-07-14 08:41:15 +10:00
Campbell Barton
e5e73ccc90
Math Lib: rename fill_*, to copy_*
...
matching convention for fixed length api, eg: copy_v3_fl
2015-05-05 17:08:29 +10:00
Bastien Montagne
1a117ad40c
Fix T44263: Invalid parameters to fill_vn_fl in deform.c.
...
Own fault, thanks a bunch to LazyDodo for finding that - and odd
GCC did not warn about it...
2015-04-05 09:50:16 +02:00
Campbell Barton
8b6e777736
Fix out-of-bounds read BKE_deform_flip_side_name
2015-03-19 18:13:47 +11:00
Campbell Barton
d580c90469
CustomData: const correctness for interp()
2015-02-23 13:54:33 +11:00
Bastien Montagne
fca515838e
Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage).
...
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)'
and 'strcmp(foo, bar) == 0' in several places...
2015-01-26 16:59:24 +01:00
Bastien Montagne
a3bfaa481f
Cleanup: rename BKE's 'object_data_transfer' to 'data_transfer' to avoid same file names with ED_object's one.
2015-01-12 12:05:47 +01:00
Bastien Montagne
ee4453f083
Transfer Data: add main core code and operators.
...
This add code needed to map a CD data layout from source mesh towards destination one,
and code needed to actually transfer data, using BKE's mesh remap generated data.
This allows to transfer most CD layers (vgroups, vcols, uvs...) as well as fake, boolean ones
(like smooth/sharp edges/faces, etc.). Some types are not yet transferable, mainly
shape keys, this is known TODO.
Data transfer can also use some advanced mixing in some cases (mostly, vgroups and vcols).
Notes:
* New transfer operators transfer data from active object towards selected ones.
* Modifier will be committed separately.
* Old weight transfer code (for vgroups) is kept for now, mostly because it is the only
usable one in weightpaint mode (it transfers from selected object to active one,
this is not sensible in Object mode, but needed in WeightPaint one). This will be addressed soon.
Again, heavily reviewed and enhanced by Campbell, thanks!
2015-01-09 19:32:44 +01:00
Campbell Barton
7d040d2a08
Cleanup: use BLI_listbase_*** prefix for count,sort,sort_r
2014-11-16 13:57:58 +01:00
Campbell Barton
1dbadf16a8
Fix for BKE_deform_flip_side_name getting fooled by extra separator characters
...
D740 by ldo with own edits
2014-08-19 16:18:07 +10:00
Campbell Barton
00b29156e0
Defines: replace ELEM3-16 with ELEM(...), that can take varargs
2014-07-20 01:33:40 +10:00
Campbell Barton
617557b08e
Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define
2014-04-01 15:22:28 +11:00
Campbell Barton
b3afbcab8f
ListBase API: add utility api funcs for clearing and checking empty
2014-02-08 06:24:05 +11:00
Campbell Barton
d900f5be55
Code cleanup: use bools where possible
2014-02-03 19:35:44 +11:00
Campbell Barton
8f7f8d679c
Style Cleanup: whitespace
2013-11-17 22:00:57 +11:00
Campbell Barton
e62cdbb474
code cleanup: rename flip_side_name to BKE_deform_flip_side_name
2013-11-17 05:23:05 +11:00
Irie Shinsuke
4be7427346
Weight Paint Tools: Add "Subset" option to "Normalize All"
...
This option is needed when vertex groups are used for both armature
deformation and the other purpose such as influence of mesh modifier.
Thanks to Campbell for code review!
2013-10-10 06:33:23 +00:00
Campbell Barton
684c4cc40d
fix for BKE_deform_split_suffix()
...
- out of bounds read when passing in empty string.
- single character prefix didnt work.
- with no suffix, the string body was truncated.
2013-07-27 18:16:22 +00:00
Campbell Barton
02468b290a
code cleanup: use MEM_mallocN rather then MEM_callocN when the array is
...
overwritten immediately after.
2013-07-19 10:41:16 +00:00
Campbell Barton
70dc1d8cb6
stop adding groups from changing the active group with weight transfer, add BKE_defgroup_new function.
2013-07-04 03:56:18 +00:00
Campbell Barton
37f5945188
style cleanup
2013-06-25 10:44:30 +00:00
Gaia Clary
70fd2320c8
Added polished Vertex Weights Panel (properties sidebar)
2013-06-23 15:37:08 +00:00
Campbell Barton
65dcc6ad4f
use bool arrays rather then char for weight paint lock/select arrays
2013-05-15 15:52:48 +00:00
Bastien Montagne
6926596174
More new data names translation (most cases should be covered now).
...
Also done a few cleanup here and there...
2013-03-25 08:29:06 +00:00
Campbell Barton
8655be437d
code cleanup: use bool where values are true/false, for view3d and related functions.
2013-03-20 23:14:18 +00:00
Campbell Barton
0d5b028d43
patch [ #34103 ] use boolean in path functions and add comments.
...
path_util_1.patch from Lawrence D'Oliveiro (ldo)
2013-03-04 19:27:51 +00:00
Campbell Barton
b00c3b801b
new weight paint draw option to display unweighted vertices with the option to check on the active group or all groups.
...
notes:
- vertices with zero weights are considered the same as vertices outside of a group.
- currently these show black but this can be made a theme color.
- multi-paint overrides this option (noted in description)
2013-02-22 04:09:04 +00:00
Campbell Barton
0ac2f6e7d7
fix for own bug - memory leak when cancelling weight gradient tool
2013-02-11 04:43:49 +00:00
Mitchell Stokes
a4a3ed0018
r53351 removed a NULL check for name in defgroup_name_index(). name can be NULL when deforming verts in the BGE, so I'm adding a NULL check back in.
2013-01-02 22:14:40 +00:00
Campbell Barton
7730ddb3d6
code cleanup:
...
- free_dverts -> BKE_defvert_array_free
- copy_dverts -> BKE_defvert_array_copy
also move the functions from BKE_mesh into BKE_deform
2012-12-28 09:06:48 +00:00
Campbell Barton
1e3f98c000
remove unneeded inline lookups and fix error with wpaint_stroke_test_start returning OPERATOR_PASS_THROUGH rather then a boolean.
2012-12-28 01:36:00 +00:00
Campbell Barton
e09a1bc7cf
minor changes to select similar,
...
- replace ngon_fake_area() with generic call to BM_face_calc_area().
- add defvert_find_shared() utility function.
2012-10-30 11:40:36 +00:00
Campbell Barton
f70d2c65d8
rename api functions...
...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
Campbell Barton
23baf8c9c3
code cleanup: check defgroup_name_index() return value != -1, rather then checking >= 0.
...
also remove unused bmesh decimator code.
2012-10-22 17:19:05 +00:00
Campbell Barton
99fcec3334
fix [ #29431 ] "Normalize All" from Weight Tools don't work correctly
2012-09-05 04:16:09 +00:00
Campbell Barton
a512cac545
code cleanup: move get_selected_defgroups into object_deform.c and make it behave like similar functions, also when drawing vertex weight colors, only call this function when multi-paint is enabled.
2012-09-05 03:45:32 +00:00
Campbell Barton
57b488574a
style cleanup: comma placement
2012-05-23 22:45:39 +00:00
Campbell Barton
9dd981a440
style cleanup: block comments
2012-05-16 23:37:23 +00:00
Campbell Barton
cffaa42d3a
style cleanup: blenkernel
2012-05-12 19:18:02 +00:00
Campbell Barton
60c9addf79
- improve select grouped prefix/suffix from recent patch
...
- added select similar direction (Y axis)
2012-04-30 08:24:44 +00:00
Campbell Barton
daae72e17b
patch [ #30834 ] Quick Hack: Select similar for bones in edit mode
...
from Felix Schlitter (dalai)
made some changes to select length measurement.
2012-04-29 18:23:33 +00:00
Campbell Barton
b340f930ec
style cleanup: changes to brace placement / newlines - for/while/if/switch
2012-04-28 06:31:57 +00:00
Campbell Barton
df29e91a69
code cleanup: header cleanup, remove commented workaround for mingw since its no longer needed.
2012-04-06 04:46:47 +00:00