diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-08-06 17:44:15 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-08-06 17:44:26 +0300 |
commit | 3fab16fe8eb4a99607e00d5716ba88bf24020354 (patch) | |
tree | a14e541cbda24671ec882b2a90db32427a978bb8 /source/blender/editors/transform/transform_convert.c | |
parent | 4f64fa4f8628aa514ec1f14d798b2f406a3bf6ef (diff) |
Fix T90477: Cursor vertex snapping not working in UV editor
`t->obedit_type` is read to indicate if we are in uv edit mode.
Also fixes a crash introduced in {rBdd14ea18190ff27082009f73a556569a43377a71}.
Diffstat (limited to 'source/blender/editors/transform/transform_convert.c')
-rw-r--r-- | source/blender/editors/transform/transform_convert.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/source/blender/editors/transform/transform_convert.c b/source/blender/editors/transform/transform_convert.c index e77fedfe143..3f730956dd0 100644 --- a/source/blender/editors/transform/transform_convert.c +++ b/source/blender/editors/transform/transform_convert.c @@ -1072,7 +1072,8 @@ static void init_proportional_edit(TransInfo *t) else if (convert_type == TC_MESH_UV && t->flag & T_PROP_CONNECTED) { /* Already calculated by uv_set_connectivity_distance. */ } - else if (convert_type == TC_CURVE_VERTS && t->obedit_type == OB_CURVE) { + else if (convert_type == TC_CURVE_VERTS) { + BLI_assert(t->obedit_type == OB_CURVE); set_prop_dist(t, false); } else { @@ -1371,7 +1372,6 @@ void createTransData(bContext *C, TransInfo *t) switch (t->data_type) { case TC_ACTION_DATA: - t->obedit_type = -1; createTransActionData(C, t); break; case TC_POSE: @@ -1394,7 +1394,6 @@ void createTransData(bContext *C, TransInfo *t) createTransCurveVerts(t); break; case TC_GRAPH_EDIT_DATA: - t->obedit_type = -1; createTransGraphEditData(C, t); break; case TC_GPENCIL: @@ -1404,9 +1403,6 @@ void createTransData(bContext *C, TransInfo *t) createTransLatticeVerts(t); break; case TC_MASKING_DATA: - if (t->spacetype == SPACE_CLIP) { - t->obedit_type = -1; - } createTransMaskingData(C, t); break; case TC_MBALL_VERTS: @@ -1425,11 +1421,9 @@ void createTransData(bContext *C, TransInfo *t) createTransUVs(C, t); break; case TC_NLA_DATA: - t->obedit_type = -1; createTransNlaData(C, t); break; case TC_NODE_DATA: - t->obedit_type = -1; createTransNodeData(t); break; case TC_OBJECT: @@ -1473,12 +1467,10 @@ void createTransData(bContext *C, TransInfo *t) createTransSculpt(C, t); break; case TC_SEQ_DATA: - t->obedit_type = -1; t->num.flag |= NUM_NO_FRACTION; /* sequencer has no use for floating point transform. */ createTransSeqData(t); break; case TC_TRACKING_DATA: - t->obedit_type = -1; createTransTrackingData(C, t); break; case TC_NONE: @@ -1492,8 +1484,6 @@ void createTransData(bContext *C, TransInfo *t) countAndCleanTransDataContainer(t); init_proportional_edit(t); - - BLI_assert((!(t->flag & T_EDIT)) == (!(t->obedit_type != -1))); } /** \} */ |