Commit: 8b24f45e6bd9f310260da4fe2a2510042a50665f
Author: Campbell Barton
Date: Tue May 29 14:11:34 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB8b24f45e6bd9f310260da4fe2a2510042a50665f
Object Modes: only use selection for mode switch
Selection is no longer needed for an object to be considered in a mode.
Part of T55246 design task, fixes T55187
===================================================================
M source/blender/blenkernel/BKE_object.h
M source/blender/blenkernel/intern/layer.c
M source/blender/blenkernel/intern/object.c
M source/blender/draw/modes/edit_curve_mode.c
M source/blender/draw/modes/edit_lattice_mode.c
M source/blender/draw/modes/edit_mesh_mode.c
M source/blender/draw/modes/edit_metaball_mode.c
M source/blender/editors/object/object_edit.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_object.h
b/source/blender/blenkernel/BKE_object.h
index db6c7aa9c4f..f71a15f511f 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -81,7 +81,6 @@ void BKE_object_copy_proxy_drivers(struct Object *ob, struct
Object *target);
bool BKE_object_exists_check(const struct Object *obtest);
bool BKE_object_is_in_editmode(const struct Object *ob);
bool BKE_object_is_in_editmode_vgroup(const struct Object *ob);
-bool BKE_object_is_in_editmode_and_selected(const struct Object *ob);
bool BKE_object_is_in_wpaint_select_vert(const struct Object *ob);
bool BKE_object_has_mode_data(const struct Object *ob, eObjectMode
object_mode);
diff --git a/source/blender/blenkernel/intern/layer.c
b/source/blender/blenkernel/intern/layer.c
index 3a6d599ccd3..16e349465f6 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -1206,8 +1206,7 @@ void
BKE_view_layer_bases_in_mode_iterator_next(BLI_Iterator *iter)
}
while (base) {
- if ((base->flag & BASE_SELECTED) != 0 &&
- (base->object->type == data->base_active->object->type) &&
+ if ((base->object->type == data->base_active->object->type) &&
(base != data->base_active) &&
(base->object->mode & data->object_mode))
{
diff --git a/source/blender/blenkernel/intern/object.c
b/source/blender/blenkernel/intern/object.c
index ab3300c4ff7..57324b88912 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -502,15 +502,6 @@ bool BKE_object_is_in_editmode(const Object *ob)
return false;
}
-bool BKE_object_is_in_editmode_and_selected(const Object *ob)
-{
- if ((ob->base_flag & BASE_SELECTED) && (BKE_object_is_in_editmode(ob)))
{
- return true;
- }
- return false;
-}
-
-
bool BKE_object_is_in_editmode_vgroup(const Object *ob)
{
return (OB_TYPE_SUPPORT_VGROUP(ob->type) &&
diff --git a/source/blender/draw/modes/edit_curve_mode.c
b/source/blender/draw/modes/edit_curve_mode.c
index 8e70de5dd9f..50ce29b7b1a 100644
--- a/source/blender/draw/modes/edit_curve_mode.c
+++ b/source/blender/draw/modes/edit_curve_mode.c
@@ -239,7 +239,7 @@ static void EDIT_CURVE_cache_populate(void *vedata, Object
*ob)
#if 0
if (ob == draw_ctx->object_edit)
#else
- if ((ob == draw_ctx->object_edit) ||
BKE_object_is_in_editmode_and_selected(ob))
+ if ((ob == draw_ctx->object_edit) ||
BKE_object_is_in_editmode(ob))
#endif
{
Curve *cu = ob->data;
diff --git a/source/blender/draw/modes/edit_lattice_mode.c
b/source/blender/draw/modes/edit_lattice_mode.c
index 77e648f1717..870dd14d677 100644
--- a/source/blender/draw/modes/edit_lattice_mode.c
+++ b/source/blender/draw/modes/edit_lattice_mode.c
@@ -194,7 +194,7 @@ static void EDIT_LATTICE_cache_populate(void *vedata,
Object *ob)
UNUSED_VARS(psl);
if (ob->type == OB_LATTICE) {
- if ((ob == draw_ctx->object_edit) ||
BKE_object_is_in_editmode_and_selected(ob)) {
+ if ((ob == draw_ctx->object_edit) ||
BKE_object_is_in_editmode(ob)) {
/* Get geometry cache */
struct Gwn_Batch *geom;
diff --git a/source/blender/draw/modes/edit_mesh_mode.c
b/source/blender/draw/modes/edit_mesh_mode.c
index f6e0267c25e..85a7c4ec528 100644
--- a/source/blender/draw/modes/edit_mesh_mode.c
+++ b/source/blender/draw/modes/edit_mesh_mode.c
@@ -450,7 +450,7 @@ static void EDIT_MESH_cache_populate(void *vedata, Object
*ob)
struct Gwn_Batch *geom;
if (ob->type == OB_MESH) {
- if ((ob == draw_ctx->object_edit) ||
BKE_object_is_in_editmode_and_selected(ob)) {
+ if ((ob == draw_ctx->object_edit) ||
BKE_object_is_in_editmode(ob)) {
const Mesh *me = ob->data;
bool do_occlude_wire = (v3d->overlay.edit_flag &
V3D_OVERLAY_EDIT_OCCLUDE_WIRE) != 0;
bool do_show_weight = (v3d->overlay.edit_flag &
V3D_OVERLAY_EDIT_WEIGHT) != 0;
diff --git a/source/blender/draw/modes/edit_metaball_mode.c
b/source/blender/draw/modes/edit_metaball_mode.c
index c0c4e7e4295..20539295fd2 100644
--- a/source/blender/draw/modes/edit_metaball_mode.c
+++ b/source/blender/draw/modes/edit_metaball_mode.c
@@ -136,7 +136,7 @@ static void EDIT_METABALL_cache_populate(void *vedata,
Object *ob)
const DRWContextState *draw_ctx = DRW_context_state_get();
DRWShadingGroup *group = stl->g_data->group;
- if ((ob == draw_ctx->object_edit) ||
BKE_object_is_in_editmode_and_selected(ob)) {
+ if ((ob == draw_ctx->object_edit) ||
BKE_object_is_in_editmode(ob)) {
MetaBall *mb = ob->data;
const float *color;
diff --git a/source/blender/editors/object/object_edit.c
b/source/blender/editors/object/object_edit.c
index 7a4898ec287..762d8d96c61 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -468,16 +468,16 @@ static int editmode_toggle_exec(bContext *C, wmOperator
*op)
else {
ED_object_editmode_exit(C, EM_FREEDATA | EM_WAITCURSOR);
if ((obact->mode & mode_flag) == 0) {
- FOREACH_SELECTED_OBJECT_BEGIN(view_layer, ob)
+ FOREACH_OBJECT_BEGIN(view_layer, ob)
{
if ((ob != obact) && (ob->type == obact->type))
{
ED_object_editmode_exit_ex(scene, ob,
EM_FREEDATA | EM_WAITCURSOR);
}
}
- FOREACH_SELECTED_OBJECT_END;
+ FOREACH_OBJECT_END;
}
}
-
+
ED_space_image_uv_sculpt_update(CTX_wm_manager(C), scene);
WM_msg_publish_rna_prop(mbus, &obact->id, obact, Object, mode);
@@ -549,7 +549,7 @@ static int posemode_exec(bContext *C, wmOperator *op)
if (ok) {
struct Main *bmain = CTX_data_main(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
- FOREACH_SELECTED_OBJECT_BEGIN(view_layer, ob)
+ FOREACH_OBJECT_BEGIN(view_layer, ob)
{
if ((ob != obact) &&
(ob->type == OB_ARMATURE) &&
@@ -558,7 +558,7 @@ static int posemode_exec(bContext *C, wmOperator *op)
ED_object_posemode_exit_ex(bmain, ob);
}
}
- FOREACH_SELECTED_OBJECT_END;
+ FOREACH_OBJECT_END;
}
}
else {
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs