mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 08:18:37 +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"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
|
|
||||||
def _execute(self, context):
|
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)
|
drawing_tool.sync_object_representation(reference_obj)
|
||||||
|
|
||||||
|
|
||||||
def select_assigned_product(drawing):
|
def select_assigned_product(drawing, context):
|
||||||
drawing.select_assigned_product()
|
drawing.select_assigned_product(context)
|
||||||
|
|
||||||
|
|
||||||
def activate_drawing_view(ifc, drawing_tool, drawing):
|
def activate_drawing_view(ifc, drawing_tool, drawing):
|
||||||
|
|||||||
@@ -1367,8 +1367,8 @@ class Drawing(blenderbim.core.tool.Drawing):
|
|||||||
return reference.ReferencedDocument
|
return reference.ReferencedDocument
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def select_assigned_product(cls):
|
def select_assigned_product(cls, context):
|
||||||
obj = cls.get_active_object()
|
obj = context.active_object
|
||||||
element = tool.Ifc.get_entity(obj)
|
element = tool.Ifc.get_entity(obj)
|
||||||
product = cls.get_assigned_product(element)
|
product = cls.get_assigned_product(element)
|
||||||
if product:
|
if product:
|
||||||
|
|||||||
Reference in New Issue
Block a user