diff options
Diffstat (limited to 'source/blender/editors/transform')
4 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 47624293a0b..1dce388a275 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -5874,7 +5874,7 @@ static void set_trans_object_base_flags(TransInfo *t) /* Traverse all bases and set all possible flags. */ for (Base *base = view_layer->object_bases.first; base; base = base->next) { base->flag_legacy &= ~BA_WAS_SEL; - if (TESTBASELIB_BGMODE(v3d, base)) { + if (BASE_SELECTED_EDITABLE(v3d, base)) { Object *ob = base->object; Object *parsel = ob->parent; /* If parent selected, deselect. */ @@ -5882,7 +5882,7 @@ static void set_trans_object_base_flags(TransInfo *t) if (parsel->base_flag & BASE_SELECTED) { Base *parbase = BKE_view_layer_base_find(view_layer, parsel); if (parbase != NULL) { /* in rare cases this can fail */ - if (TESTBASELIB_BGMODE(v3d, parbase)) { + if (BASE_SELECTED_EDITABLE(v3d, parbase)) { break; } } @@ -5940,7 +5940,7 @@ static int count_proportional_objects(TransInfo *t) { /* Mark all parents. */ for (Base *base = view_layer->object_bases.first; base; base = base->next) { - if (TESTBASELIB_BGMODE(v3d, base)) { + if (BASE_SELECTED_EDITABLE(v3d, base)) { Object *parent = base->object->parent; /* flag all parents */ while (parent != NULL) { @@ -5954,7 +5954,7 @@ static int count_proportional_objects(TransInfo *t) /* 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_BGMODE(v3d, base))) + (BASE_EDITABLE(v3d, base))) { mark_children(base->object); } @@ -5968,7 +5968,7 @@ static int count_proportional_objects(TransInfo *t) */ if ((ob->flag & (BA_TRANSFORM_CHILD | BA_TRANSFORM_PARENT)) == 0 && (base->flag & BASE_SELECTED) == 0 && - (BASE_EDITABLE_BGMODE(v3d, base))) + (BASE_EDITABLE(v3d, base))) { flush_trans_object_base_deps_flag(depsgraph, ob); total += 1; @@ -6937,7 +6937,7 @@ static void createTransObject(bContext *C, TransInfo *t) TransDataContainer *tc = TRANS_DATA_CONTAINER_FIRST_SINGLE(t); /* count */ - tc->data_len = CTX_DATA_COUNT(C, selected_objects); + tc->data_len = CTX_DATA_COUNT(C, selected_bases); if (!tc->data_len) { /* clear here, main transform function escapes too */ @@ -6989,7 +6989,7 @@ static void createTransObject(bContext *C, TransInfo *t) /* if base is not selected, not a parent of selection or not a child of selection and it is editable */ if ((ob->flag & (BA_TRANSFORM_CHILD | BA_TRANSFORM_PARENT)) == 0 && (base->flag & BASE_SELECTED) == 0 && - BASE_EDITABLE_BGMODE(v3d, base)) + BASE_EDITABLE(v3d, base)) { td->protectflag = ob->protectflag; td->ext = tx; diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c index ddd0c871015..7a9fceec3a1 100644 --- a/source/blender/editors/transform/transform_gizmo_3d.c +++ b/source/blender/editors/transform/transform_gizmo_3d.c @@ -1088,7 +1088,7 @@ int ED_transform_calc_gizmo_stats( if (base && ((base->flag & BASE_SELECTED) == 0)) ob = NULL; for (base = view_layer->object_bases.first; base; base = base->next) { - if (!TESTBASELIB(v3d, base)) { + if (!BASE_SELECTED_EDITABLE(v3d, base)) { continue; } if (ob == NULL) { diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 04999213c63..f08b26455fc 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -1079,7 +1079,7 @@ int getTransformOrientation_ex(const bContext *C, float normal[3], float plane[3 /* first selected */ ob = NULL; for (base = view_layer->object_bases.first; base; base = base->next) { - if (TESTBASELIB(v3d, base)) { + if (BASE_SELECTED_EDITABLE(v3d, base)) { ob = base->object; break; } diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index b409e6059b4..94766262711 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -225,7 +225,7 @@ static void iter_snap_objects( Base *base_act = view_layer->basact; for (Base *base = view_layer->object_bases.first; base != NULL; base = base->next) { - if ((BASE_VISIBLE_BGMODE(v3d, base)) && (base->flag_legacy & BA_SNAP_FIX_DEPS_FIASCO) == 0 && + if ((BASE_VISIBLE(v3d, base)) && (base->flag_legacy & BA_SNAP_FIX_DEPS_FIASCO) == 0 && !((snap_select == SNAP_NOT_SELECTED && ((base->flag & BASE_SELECTED) || (base->flag_legacy & BA_WAS_SEL))) || (snap_select == SNAP_NOT_ACTIVE && base == base_act))) { |