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.
This commit is contained in:
parent
828710d2ac
commit
d2383ec6c0
Notes:
blender-bot
2023-02-14 19:54:15 +01:00
Referenced by issue blender/blender-addons#45783, Problem selecting all objects on a layer from a script if any 3d view is in local mode
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue