mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 06:21:40 +00:00
Remove dead code where material psets used to be on a bpy.types.Material
This commit is contained in:
@@ -79,7 +79,7 @@ def draw_enumerated_property(prop, layout, copy_operator=None):
|
|||||||
|
|
||||||
|
|
||||||
def get_active_pset_obj_name(context, obj_type):
|
def get_active_pset_obj_name(context, obj_type):
|
||||||
if obj_type in ("Object", "Material", "MaterialSet", "MaterialSetItem"):
|
if obj_type in ("Object", "MaterialSet", "MaterialSetItem"):
|
||||||
return context.active_object.name
|
return context.active_object.name
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|||||||
@@ -50,8 +50,6 @@ from bpy.props import (
|
|||||||
|
|
||||||
cwd = os.path.dirname(os.path.realpath(__file__))
|
cwd = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
materialpsetnames_enum = []
|
|
||||||
|
|
||||||
|
|
||||||
def update_tab(self, context):
|
def update_tab(self, context):
|
||||||
self.alt_tab = self.previous_tab
|
self.alt_tab = self.previous_tab
|
||||||
@@ -127,15 +125,6 @@ def update_ifc_file(self, context):
|
|||||||
blenderbim.bim.handler.loadIfcStore(context.scene)
|
blenderbim.bim.handler.loadIfcStore(context.scene)
|
||||||
|
|
||||||
|
|
||||||
def getMaterialPsetNames(self, context):
|
|
||||||
global materialpsetnames_enum
|
|
||||||
materialpsetnames_enum.clear()
|
|
||||||
psetqto = ifcopenshell.util.pset.get_template("IFC4")
|
|
||||||
pset_names = psetqto.get_applicable_names("IfcMaterial", pset_only=True)
|
|
||||||
materialpsetnames_enum.extend([(p, p, "") for p in pset_names])
|
|
||||||
return materialpsetnames_enum
|
|
||||||
|
|
||||||
|
|
||||||
def update_section_color(self, context):
|
def update_section_color(self, context):
|
||||||
section_node_group = bpy.data.node_groups.get("Section Override")
|
section_node_group = bpy.data.node_groups.get("Section Override")
|
||||||
if section_node_group is None:
|
if section_node_group is None:
|
||||||
@@ -457,8 +446,6 @@ class BIMMaterialProperties(PropertyGroup):
|
|||||||
location: StringProperty(name="Location")
|
location: StringProperty(name="Location")
|
||||||
identification: StringProperty(name="Identification")
|
identification: StringProperty(name="Identification")
|
||||||
name: StringProperty(name="Name")
|
name: StringProperty(name="Name")
|
||||||
pset_name: EnumProperty(items=getMaterialPsetNames, name="Pset Name")
|
|
||||||
psets: CollectionProperty(name="Psets", type=PsetQto)
|
|
||||||
attributes: CollectionProperty(name="Attributes", type=Attribute)
|
attributes: CollectionProperty(name="Attributes", type=Attribute)
|
||||||
# In Blender, a material object can map to an IFC material, IFC surface style, or both
|
# In Blender, a material object can map to an IFC material, IFC surface style, or both
|
||||||
ifc_style_id: IntProperty(name="IFC Style ID")
|
ifc_style_id: IntProperty(name="IFC Style ID")
|
||||||
|
|||||||
Reference in New Issue
Block a user