mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-02 13:04:49 +00:00
Simplify UI for context management
This commit is contained in:
@@ -137,14 +137,6 @@ def getApplicableDocuments(self, context):
|
||||
return documents_enum
|
||||
|
||||
|
||||
def getContexts(self, context):
|
||||
global contexts_enum
|
||||
contexts_enum.clear()
|
||||
for context in export_ifc.IfcExportSettings().contexts:
|
||||
contexts_enum.append((context, context, ''))
|
||||
return contexts_enum
|
||||
|
||||
|
||||
def getSubcontexts(self, context):
|
||||
global subcontexts_enum
|
||||
subcontexts_enum.clear()
|
||||
@@ -168,12 +160,6 @@ class Subcontext(PropertyGroup):
|
||||
target_view: StringProperty(name='Target View')
|
||||
|
||||
|
||||
class Context(PropertyGroup):
|
||||
name: StringProperty(name='Name')
|
||||
foobar: StringProperty(name='foobar')
|
||||
subcontexts: CollectionProperty(name='Subcontexts', type=Subcontext)
|
||||
|
||||
|
||||
class BIMProperties(PropertyGroup):
|
||||
schema_dir: StringProperty(default=os.path.join(cwd ,'schema') + os.path.sep, name="Schema Directory")
|
||||
data_dir: StringProperty(default=os.path.join(cwd, 'data') + os.path.sep, name="Data Directory")
|
||||
@@ -200,8 +186,10 @@ class BIMProperties(PropertyGroup):
|
||||
aggregate_name: StringProperty(name="Aggregate Name")
|
||||
classification: EnumProperty(items=getClassifications, name="Classification", update=refreshReferences)
|
||||
reference: EnumProperty(items=getReferences, name="Reference")
|
||||
contexts: CollectionProperty(name="Contexts", type=Context)
|
||||
available_contexts: EnumProperty(items=getContexts, name="Available Contexts")
|
||||
has_model_context: BoolProperty(name="Has Model Context", default=True)
|
||||
has_plan_context: BoolProperty(name="Has Plan Context", default=False)
|
||||
model_subcontexts: CollectionProperty(name='Model Subcontexts', type=Subcontext)
|
||||
plan_subcontexts: CollectionProperty(name='Plan Subcontexts', type=Subcontext)
|
||||
available_subcontexts: EnumProperty(items=getSubcontexts, name="Available Subcontexts")
|
||||
available_target_views: EnumProperty(items=getTargetViews, name="Available Target Views")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user