[Bf-codereview] Weight Paint (Radish Branch 2011) (issue 5021044)

ideasman42 at gmail.com ideasman42 at gmail.com
Thu Sep 15 14:43:04 CEST 2011


Reply to nazgul's comments.


http://codereview.appspot.com/5021044/diff/1/source/blender/blenkernel/BKE_DerivedMesh.h
File source/blender/blenkernel/BKE_DerivedMesh.h (right):

http://codereview.appspot.com/5021044/diff/1/source/blender/blenkernel/BKE_DerivedMesh.h#newcode226
source/blender/blenkernel/BKE_DerivedMesh.h:226: void
(*drawSelectedVerts)(DerivedMesh *dm);
On 2011/09/15 07:57:10, nazgul wrote:
> Not sure it's really cool change. If you add new callback to
DerivedMesh it
> should be implemented for all types of derived mesh, but I didn't see
changes to
> CCGDM. If this function is intended to work with CDDM only, wouldn't
it better
> to implement it outside of DerivedMesh structure?

Agree, this should use 'foreachMappedVert' with a callback for drawing.

http://codereview.appspot.com/5021044/diff/1/source/blender/editors/object/object_vgroup.c
File source/blender/editors/object/object_vgroup.c (right):

http://codereview.appspot.com/5021044/diff/1/source/blender/editors/object/object_vgroup.c#newcode901
source/blender/editors/object/object_vgroup.c:901: projA =
MEM_callocN(sizeof(float)*3, "projectedA");
On 2011/09/15 07:57:10, nazgul wrote:
> Why don't allocate vectors in stack? It'll be faster and you shouldn't
worry
> about free-ing memory in the end of this function.

I replaced a few of these but evidently missed this one, of course they
shuld be stack memory.

http://codereview.appspot.com/5021044/diff/1/source/blender/editors/object/object_vgroup.c#newcode2337
source/blender/editors/object/object_vgroup.c:2337: Object *ob=
CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
On 2011/09/15 07:57:10, nazgul wrote:
> Isn't it CTX_data_active_object? If it is, i've seen more usages of
> CTX_data_pointer_get_type() to obtain object.

Yep, should be changed.

http://codereview.appspot.com/5021044/diff/1/source/blender/makesrna/intern/rna_object.c
File source/blender/makesrna/intern/rna_object.c (right):

http://codereview.appspot.com/5021044/diff/1/source/blender/makesrna/intern/rna_object.c#newcode224
source/blender/makesrna/intern/rna_object.c:224: void
rna_update_active_object(Main *bmain, Scene *scene, PointerRNA *ptr)
On 2011/09/15 07:57:10, nazgul wrote:
> I've seen this function is used only once in rna_scene. Is it really
so common
> so it should be public?

Its been removed now.

http://codereview.appspot.com/5021044/


More information about the Bf-codereview mailing list