[Bf-blender-cvs] [d2383ec] master: Fix T45783: Problem selecting all objects on a layer from a script if any 3d view is in local mode.
Bastien Montagne
noreply at git.blender.org
Thu Aug 13 14:26:07 CEST 2015
Commit: d2383ec6c07a298a290b83ba8347618e3b46c9d9
Author: Bastien Montagne
Date: Thu Aug 13 14:25:26 2015 +0200
Branches: master
https://developer.blender.org/rBd2383ec6c07a298a290b83ba8347618e3b46c9d9
Fix T45783: Problem selecting all objects on a layer from a script if any 3d view is in local mode.
Do not take into account lay bits used for local view, when doing exact match.
===================================================================
M source/blender/editors/object/object_select.c
===================================================================
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index 6e00875..a8e4eec 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -958,7 +958,8 @@ static int object_select_by_layer_exec(bContext *C, wmOperator *op)
switch (match) {
case OB_SEL_LAYERMATCH_EXACT:
- ok = (base->lay == (1 << (layernum - 1)));
+ /* Mask out bits used for local view, only work on real layer ones, see T45783. */
+ ok = ((base->lay & ((1 << 20) - 1)) == (1 << (layernum - 1)));
break;
case OB_SEL_LAYERMATCH_SHARED:
ok = (base->lay & (1 << (layernum - 1))) != 0;
More information about the Bf-blender-cvs
mailing list