mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
More panel shuffling, new Quality and Coordination tab. Geometry is now part of materials.
This commit is contained in:
@@ -142,7 +142,6 @@ classes = [
|
||||
ui.BIM_PT_object_metadata,
|
||||
ui.BIM_PT_geometry_object,
|
||||
ui.BIM_PT_services_object,
|
||||
ui.BIM_PT_utilities_object,
|
||||
ui.BIM_PT_misc_object,
|
||||
]
|
||||
|
||||
|
||||
@@ -26,14 +26,13 @@ from blenderbim.tool.brick import BrickStore
|
||||
class BIM_PT_brickschema(Panel):
|
||||
bl_label = "Brickschema Project"
|
||||
bl_idname = "BIM_PT_brickschema"
|
||||
bl_options = {"DEFAULT_CLOSED"}
|
||||
bl_space_type = "PROPERTIES"
|
||||
bl_region_type = "WINDOW"
|
||||
bl_context = "scene"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return tool.Blender.is_tab(context, "OTHER")
|
||||
return tool.Blender.is_tab(context, "FM")
|
||||
|
||||
def draw(self, context):
|
||||
if not BrickschemaData.is_loaded:
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with BlenderBIM Add-on. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import blenderbim.tool as tool
|
||||
from bpy.types import Panel
|
||||
from blenderbim.bim.ifc import IfcStore
|
||||
|
||||
@@ -23,11 +24,13 @@ from blenderbim.bim.ifc import IfcStore
|
||||
class BIM_PT_cobie(Panel):
|
||||
bl_label = "COBie"
|
||||
bl_idname = "BIM_PT_cobie"
|
||||
bl_options = {"DEFAULT_CLOSED"}
|
||||
bl_space_type = "PROPERTIES"
|
||||
bl_region_type = "WINDOW"
|
||||
bl_context = "scene"
|
||||
bl_parent_id = "BIM_PT_collaboration"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return tool.Blender.is_tab(context, "FM")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
@@ -76,7 +76,7 @@ class BIM_PT_object_groups(Panel):
|
||||
bl_region_type = "WINDOW"
|
||||
bl_context = "object"
|
||||
bl_order = 1
|
||||
bl_parent_id = "BIM_PT_utilities_object"
|
||||
bl_parent_id = "BIM_PT_misc_object"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
# along with BlenderBIM Add-on. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import blenderbim.bim.helper
|
||||
import blenderbim.tool as tool
|
||||
from bpy.types import Panel, UIList
|
||||
from blenderbim.bim.ifc import IfcStore
|
||||
from blenderbim.bim.helper import draw_attributes
|
||||
@@ -115,11 +116,12 @@ class BIM_PT_object_material(Panel):
|
||||
bl_idname = "BIM_PT_object_material"
|
||||
bl_space_type = "PROPERTIES"
|
||||
bl_region_type = "WINDOW"
|
||||
bl_context = "object"
|
||||
bl_parent_id = "BIM_PT_object_metadata"
|
||||
bl_context = "scene"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
if not tool.Blender.is_tab(context, "GEOMETRY"):
|
||||
return False
|
||||
if not context.active_object:
|
||||
return False
|
||||
props = context.active_object.BIMObjectProperties
|
||||
|
||||
@@ -544,7 +544,7 @@ class BIM_PT_bulk_property_editor(Panel):
|
||||
bl_region_type = "WINDOW"
|
||||
bl_context = "object"
|
||||
bl_options = {"DEFAULT_CLOSED"}
|
||||
bl_parent_id = "BIM_PT_utilities_object"
|
||||
bl_parent_id = "BIM_PT_misc_object"
|
||||
|
||||
def draw(self, context):
|
||||
pass
|
||||
|
||||
@@ -345,13 +345,13 @@ def get_tab(self, context):
|
||||
return [
|
||||
("PROJECT", "Project Overview", "", blenderbim.bim.icons["IFC"].icon_id, 0),
|
||||
("OBJECT", "Object Information", "", "FILE_3D", 1),
|
||||
("MATERIALS", "Materials and Styles", "", "MATERIAL", 2),
|
||||
("GEOMETRY", "Geometry and Materials", "", "MATERIAL", 2),
|
||||
("DRAWINGS", "Drawings and Documents", "", "DOCUMENTS", 3),
|
||||
("SERVICES", "Services and Systems", "", "NETWORK_DRIVE", 4),
|
||||
("STRUCTURE", "Structural Analysis", "", "EDITMODE_HLT", 5),
|
||||
("SCHEDULING", "Construction Scheduling", "", "NLA", 6),
|
||||
("FM", "Facility Management", "", "PACKAGE", 7),
|
||||
("OTHER", "Other Utilities", "", "COLLAPSEMENU", 8),
|
||||
("QUALITY", "Quality and Coordination", "", "COMMUNITY", 8),
|
||||
("BLENDER", "Blender Properties", "", "BLENDER", 9),
|
||||
]
|
||||
|
||||
|
||||
@@ -288,13 +288,13 @@ class BIM_PT_root(Panel):
|
||||
"bim.set_tab", text="", emboss=False, icon_value=blenderbim.bim.icons["IFC"].icon_id
|
||||
).tab = "PROJECT"
|
||||
row.operator("bim.set_tab", text="", emboss=False, icon="FILE_3D").tab = "OBJECT"
|
||||
row.operator("bim.set_tab", text="", emboss=False, icon="MATERIAL").tab = "MATERIALS"
|
||||
row.operator("bim.set_tab", text="", emboss=False, icon="MATERIAL").tab = "GEOMETRY"
|
||||
row.operator("bim.set_tab", text="", emboss=False, icon="DOCUMENTS").tab = "DRAWINGS"
|
||||
row.operator("bim.set_tab", text="", emboss=False, icon="NETWORK_DRIVE").tab = "SERVICES"
|
||||
row.operator("bim.set_tab", text="", emboss=False, icon="EDITMODE_HLT").tab = "STRUCTURE"
|
||||
row.operator("bim.set_tab", text="", emboss=False, icon="NLA").tab = "SCHEDULING"
|
||||
row.operator("bim.set_tab", text="", emboss=False, icon="PACKAGE").tab = "FM"
|
||||
row.operator("bim.set_tab", text="", emboss=False, icon="COLLAPSEMENU").tab = "OTHER"
|
||||
row.operator("bim.set_tab", text="", emboss=False, icon="COMMUNITY").tab = "QUALITY"
|
||||
row.operator("bim.set_tab", text="", emboss=False, icon="BLENDER").tab = "BLENDER"
|
||||
row.operator("bim.switch_tab", text="", emboss=False, icon="UV_SYNC_SELECT")
|
||||
|
||||
@@ -304,13 +304,13 @@ class BIM_PT_root(Panel):
|
||||
for tab in [
|
||||
"PROJECT",
|
||||
"OBJECT",
|
||||
"MATERIALS",
|
||||
"GEOMETRY",
|
||||
"DRAWINGS",
|
||||
"SERVICES",
|
||||
"STRUCTURE",
|
||||
"SCHEDULING",
|
||||
"FM",
|
||||
"OTHER",
|
||||
"QUALITY",
|
||||
"BLENDER",
|
||||
"SWITCH",
|
||||
]:
|
||||
@@ -360,11 +360,10 @@ class BIM_PT_collaboration(Panel):
|
||||
bl_space_type = "PROPERTIES"
|
||||
bl_region_type = "WINDOW"
|
||||
bl_context = "scene"
|
||||
bl_options = {"DEFAULT_CLOSED"}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return tool.Blender.is_tab(context, "OTHER")
|
||||
return tool.Blender.is_tab(context, "QUALITY")
|
||||
|
||||
def draw(self, context):
|
||||
pass
|
||||
@@ -390,7 +389,6 @@ class BIM_PT_geometry(Panel):
|
||||
bl_space_type = "PROPERTIES"
|
||||
bl_region_type = "WINDOW"
|
||||
bl_context = "scene"
|
||||
bl_options = {"DEFAULT_CLOSED"}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
@@ -405,7 +403,6 @@ class BIM_PT_4D5D(Panel):
|
||||
bl_space_type = "PROPERTIES"
|
||||
bl_region_type = "WINDOW"
|
||||
bl_context = "scene"
|
||||
bl_options = {"DEFAULT_CLOSED"}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
@@ -420,7 +417,6 @@ class BIM_PT_structural(Panel):
|
||||
bl_space_type = "PROPERTIES"
|
||||
bl_region_type = "WINDOW"
|
||||
bl_context = "scene"
|
||||
bl_options = {"DEFAULT_CLOSED"}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
@@ -435,7 +431,6 @@ class BIM_PT_services(Panel):
|
||||
bl_space_type = "PROPERTIES"
|
||||
bl_region_type = "WINDOW"
|
||||
bl_context = "scene"
|
||||
bl_options = {"DEFAULT_CLOSED"}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
@@ -450,11 +445,10 @@ class BIM_PT_quality_control(Panel):
|
||||
bl_space_type = "PROPERTIES"
|
||||
bl_region_type = "WINDOW"
|
||||
bl_context = "scene"
|
||||
bl_options = {"DEFAULT_CLOSED"}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return tool.Blender.is_tab(context, "OTHER")
|
||||
return tool.Blender.is_tab(context, "QUALITY")
|
||||
|
||||
def draw(self, context):
|
||||
pass
|
||||
@@ -469,7 +463,7 @@ class BIM_PT_integrations(Panel):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return tool.Blender.is_tab(context, "OTHER")
|
||||
return tool.Blender.is_tab(context, "QUALITY")
|
||||
|
||||
def draw(self, context):
|
||||
pass
|
||||
@@ -497,11 +491,10 @@ class BIM_PT_geometry_object(Panel):
|
||||
bl_region_type = "WINDOW"
|
||||
bl_context = "scene"
|
||||
bl_order = 1
|
||||
bl_options = {"DEFAULT_CLOSED"}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return tool.Blender.is_tab(context, "OBJECT") and tool.Ifc.get()
|
||||
return tool.Blender.is_tab(context, "GEOMETRY") and tool.Ifc.get()
|
||||
|
||||
def draw(self, context):
|
||||
pass
|
||||
@@ -513,27 +506,10 @@ class BIM_PT_services_object(Panel):
|
||||
bl_region_type = "WINDOW"
|
||||
bl_context = "scene"
|
||||
bl_order = 1
|
||||
bl_options = {"DEFAULT_CLOSED"}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return tool.Blender.is_tab(context, "OBJECT") and tool.Ifc.get()
|
||||
|
||||
def draw(self, context):
|
||||
pass
|
||||
|
||||
|
||||
class BIM_PT_utilities_object(Panel):
|
||||
bl_label = "Utilities"
|
||||
bl_space_type = "PROPERTIES"
|
||||
bl_region_type = "WINDOW"
|
||||
bl_context = "scene"
|
||||
bl_order = 1
|
||||
bl_options = {"DEFAULT_CLOSED"}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return tool.Blender.is_tab(context, "OBJECT") and tool.Ifc.get()
|
||||
return tool.Blender.is_tab(context, "SERVICES") and tool.Ifc.get()
|
||||
|
||||
def draw(self, context):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user