A bit more intuitive adding drawing/schedule to the sheet

Now it will detect currently active sheet even if you have sheet's drawing/titleblock/schedule selected.
This commit is contained in:
Andrej730
2023-05-03 15:38:51 +05:00
parent c615f7469a
commit 7b5ece2f4a
2 changed files with 7 additions and 2 deletions
@@ -671,6 +671,11 @@ class Drawing(blenderbim.core.tool.Drawing):
new.name = os.path.basename(reference.Location)
new.reference_type = reference.Description
@classmethod
def get_active_sheet(cls, context):
props = context.scene.DocProperties
return next(s for s in props.sheets[: props.active_sheet_index + 1][::-1] if s.is_sheet)
@classmethod
def import_text_attributes(cls, obj):
props = obj.BIMTextProperties