Compare commits

...

3 Commits

Author SHA1 Message Date
Ryan Schultz 2f90a86e13 delete commented 2024-06-02 09:04:12 -05:00
Ryan Schultz 3b263c109e ensure the selection set doesn't change, even though the object might be outside the drawing bounds. 2024-05-26 19:08:14 -05:00
Ryan Schultz 4dbfea3586 Keeps selected objects selected when switching from one drawing to another 2024-05-26 18:36:01 -05:00
2 changed files with 6 additions and 4 deletions
@@ -484,10 +484,6 @@ def activate_drawing_view(
drawing_tool.import_annotations_in_group(drawing_tool.get_drawing_group(drawing))
blender.activate_camera(camera)
drawing_tool.isolate_camera_collection(camera)
try:
blender.set_active_object(camera)
except:
raise CameraNotAvailableError()
drawing_tool.activate_drawing(camera)
@@ -1752,6 +1752,8 @@ class Drawing(blenderbim.core.tool.Drawing):
@classmethod
def activate_drawing(cls, camera: bpy.types.Object) -> None:
selected_objects_before = bpy.context.selected_objects
# Sync viewport objects visibility with selectors from EPset_Drawing/Include and /Exclude
drawing = tool.Ifc.get_entity(camera)
@@ -1839,6 +1841,10 @@ class Drawing(blenderbim.core.tool.Drawing):
cls.import_camera_props(drawing, camera)
for obj in selected_objects_before:
obj.hide_set(False)
obj.select_set(True)
@classmethod
def get_elements_in_camera_view(
cls, camera: bpy.types.Object, objs: list[ifcopenshell.entity_instance]