Improve drawing activation as per #6653 (#6659)

Drawings are now activated in a bit different way - not by the camera button located above the drawings list, but by using the camera indicator next to each drawing. Which allows do change active drawing very quickly. All activation options (shift+, alt+) are also available from this indicator.

Now - https://imgur.com/a/DmnWkul

Before - https://imgur.com/a/zjPDkPa
This commit is contained in:
sboddy
2025-05-12 15:46:34 +01:00
committed by GitHub
parent 0328be4093
commit 3085072751
2 changed files with 9 additions and 11 deletions
@@ -2195,13 +2195,6 @@ class ActivateDrawing(bpy.types.Operator, ActivateDrawingBase):
should_view_from_camera: bpy.props.BoolProperty(name="Should View From Camera", default=True, options={"SKIP_SAVE"})
use_quick_preview: bpy.props.BoolProperty(name="Use Quick Preview", default=False, options={"SKIP_SAVE"})
@classmethod
def poll(cls, context):
if not tool.Drawing.get_active_drawing_item():
cls.poll_message_set("No drawing selected.")
return False
return True
class ActivateDrawingFromSheet(bpy.types.Operator, ActivateDrawingBase):
bl_idname = "bim.activate_drawing_from_sheet"
+9 -4
View File
@@ -281,9 +281,6 @@ class BIM_PT_drawings(Panel):
row3 = row.row(align=True)
row3.alignment = "RIGHT"
row3.operator("bim.activate_drawing", icon="OUTLINER_OB_CAMERA", text="").drawing = (
active_drawing.ifc_definition_id
)
row3.operator("bim.activate_model", icon="VIEW3D", text="")
row3.separator(factor=0.5, type="SPACE")
@@ -641,14 +638,22 @@ class BIM_UL_drawinglist(bpy.types.UIList):
row.label(text="", icon="BLANK1")
selected_icon = "CHECKBOX_HLT" if item.is_selected else "CHECKBOX_DEHLT"
row.prop(item, "is_selected", text="", icon=selected_icon, emboss=False)
row.separator(factor=0.5, type="SPACE")
row.prop(item, "name", text="", emboss=False)
row.separator(factor=0.25, type="SPACE")
self.props = tool.Drawing.get_document_props()
if (
self.props.drawings
and self.props.active_drawing_id
and item.ifc_definition_id == self.props.active_drawing_id
):
row.label(text="", icon="OUTLINER_OB_CAMERA")
row.operator("bim.activate_drawing", text="", icon="VIEW_CAMERA", emboss=True, depress=True).drawing = (
item.ifc_definition_id
)
else:
row.operator("bim.activate_drawing", text="", icon="VIEW_CAMERA_UNSELECTED", emboss=False).drawing = (
item.ifc_definition_id
)
else:
if item.target_view == "PLAN_VIEW":
icon = "UV_FACESEL"