Bugfix: editmode mesh transform was doing slow x-axis mirror
computations with the option disabled. Also small memory usage optimization for vertex groups.
This commit is contained in:
parent
6e6a6cdf55
commit
d5c1042ed8
@ -97,11 +97,16 @@ static void layerCopy_mdeformvert(const void *source, void *dest,
|
||||
|
||||
for(i = 0; i < count; ++i) {
|
||||
MDeformVert *dvert = (MDeformVert *)((char *)dest + i * size);
|
||||
MDeformWeight *dw = MEM_callocN(dvert->totweight * sizeof(*dw),
|
||||
"layerCopy_mdeformvert dw");
|
||||
|
||||
memcpy(dw, dvert->dw, dvert->totweight * sizeof(*dw));
|
||||
dvert->dw = dw;
|
||||
if(dvert->totweight) {
|
||||
MDeformWeight *dw = MEM_callocN(dvert->totweight * sizeof(*dw),
|
||||
"layerCopy_mdeformvert dw");
|
||||
|
||||
memcpy(dw, dvert->dw, dvert->totweight * sizeof(*dw));
|
||||
dvert->dw = dw;
|
||||
}
|
||||
else
|
||||
dvert->dw = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2012,7 +2012,7 @@ static void createTransEditVerts(TransInfo *t)
|
||||
int propmode = t->flag & T_PROP_EDIT;
|
||||
int mirror = 0;
|
||||
|
||||
if ((t->context & CTX_NO_MIRROR) == 0 || (G.scene->toolsettings->editbutflag & B_MESH_X_MIRROR))
|
||||
if ((t->context & CTX_NO_MIRROR) == 0 && (G.scene->toolsettings->editbutflag & B_MESH_X_MIRROR))
|
||||
{
|
||||
mirror = 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user