From a9e34f58bcbcb33b148c7396c81a799a6a3a93f9 Mon Sep 17 00:00:00 2001 From: Sebastian Parborg Date: Thu, 18 Apr 2019 11:50:00 +0200 Subject: Fix T63663: Object mode proportional editing affects objects which are disabled for selection Objects which are not selectable are no longer affected by proportional transformations. --- source/blender/editors/transform/transform_conversions.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 3f16d2bcfee..4346decd4a7 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -6225,7 +6225,7 @@ static int count_proportional_objects(TransInfo *t) (t->mode == TFM_ROTATION || t->mode == TFM_TRACKBALL))) { /* Mark all parents. */ for (Base *base = view_layer->object_bases.first; base; base = base->next) { - if (BASE_SELECTED_EDITABLE(v3d, base)) { + if (BASE_SELECTED_EDITABLE(v3d, base) && BASE_SELECTABLE(v3d, base)) { Object *parent = base->object->parent; /* flag all parents */ while (parent != NULL) { @@ -6238,7 +6238,8 @@ static int count_proportional_objects(TransInfo *t) for (Base *base = view_layer->object_bases.first; base; base = base->next) { /* all base not already selected or marked that is editable */ if ((base->object->flag & (BA_TRANSFORM_CHILD | BA_TRANSFORM_PARENT)) == 0 && - (base->flag & BASE_SELECTED) == 0 && (BASE_EDITABLE(v3d, base))) { + (base->flag & BASE_SELECTED) == 0 && + (BASE_EDITABLE(v3d, base) && BASE_SELECTABLE(v3d, base))) { mark_children(base->object); } } @@ -6247,10 +6248,11 @@ static int count_proportional_objects(TransInfo *t) for (Base *base = view_layer->object_bases.first; base; base = base->next) { Object *ob = base->object; /* If base is not selected, not a parent of selection or not a child of - * selection and it is editable. + * selection and it is editable and selectable. */ if ((ob->flag & (BA_TRANSFORM_CHILD | BA_TRANSFORM_PARENT)) == 0 && - (base->flag & BASE_SELECTED) == 0 && (BASE_EDITABLE(v3d, base))) { + (base->flag & BASE_SELECTED) == 0 && + (BASE_EDITABLE(v3d, base) && BASE_SELECTABLE(v3d, base))) { flush_trans_object_base_deps_flag(depsgraph, ob); total += 1; } @@ -7316,9 +7318,10 @@ static void createTransObject(bContext *C, TransInfo *t) Object *ob = base->object; /* if base is not selected, not a parent of selection - * or not a child of selection and it is editable */ + * or not a child of selection and it is editable and selectable */ if ((ob->flag & (BA_TRANSFORM_CHILD | BA_TRANSFORM_PARENT)) == 0 && - (base->flag & BASE_SELECTED) == 0 && BASE_EDITABLE(v3d, base)) { + (base->flag & BASE_SELECTED) == 0 && BASE_EDITABLE(v3d, base) && + BASE_SELECTABLE(v3d, base)) { td->protectflag = ob->protectflag; td->ext = tx; td->ext->rotOrder = ob->rotmode; -- cgit v1.2.3