Problem selecting all objects on a layer from a script if any 3d view is in local mode #45783

Closed
opened 2015-08-13 13:33:04 +02:00 by Olli Kallioinen · 6 comments

Blender Version
Broken: 2.75a-c27589e 64bit

Short description of error
If any 3d view is in local mode bpy.ops.object.select_by_layer() fails to select all objects on the layer. Even if the view is not used anymore.

Exact steps for others to reproduce the error

  • Open the default scene
  • Open a second 3d view
  • Select the cube
  • Set the second 3d view to local mode (numpad '/') so that it's only showing the cube
  • Deselect all objects
  • Enter bpy.ops.object.select_by_layer(layers=1) to python console
  • Result: All other object on layer 1 are selected but the cube.

The strangest part is that if you close the 3d view that is in local mode, the cube cannot still be selected with select_by_layer until you open another 3d view set it to local mode with the cube and back to global mode.

**Blender Version** Broken: 2.75a-c27589e 64bit **Short description of error** If any 3d view is in local mode `bpy.ops.object.select_by_layer()` fails to select all objects on the layer. Even if the view is not used anymore. **Exact steps for others to reproduce the error** - Open the default scene - Open a second 3d view - Select the cube - Set the second 3d view to local mode (numpad '/') so that it's only showing the cube - Deselect all objects - Enter `bpy.ops.object.select_by_layer(layers=1)` to python console - Result: All other object on layer 1 are selected but the cube. The strangest part is that if you close the 3d view that is in local mode, the cube cannot still be selected with select_by_layer until you open another 3d view set it to local mode with the cube and back to global mode.

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @suikki

Added subscriber: @suikki

Added subscriber: @mont29

Added subscriber: @mont29

That’s because local view uses additional bitflag on layer… Does not make much sense to prevent selection in this case though, easy fix.

That’s because local view uses additional bitflag on layer… Does not make much sense to prevent selection in this case though, easy fix.
Bastien Montagne self-assigned this 2015-08-13 14:24:10 +02:00

This issue was referenced by blender/blender@d2383ec6c0

This issue was referenced by blender/blender@d2383ec6c07a298a290b83ba8347618e3b46c9d9

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#45783
No description provided.