Fix T64130: Bezier curve vanishes on transform

This commit is contained in:
2019-05-07 12:59:47 +10:00
parent fe5491898b
commit fb26b6ac86

View File

@@ -9558,21 +9558,30 @@ void createTransData(bContext *C, TransInfo *t)
t->flag |= T_EDIT | T_POINTS; t->flag |= T_EDIT | T_POINTS;
if (t->data_len_all && t->flag & T_PROP_EDIT) { if (t->data_len_all) {
if (ELEM(t->obedit_type, OB_CURVE, OB_MESH)) { if (t->flag & T_PROP_EDIT) {
sort_trans_data(t); // makes selected become first in array if (ELEM(t->obedit_type, OB_CURVE, OB_MESH)) {
if ((t->obedit_type == OB_MESH) && (t->flag & T_PROP_CONNECTED)) { sort_trans_data(t); // makes selected become first in array
/* already calculated by editmesh_set_connectivity_distance */ 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 { 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 { else {
sort_trans_data(t); // makes selected become first in array if (ELEM(t->obedit_type, OB_CURVE)) {
set_prop_dist(t, 1); /* Needed because bezier handles can be partially selected
sort_trans_data_dist(t); * and are still added into transform data. */
sort_trans_data(t); // makes selected become first in array
}
} }
} }