Revert "Fix T62436: New added Torus won't appear in Local View"

This reverts commit 9054b39b27.

Using the region data to find the screen & space-data doesn't make sense
since local-view is space-data there is no reason to pass in a region
argument, then lookup the space-data.

There was no way to remove an object or check it's local view state
as there was in 2.7x.

This can be made closer to 2.7x API and simplified.
This commit is contained in:
Campbell Barton
2019-03-13 09:29:02 +11:00
parent 3146a07e3e
commit 3ea7a5d869
2 changed files with 0 additions and 62 deletions

View File

@@ -133,11 +133,6 @@ def object_data_add(context, obdata, operator=None, name=None):
obj_new.select_set(True)
obj_new.matrix_world = add_object_align_init(context, operator)
space_data = context.space_data
if space_data.type == 'VIEW_3D':
if space_data.local_view:
space_data.region_3d.local_view_add(obj_new)
if obj_act and obj_act.mode == 'EDIT' and obj_act.type == obj_new.type:
bpy.ops.mesh.select_all(action='DESELECT')
obj_act.select_set(True)