mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +00:00
remove unused argument
This commit is contained in:
@@ -37,7 +37,7 @@ def add_style(ifc: tool.Ifc, style: tool.Style, obj: bpy.types.Material) -> ifco
|
|||||||
|
|
||||||
material = ifc.get_entity(obj)
|
material = ifc.get_entity(obj)
|
||||||
if material:
|
if material:
|
||||||
ifc.run("style.assign_material_style", material=material, style=element, context=style.get_context(obj))
|
ifc.run("style.assign_material_style", material=material, style=element, context=style.get_context())
|
||||||
return element
|
return element
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -95,9 +95,8 @@ class Style(blenderbim.core.tool.Style):
|
|||||||
def get_active_style_type(cls) -> str:
|
def get_active_style_type(cls) -> str:
|
||||||
return bpy.context.scene.BIMStylesProperties.style_type
|
return bpy.context.scene.BIMStylesProperties.style_type
|
||||||
|
|
||||||
# TODO: `obj` argument is unused?
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_context(cls, obj) -> Union[ifcopenshell.entity_instance, None]:
|
def get_context(cls) -> Union[ifcopenshell.entity_instance, None]:
|
||||||
return ifcopenshell.util.representation.get_context(tool.Ifc.get(), "Model", "Body", "MODEL_VIEW")
|
return ifcopenshell.util.representation.get_context(tool.Ifc.get(), "Model", "Body", "MODEL_VIEW")
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ class TestGetContext(NewFile):
|
|||||||
def test_run(self):
|
def test_run(self):
|
||||||
bpy.ops.bim.create_project()
|
bpy.ops.bim.create_project()
|
||||||
context = ifcopenshell.util.representation.get_context(tool.Ifc.get(), "Model", "Body", "MODEL_VIEW")
|
context = ifcopenshell.util.representation.get_context(tool.Ifc.get(), "Model", "Body", "MODEL_VIEW")
|
||||||
assert subject.get_context("obj") == context
|
assert subject.get_context() == context
|
||||||
|
|
||||||
|
|
||||||
class TestGetElementsByStyle(NewFile):
|
class TestGetElementsByStyle(NewFile):
|
||||||
|
|||||||
Reference in New Issue
Block a user