diff options
author | Joshua Leung <aligorith@gmail.com> | 2015-11-20 14:01:46 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2015-11-20 14:01:46 +0300 |
commit | 019a4ffcbe2f9a7a7d68da48d3b45b492f306ac3 (patch) | |
tree | 7fbb7641298a3407b277f87a5a48343eb9d829f6 /source/blender/editors/transform/transform_conversions.c | |
parent | 3e178d58c02e03f7860f398155a489d83453bfe4 (diff) | |
parent | c4188c2bbabd87e12c7827fb30d42d2a9f61df8e (diff) |
Merge branch 'master' into GPencil_Editing_Stage3
Conflicts:
source/blender/blenloader/intern/versioning_270.c
Diffstat (limited to 'source/blender/editors/transform/transform_conversions.c')
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 44 |
1 files changed, 26 insertions, 18 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index f84e0df8743..cc2804ae320 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -117,6 +117,8 @@ #include "RNA_access.h" +#include "DEG_depsgraph.h" + #include "transform.h" #include "bmesh.h" @@ -845,6 +847,14 @@ static void pose_grab_with_ik_clear(Object *ob) } } } + +#ifdef WITH_LEGACY_DEPSGRAPH + if (!DEG_depsgraph_use_legacy()) +#endif + { + /* TODO(sergey): Consuder doing partial update only. */ + DAG_relations_tag_update(G.main); + } } /* adds the IK to pchan - returns if added */ @@ -995,8 +1005,16 @@ static short pose_grab_with_ik(Object *ob) } /* iTaSC needs clear for new IK constraints */ - if (tot_ik) + if (tot_ik) { BIK_clear_data(ob->pose); +#ifdef WITH_LEGACY_DEPSGRAPH + if (!DEG_depsgraph_use_legacy()) +#endif + { + /* TODO(sergey): Consuder doing partial update only. */ + DAG_relations_tag_update(G.main); + } + } return (tot_ik) ? 1 : 0; } @@ -2229,7 +2247,7 @@ static void VertsToTransData(TransInfo *t, TransData *td, TransDataExtension *tx if ((t->mode == TFM_SHRINKFATTEN) && (em->selectmode & SCE_SELECT_FACE) && BM_elem_flag_test(eve, BM_ELEM_SELECT) && - (BM_vert_normal_update_ex(eve, BM_ELEM_SELECT, _no))) + (BM_vert_calc_normal_ex(eve, BM_ELEM_SELECT, _no))) { no = _no; } @@ -3027,7 +3045,7 @@ static void createTransNlaData(bContext *C, TransInfo *t) /* only side on which mouse is gets transformed */ float xmouse, ymouse; - UI_view2d_region_to_view(&ac.ar->v2d, t->imval[0], t->imval[1], &xmouse, &ymouse); + UI_view2d_region_to_view(&ac.ar->v2d, t->mouse.imval[0], t->mouse.imval[1], &xmouse, &ymouse); t->frame_side = (xmouse > CFRA) ? 'R' : 'L'; } else { @@ -3664,7 +3682,7 @@ static void createTransActionData(bContext *C, TransInfo *t) /* only side on which mouse is gets transformed */ float xmouse, ymouse; - UI_view2d_region_to_view(&ac.ar->v2d, t->imval[0], t->imval[1], &xmouse, &ymouse); + UI_view2d_region_to_view(&ac.ar->v2d, t->mouse.imval[0], t->mouse.imval[1], &xmouse, &ymouse); t->frame_side = (xmouse > CFRA) ? 'R' : 'L'; // XXX use t->frame_side } else { @@ -4063,7 +4081,7 @@ static void createTransGraphEditData(bContext *C, TransInfo *t) /* only side on which mouse is gets transformed */ float xmouse, ymouse; - UI_view2d_region_to_view(v2d, t->imval[0], t->imval[1], &xmouse, &ymouse); + UI_view2d_region_to_view(v2d, t->mouse.imval[0], t->mouse.imval[1], &xmouse, &ymouse); t->frame_side = (xmouse > CFRA) ? 'R' : 'L'; // XXX use t->frame_side } else { @@ -4560,7 +4578,7 @@ void flushTransGraphData(TransInfo *t) /* handle snapping for time values * - we should still be in NLA-mapping timespace * - only apply to keyframes (but never to handles) - * - don't do this when cancelling, or else these changes won't go away + * - don't do this when canceling, or else these changes won't go away */ if ((t->state != TRANS_CANCEL) && (td->flag & TD_NOTIMESNAP) == 0) { switch (sipo->autosnap) { @@ -4590,7 +4608,7 @@ void flushTransGraphData(TransInfo *t) * * NOTE: We also have to apply to td->loc, as that's what the handle-adjustment step below looks * to, otherwise we get "swimming handles" - * NOTE: We don't do this when cancelling transforms, or else these changes don't go away + * NOTE: We don't do this when canceling transforms, or else these changes don't go away */ if ((t->state != TRANS_CANCEL) && (td->flag & TD_NOTIMESNAP) == 0 && ELEM(sipo->autosnap, SACTSNAP_STEP, SACTSNAP_TSTEP)) @@ -5108,7 +5126,7 @@ static void createTransSeqData(bContext *C, TransInfo *t) t->customFree = freeSeqData; - xmouse = (int)UI_view2d_region_to_view_x(v2d, t->imval[0]); + xmouse = (int)UI_view2d_region_to_view_x(v2d, t->mouse.imval[0]); /* which side of the current frame should be allowed */ if (t->mode == TFM_TIME_EXTEND) { @@ -6357,12 +6375,6 @@ void special_aftertrans_update(bContext *C, TransInfo *t) } clear_trans_object_base_flags(t); - - -#if 0 // TRANSFORM_FIX_ME - if (resetslowpar) - reset_slowparents(); -#endif } int special_transform_moving(TransInfo *t) @@ -8092,8 +8104,4 @@ void createTransData(bContext *C, TransInfo *t) } } } - -// TRANSFORM_FIX_ME -// /* temporal...? */ -// t->scene->recalc |= SCE_PRV_CHANGED; /* test for 3d preview */ } |