mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
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:
@@ -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)
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user