svn merge ^/trunk/blender -r50156:50159

This commit is contained in:
Campbell Barton
2012-08-23 15:16:57 +00:00
3 changed files with 38 additions and 4 deletions

View File

@@ -80,7 +80,14 @@ BMVert *BM_vert_create(BMesh *bm, const float co[3], const BMVert *example)
CustomData_bmesh_set_default(&bm->vdata, &v->head.data);
if (example) {
int *keyi;
BM_elem_attrs_copy(bm, bm, example, v);
/* exception: don't copy the original shapekey index */
keyi = CustomData_bmesh_get(&bm->vdata, v->head.data, CD_SHAPE_KEYINDEX);
if(keyi)
*keyi = ORIGINDEX_NONE;
}
BM_CHECK_ELEMENT(v);

View File

@@ -793,6 +793,15 @@ void BM_mesh_bm_to_me(BMesh *bm, Mesh *me, int dotess)
if (keyi && *keyi != ORIGINDEX_NONE) {
sub_v3_v3v3(ofs[i], mvert->co, fp[*keyi]);
}
else {
/* if there are new vertices in the mesh, we can't propagate the offset
* because it will only work for the existing vertices and not the new
* ones, creating a mess when doing e.g. subdivide + translate */
MEM_freeN(ofs);
ofs = NULL;
break;
}
mvert++;
}
}

View File

@@ -672,13 +672,22 @@ static void view_zoomstep_exit(wmOperator *op)
/* this operator only needs this single callback, where it calls the view_zoom_*() methods */
static int view_zoomin_exec(bContext *C, wmOperator *op)
{
ScrArea *sa = CTX_wm_area(C);
short do_zoom_x = TRUE;
short do_zoom_y = TRUE;
/* check that there's an active region, as View2D data resides there */
if (!view_zoom_poll(C))
return OPERATOR_PASS_THROUGH;
/* default not to zoom the sequencer vertically */
if (sa && sa->spacetype == SPACE_SEQ) {
do_zoom_y = FALSE;
}
/* set RNA-Props - zooming in by uniform factor */
RNA_float_set(op->ptr, "zoomfacx", 0.0375f);
RNA_float_set(op->ptr, "zoomfacy", 0.0375f);
RNA_float_set(op->ptr, "zoomfacx", do_zoom_x ? 0.0375f : 0.0f);
RNA_float_set(op->ptr, "zoomfacy", do_zoom_y ? 0.0375f : 0.0f);
/* apply movement, then we're done */
view_zoomstep_apply(C, op);
@@ -729,13 +738,22 @@ static void VIEW2D_OT_zoom_in(wmOperatorType *ot)
/* this operator only needs this single callback, where it callsthe view_zoom_*() methods */
static int view_zoomout_exec(bContext *C, wmOperator *op)
{
ScrArea *sa = CTX_wm_area(C);
short do_zoom_x = TRUE;
short do_zoom_y = TRUE;
/* check that there's an active region, as View2D data resides there */
if (!view_zoom_poll(C))
return OPERATOR_PASS_THROUGH;
/* default not to zoom the sequencer vertically */
if (sa && sa->spacetype == SPACE_SEQ) {
do_zoom_y = FALSE;
}
/* set RNA-Props - zooming in by uniform factor */
RNA_float_set(op->ptr, "zoomfacx", -0.0375f);
RNA_float_set(op->ptr, "zoomfacy", -0.0375f);
RNA_float_set(op->ptr, "zoomfacx", do_zoom_x ? -0.0375f : 0.0f);
RNA_float_set(op->ptr, "zoomfacy", do_zoom_y ? -0.0375f : 0.0f);
/* apply movement, then we're done */
view_zoomstep_apply(C, op);