Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(469)

Issue 6305103: Weight paint transfer

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 11 months ago by Cyborgmuppet
Modified:
11 years, 11 months ago
Reviewers:
ideasman42, bf-codereview
Base URL:
https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Visibility:
Public.

Description

Weight paint transfer

Patch Set 1 #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+343 lines, -4 lines) Patch
M release/scripts/startup/bl_ui/space_view3d_toolbar.py View 1 chunk +1 line, -0 lines 0 comments Download
M source/blender/editors/object/object_intern.h View 1 chunk +1 line, -0 lines 0 comments Download
M source/blender/editors/object/object_ops.c View 1 chunk +1 line, -0 lines 0 comments Download
M source/blender/editors/object/object_vgroup.c View 6 chunks +340 lines, -4 lines 7 comments Download

Messages

Total messages: 2
Cyborgmuppet
11 years, 11 months ago (2012-06-17 21:13:25 UTC) #1
ideasman42
11 years, 11 months ago (2012-06-17 21:32:15 UTC) #2
http://codereview.appspot.com/6305103/diff/1/source/blender/editors/object/ob...
File source/blender/editors/object/object_vgroup.c (right):

http://codereview.appspot.com/6305103/diff/1/source/blender/editors/object/ob...
source/blender/editors/object/object_vgroup.c:467: if (!me_src->dvert) return 0;
this should give some report/warning I think, not fail silently.

http://codereview.appspot.com/6305103/diff/1/source/blender/editors/object/ob...
source/blender/editors/object/object_vgroup.c:532: dw_src =
defvert_verify_index(dv_array_src[nearest.index], index_src);
this is very bad - this function will add a vertex weight if not found, thereby
modifying the source which should never happen. use defvert_find_index()
instead.

You will need to do something sane when the vgroup is not found - it should not
add any vgroups or act as if all vgroups are 0 weight.

http://codereview.appspot.com/6305103/diff/1/source/blender/editors/object/ob...
source/blender/editors/object/object_vgroup.c:572: /* interpolate weights */
this is wrong, it assumes a quad, which isnt always the case.

http://codereview.appspot.com/6305103/diff/1/source/blender/editors/object/ob...
source/blender/editors/object/object_vgroup.c:578: /* get weights */
you can loop over 3-4 items here, ratrher then inline all 4 calls.
paint_vertex.c has examples of this.

http://codereview.appspot.com/6305103/diff/1/source/blender/editors/object/ob...
source/blender/editors/object/object_vgroup.c:579: weight = tmp_weight[0] *
defvert_verify_index(dv_array_src[mface_src[index_nearest].v1],
index_src)->weight;
use defvert_find_index()

http://codereview.appspot.com/6305103/diff/1/source/blender/editors/object/ob...
source/blender/editors/object/object_vgroup.c:636: dw_src =
defvert_verify_index(dv_array_src[index_nearest_vertex], index_src);
use defvert_find_index()

http://codereview.appspot.com/6305103/diff/1/source/blender/editors/object/ob...
source/blender/editors/object/object_vgroup.c:3093: ot->prop =
RNA_def_enum(ot->srna, "vertex_group_option", vertex_group_option_item, 1,
"Group", "");
adding _option" to the end of all options is a bit strange - perhaps _method or
_mode is better?
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b