Fixed bug in bim.select_assigned_product

It was trying to call method `Drawingcls.get_active_object()` that didn't exist
This commit is contained in:
Andrej730
2023-04-17 14:47:11 +05:00
parent 552078c8a2
commit 51ac86be79
3 changed files with 5 additions and 5 deletions
@@ -1704,4 +1704,4 @@ class SelectAssignedProduct(bpy.types.Operator, Operator):
bl_options = {"REGISTER", "UNDO"}
def _execute(self, context):
core.select_assigned_product(tool.Drawing)
core.select_assigned_product(tool.Drawing, context)
+2 -2
View File
@@ -380,8 +380,8 @@ def sync_references(ifc, collector, drawing_tool, drawing=None):
drawing_tool.sync_object_representation(reference_obj)
def select_assigned_product(drawing):
drawing.select_assigned_product()
def select_assigned_product(drawing, context):
drawing.select_assigned_product(context)
def activate_drawing_view(ifc, drawing_tool, drawing):
+2 -2
View File
@@ -1367,8 +1367,8 @@ class Drawing(blenderbim.core.tool.Drawing):
return reference.ReferencedDocument
@classmethod
def select_assigned_product(cls):
obj = cls.get_active_object()
def select_assigned_product(cls, context):
obj = context.active_object
element = tool.Ifc.get_entity(obj)
product = cls.get_assigned_product(element)
if product: