diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-05-07 05:59:47 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-05-07 05:59:47 +0300 |
commit | fb26b6ac86ee7267c772ff3f107e4fca391f911c (patch) | |
tree | 443c336c85427214807cea4aaf5fbc700ca69ad3 /source/blender | |
parent | fe5491898b4edbb867082901e2dcd3c57a3f5912 (diff) |
Fix T64130: Bezier curve vanishes on transform
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 55a10700911..1a05fef5e53 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -9558,21 +9558,30 @@ void createTransData(bContext *C, TransInfo *t) t->flag |= T_EDIT | T_POINTS; - if (t->data_len_all && t->flag & T_PROP_EDIT) { - if (ELEM(t->obedit_type, OB_CURVE, OB_MESH)) { - sort_trans_data(t); // makes selected become first in array - if ((t->obedit_type == OB_MESH) && (t->flag & T_PROP_CONNECTED)) { - /* already calculated by editmesh_set_connectivity_distance */ + if (t->data_len_all) { + if (t->flag & T_PROP_EDIT) { + if (ELEM(t->obedit_type, OB_CURVE, OB_MESH)) { + sort_trans_data(t); // makes selected become first in array + if ((t->obedit_type == OB_MESH) && (t->flag & T_PROP_CONNECTED)) { + /* already calculated by editmesh_set_connectivity_distance */ + } + else { + set_prop_dist(t, 0); + } + sort_trans_data_dist(t); } else { - set_prop_dist(t, 0); + sort_trans_data(t); // makes selected become first in array + set_prop_dist(t, 1); + sort_trans_data_dist(t); } - sort_trans_data_dist(t); } else { - sort_trans_data(t); // makes selected become first in array - set_prop_dist(t, 1); - sort_trans_data_dist(t); + if (ELEM(t->obedit_type, OB_CURVE)) { + /* Needed because bezier handles can be partially selected + * and are still added into transform data. */ + sort_trans_data(t); // makes selected become first in array + } } } |