diff options
Diffstat (limited to 'source/blender/editors/transform')
4 files changed, 34 insertions, 31 deletions
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index 0e0d452a9e6..d8e750acb88 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -95,7 +95,8 @@ typedef struct TransSnap { short modePoint; short modeSelect; short align; - short project; + char project; + char project_self; short peel; short status; float snapPoint[3]; /* snapping from this point */ diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 68aa27a7b62..669c3195dfd 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -3725,27 +3725,8 @@ void flushTransGraphData(TransInfo *t) * seq->depth must be set before running this function so we know if the strips * are root level or not */ -#define XXX_DURIAN_ANIM_TX_HACK static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count, int *flag) { - -#ifdef XXX_DURIAN_ANIM_TX_HACK - /* hack */ - if((seq->flag & SELECT)==0 && seq->type & SEQ_EFFECT) { - Sequence *seq_t[3]; - int i; - - seq_t[0]= seq->seq1; - seq_t[1]= seq->seq2; - seq_t[2]= seq->seq3; - - for(i=0; i<3; i++) { - if (seq_t[i] && ((seq_t[i])->flag & SELECT) && !(seq_t[i]->flag & SEQ_LOCK) && !(seq_t[i]->flag & (SEQ_LEFTSEL|SEQ_RIGHTSEL))) - seq->flag |= SELECT; - } - } -#endif - /* for extend we need to do some tricks */ if (t->mode == TFM_TIME_EXTEND) { @@ -4105,6 +4086,7 @@ static void freeSeqData(TransInfo *t) static void createTransSeqData(bContext *C, TransInfo *t) { +#define XXX_DURIAN_ANIM_TX_HACK View2D *v2d= UI_view2d_fromcontext(C); Scene *scene= t->scene; @@ -4135,6 +4117,24 @@ static void createTransSeqData(bContext *C, TransInfo *t) t->frame_side = 'B'; } +#ifdef XXX_DURIAN_ANIM_TX_HACK + { + Sequence *seq; + for(seq= ed->seqbasep->first; seq; seq= seq->next) { + /* hack */ + if((seq->flag & SELECT)==0 && seq->type & SEQ_EFFECT) { + Sequence *seq_user; + int i; + for(i=0; i<3; i++) { + seq_user= *((&seq->seq1) + i); + if (seq_user && (seq_user->flag & SELECT) && !(seq_user->flag & SEQ_LOCK) && !(seq_user->flag & (SEQ_LEFTSEL|SEQ_RIGHTSEL))) { + seq->flag |= SELECT; + } + } + } + } + } +#endif count = SeqTransCount(t, ed->seqbasep, 0); @@ -4154,6 +4154,8 @@ static void createTransSeqData(bContext *C, TransInfo *t) /* loop 2: build transdata array */ SeqToTransData_Recursive(t, ed->seqbasep, td, td2d, tdsq); + +#undef XXX_DURIAN_ANIM_TX_HACK } @@ -5077,10 +5079,6 @@ void special_aftertrans_update(bContext *C, TransInfo *t) #if 0 // TRANSFORM_FIX_ME if(resetslowpar) reset_slowparents(); - - /* note; should actually only be done for all objects when a lamp is moved... (ton) */ - if(t->spacetype==SPACE_VIEW3D && G.vd->drawtype == OB_SHADED) - reshadeall_displist(); #endif } diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 8699eb1cc2d..20a26d8c58d 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -675,8 +675,9 @@ void recalcData(TransInfo *t) EditMesh *em = ((Mesh*)t->obedit->data)->edit_mesh; /* mirror modifier clipping? */ if(t->state != TRANS_CANCEL) { - clipMirrorModifier(t, t->obedit); + /* apply clipping after so we never project past the clip plane [#25423] */ applyProject(t); + clipMirrorModifier(t, t->obedit); } if((t->options & CTX_NO_MIRROR) == 0 && (t->flag & T_MIRROR)) editmesh_apply_to_mirror(t); @@ -839,9 +840,6 @@ void recalcData(TransInfo *t) DAG_id_tag_update(&ob->id, OB_RECALC_OB); } } - - if(((View3D*)t->view)->drawtype == OB_SHADED) - reshadeall_displist(t->scene); } } diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index e3e5e012920..d9d9b0f9102 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -385,14 +385,14 @@ static void initSnappingMode(TransInfo *t) if (t->tsnap.applySnap != NULL && // A snapping function actually exist (obedit != NULL && ELEM4(obedit->type, OB_MESH, OB_ARMATURE, OB_CURVE, OB_LATTICE)) ) // Temporary limited to edit mode meshes, armature, curves { - /* editmode meshes now supported */ - if ((obedit->type != OB_MESH) && ((t->flag & T_PROP_EDIT) || t->tsnap.project)) /* also exclude edit for project, for now */ + /* Exclude editmesh if using proportional edit */ + if ((obedit->type == OB_MESH) && (t->flag & T_PROP_EDIT)) { t->tsnap.modeSelect = SNAP_NOT_OBEDIT; } else { - t->tsnap.modeSelect = SNAP_ALL; + t->tsnap.modeSelect = t->tsnap.project_self ? SNAP_ALL : SNAP_NOT_OBEDIT; } } /* Particles edit mode*/ @@ -457,6 +457,11 @@ void initSnapping(TransInfo *t, wmOperator *op) { t->tsnap.project = RNA_boolean_get(op->ptr, "use_snap_project"); } + + if (RNA_struct_find_property(op->ptr, "use_snap_project_self")) + { + t->tsnap.project = RNA_boolean_get(op->ptr, "use_snap_project_self"); + } } } /* use scene defaults only when transform is modal */ @@ -468,6 +473,7 @@ void initSnapping(TransInfo *t, wmOperator *op) t->tsnap.align = ((t->settings->snap_flag & SCE_SNAP_ROTATE) == SCE_SNAP_ROTATE); t->tsnap.project = ((t->settings->snap_flag & SCE_SNAP_PROJECT) == SCE_SNAP_PROJECT); + t->tsnap.project_self = !((t->settings->snap_flag & SCE_SNAP_PROJECT_NO_SELF) == SCE_SNAP_PROJECT_NO_SELF); t->tsnap.peel = ((t->settings->snap_flag & SCE_SNAP_PROJECT) == SCE_SNAP_PROJECT); } |