Revision: 42827 http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42827 Author: mont29 Date: 2011-12-22 16:39:57 +0000 (Thu, 22 Dec 2011) Log Message: ----------- Merged from trunk -r42822:42826.
Revision Links: -------------- http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42822 Modified Paths: -------------- branches/vgroup_modifiers/release/scripts/modules/bpy_extras/io_utils.py branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_header.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c Property Changed: ---------------- branches/vgroup_modifiers/ branches/vgroup_modifiers/source/blender/editors/space_outliner/ Property changes on: branches/vgroup_modifiers ___________________________________________________________________ Modified: svn:mergeinfo - /branches/soc-2011-cucumber:37517 /branches/soc-2011-tomato:42376,42378-42379,42397,42400 /trunk/blender:38694-38739,38741-39198,39200-39651,39653-39988,39990-42821 + /branches/soc-2011-cucumber:37517 /branches/soc-2011-tomato:42376,42378-42379,42397,42400 /trunk/blender:38694-38739,38741-39198,39200-39651,39653-39988,39990-42826 Modified: branches/vgroup_modifiers/release/scripts/modules/bpy_extras/io_utils.py =================================================================== --- branches/vgroup_modifiers/release/scripts/modules/bpy_extras/io_utils.py 2011-12-22 16:37:14 UTC (rev 42826) +++ branches/vgroup_modifiers/release/scripts/modules/bpy_extras/io_utils.py 2011-12-22 16:39:57 UTC (rev 42827) @@ -121,24 +121,24 @@ ((-1.0, 0.0, 0.0), (0.0, 0.0, 1.0), (0.0, 1.0, 0.0)), ((-1.0, 0.0, 0.0), (0.0, 1.0, 0.0), (0.0, 0.0, -1.0)), ((0.0, -1.0, 0.0), (-1.0, 0.0, 0.0), (0.0, 0.0, -1.0)), - ((0.0, -1.0, 0.0), (0.0, 0.0, -1.0), (1.0, 0.0, 0.0)), + ((0.0, 0.0, 1.0), (-1.0, 0.0, 0.0), (0.0, -1.0, 0.0)), + ((0.0, 0.0, -1.0), (-1.0, 0.0, 0.0), (0.0, 1.0, 0.0)), + ((0.0, 1.0, 0.0), (-1.0, 0.0, 0.0), (0.0, 0.0, 1.0)), ((0.0, -1.0, 0.0), (0.0, 0.0, 1.0), (-1.0, 0.0, 0.0)), - ((0.0, -1.0, 0.0), (1.0, 0.0, 0.0), (0.0, 0.0, 1.0)), - ((0.0, 0.0, -1.0), (-1.0, 0.0, 0.0), (0.0, 1.0, 0.0)), ((0.0, 0.0, -1.0), (0.0, -1.0, 0.0), (-1.0, 0.0, 0.0)), + ((0.0, 0.0, 1.0), (0.0, 1.0, 0.0), (-1.0, 0.0, 0.0)), + ((0.0, 1.0, 0.0), (0.0, 0.0, -1.0), (-1.0, 0.0, 0.0)), + ((0.0, -1.0, 0.0), (0.0, 0.0, -1.0), (1.0, 0.0, 0.0)), + ((0.0, 0.0, 1.0), (0.0, -1.0, 0.0), (1.0, 0.0, 0.0)), ((0.0, 0.0, -1.0), (0.0, 1.0, 0.0), (1.0, 0.0, 0.0)), + ((0.0, 1.0, 0.0), (0.0, 0.0, 1.0), (1.0, 0.0, 0.0)), + ((0.0, -1.0, 0.0), (1.0, 0.0, 0.0), (0.0, 0.0, 1.0)), ((0.0, 0.0, -1.0), (1.0, 0.0, 0.0), (0.0, -1.0, 0.0)), - ((0.0, 0.0, 1.0), (-1.0, 0.0, 0.0), (0.0, -1.0, 0.0)), - ((0.0, 0.0, 1.0), (0.0, -1.0, 0.0), (1.0, 0.0, 0.0)), - ((0.0, 0.0, 1.0), (0.0, 1.0, 0.0), (-1.0, 0.0, 0.0)), ((0.0, 0.0, 1.0), (1.0, 0.0, 0.0), (0.0, 1.0, 0.0)), - ((0.0, 1.0, 0.0), (-1.0, 0.0, 0.0), (0.0, 0.0, 1.0)), - ((0.0, 1.0, 0.0), (0.0, 0.0, -1.0), (-1.0, 0.0, 0.0)), - ((0.0, 1.0, 0.0), (0.0, 0.0, 1.0), (1.0, 0.0, 0.0)), ((0.0, 1.0, 0.0), (1.0, 0.0, 0.0), (0.0, 0.0, -1.0)), ((1.0, 0.0, 0.0), (0.0, -1.0, 0.0), (0.0, 0.0, -1.0)), + ((1.0, 0.0, 0.0), (0.0, 0.0, 1.0), (0.0, -1.0, 0.0)), ((1.0, 0.0, 0.0), (0.0, 0.0, -1.0), (0.0, 1.0, 0.0)), - ((1.0, 0.0, 0.0), (0.0, 0.0, 1.0), (0.0, -1.0, 0.0)), ) # store args as a single int Property changes on: branches/vgroup_modifiers/source/blender/editors/space_outliner ___________________________________________________________________ Modified: svn:mergeinfo - /branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987 /branches/soc-2011-tomato/source/blender/editors/space_outliner:42376,42378-42379,42397,42400 /trunk/blender/source/blender/editors/space_outliner:38694-38739,38741-39198,39200-39651,39653-39988,39990-42821 + /branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987 /branches/soc-2011-tomato/source/blender/editors/space_outliner:42376,42378-42379,42397,42400 /trunk/blender/source/blender/editors/space_outliner:38694-38739,38741-39198,39200-39651,39653-39988,39990-42826 Modified: branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_header.c =================================================================== --- branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_header.c 2011-12-22 16:37:14 UTC (rev 42826) +++ branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_header.c 2011-12-22 16:39:57 UTC (rev 42827) @@ -276,7 +276,7 @@ static char *view3d_modeselect_pup(Scene *scene) { Object *ob= OBACT; - static char string[256]; + static char string[512]; const char *title= IFACE_("Mode: %t"); char *str = string; Modified: branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c =================================================================== --- branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c 2011-12-22 16:37:14 UTC (rev 42826) +++ branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c 2011-12-22 16:39:57 UTC (rev 42827) @@ -407,29 +407,37 @@ MEM_freeN(tdw); return dm; } - indices = MEM_mallocN(sizeof(int) * numIdx, "WeightVGProximity Modifier, indices"); - memcpy(indices, tidx, sizeof(int) * numIdx); - org_w = MEM_mallocN(sizeof(float) * numIdx, "WeightVGProximity Modifier, org_w"); + if(numIdx != numVerts) { + indices = MEM_mallocN(sizeof(int) * numIdx, "WeightVGProximity Modifier, indices"); + memcpy(indices, tidx, sizeof(int) * numIdx); + org_w = MEM_mallocN(sizeof(float) * numIdx, "WeightVGProximity Modifier, org_w"); + memcpy(org_w, tw, sizeof(float) * numIdx); + dw = MEM_mallocN(sizeof(MDeformWeight*) * numIdx, "WeightVGProximity Modifier, dw"); + memcpy(dw, tdw, sizeof(MDeformWeight*) * numIdx); + MEM_freeN(tw); + MEM_freeN(tdw); + } + else { + org_w = tw; + dw = tdw; + } new_w = MEM_mallocN(sizeof(float) * numIdx, "WeightVGProximity Modifier, new_w"); - memcpy(org_w, tw, sizeof(float) * numIdx); - dw = MEM_mallocN(sizeof(MDeformWeight*) * numIdx, "WeightVGProximity Modifier, dw"); - memcpy(dw, tdw, sizeof(MDeformWeight*) * numIdx); MEM_freeN(tidx); - MEM_freeN(tw); - MEM_freeN(tdw); /* Get our vertex coordinates. */ - { + v_cos = MEM_mallocN(sizeof(float[3]) * numIdx, "WeightVGProximity Modifier, v_cos"); + if(numIdx != numVerts) { /* XXX In some situations, this code can be up to about 50 times more performant * than simply using getVertCo for each affected vertex... */ float (*tv_cos)[3] = MEM_mallocN(sizeof(float[3]) * numVerts, "WeightVGProximity Modifier, tv_cos"); - v_cos = MEM_mallocN(sizeof(float[3]) * numIdx, "WeightVGProximity Modifier, v_cos"); dm->getVertCos(dm, tv_cos); for (i = 0; i < numIdx; i++) copy_v3_v3(v_cos[i], tv_cos[indices[i]]); MEM_freeN(tv_cos); } + else + dm->getVertCos(dm, v_cos); /* Compute wanted distances. */ if (wmd->proximity_mode == MOD_WVG_PROXIMITY_OBJECT) { @@ -509,7 +517,8 @@ MEM_freeN(org_w); MEM_freeN(new_w); MEM_freeN(dw); - MEM_freeN(indices); + if(indices) + MEM_freeN(indices); MEM_freeN(v_cos); #if DO_PROFILE _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs