mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 19:27:10 +00:00
Use property_unset instead of in and del
This commit is contained in:
@@ -193,9 +193,8 @@ def update_is_adding_representation_layer(self: "BIMObjectGeometryProperties", c
|
|||||||
return
|
return
|
||||||
return
|
return
|
||||||
|
|
||||||
if "representation_layer" in self:
|
self.property_unset("representation_layer")
|
||||||
del self["representation_layer"]
|
self.property_unset("is_adding_representation_layer")
|
||||||
del self["is_adding_representation_layer"]
|
|
||||||
|
|
||||||
|
|
||||||
def update_is_editing_item_layer(self: "BIMObjectGeometryProperties", context: bpy.types.Context) -> None:
|
def update_is_editing_item_layer(self: "BIMObjectGeometryProperties", context: bpy.types.Context) -> None:
|
||||||
@@ -216,9 +215,8 @@ def update_is_editing_item_layer(self: "BIMObjectGeometryProperties", context: b
|
|||||||
self.representation_item_layer = str(layer.id())
|
self.representation_item_layer = str(layer.id())
|
||||||
return
|
return
|
||||||
|
|
||||||
if "representation_item_layer" in self:
|
self.property_unset("representation_item_layer")
|
||||||
del self["representation_item_layer"]
|
self.property_unset("is_editing_item_layer")
|
||||||
del self["is_editing_item_layer"]
|
|
||||||
|
|
||||||
|
|
||||||
class BIMObjectGeometryProperties(PropertyGroup):
|
class BIMObjectGeometryProperties(PropertyGroup):
|
||||||
|
|||||||
@@ -119,8 +119,7 @@ class Clash(bonsai.core.tool.Clash):
|
|||||||
if not clash_set:
|
if not clash_set:
|
||||||
return
|
return
|
||||||
clash_set.clashes.clear()
|
clash_set.clashes.clear()
|
||||||
if "clashes_loaded" in clash_set:
|
clash_set.property_unset("clashes_loaded")
|
||||||
del clash_set["clashes_loaded"]
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def load_clash_sets(cls, fn: str) -> None:
|
def load_clash_sets(cls, fn: str) -> None:
|
||||||
|
|||||||
@@ -319,8 +319,7 @@ class Owner(bonsai.core.tool.Owner):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def clear_application(cls) -> None:
|
def clear_application(cls) -> None:
|
||||||
props = cls.get_owner_props()
|
props = cls.get_owner_props()
|
||||||
if "active_application_id" in props:
|
props.property_unset("active_application_id")
|
||||||
del props["active_application_id"]
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def import_application_attributes(cls) -> None:
|
def import_application_attributes(cls) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user