Remove deprecated representation item operators in the mesh properties

This commit is contained in:
Dion Moult
2020-09-11 16:33:33 +10:00
parent c6a5bdf4eb
commit 518c3eb6f0
6 changed files with 2 additions and 54 deletions
+2
View File
@@ -243,6 +243,8 @@ endif
cd dist/blenderbim/libs/site/packages/features/steps/ && wget https://raw.githubusercontent.com/IfcOpenShell/IfcOpenShell/v0.6.0/src/ifcbimtester/features/steps/element_classes.py
cd dist/blenderbim/libs/site/packages/features/steps/ && wget https://raw.githubusercontent.com/IfcOpenShell/IfcOpenShell/v0.6.0/src/ifcbimtester/features/steps/geocoding.py
cd dist/blenderbim/libs/site/packages/features/steps/ && wget https://raw.githubusercontent.com/IfcOpenShell/IfcOpenShell/v0.6.0/src/ifcbimtester/features/steps/geolocation.py
cd dist/blenderbim/libs/site/packages/features/steps/ && wget https://raw.githubusercontent.com/IfcOpenShell/IfcOpenShell/v0.6.0/src/ifcbimtester/features/steps/geometric_detail.py
cd dist/blenderbim/libs/site/packages/features/steps/ && wget https://raw.githubusercontent.com/IfcOpenShell/IfcOpenShell/v0.6.0/src/ifcbimtester/features/steps/model_federation.py
cd dist/blenderbim/libs/site/packages/features/steps/ && wget https://raw.githubusercontent.com/IfcOpenShell/IfcOpenShell/v0.6.0/src/ifcbimtester/features/steps/project_setup.py
cd dist/blenderbim/libs/site/packages/features/steps/ && wget https://raw.githubusercontent.com/IfcOpenShell/IfcOpenShell/v0.6.0/src/ifcbimtester/features/steps/steps.py
cd dist/blenderbim/libs/site/packages/features/steps/ && wget https://raw.githubusercontent.com/IfcOpenShell/IfcOpenShell/v0.6.0/src/ifcbimtester/features/steps/utils.py
@@ -133,7 +133,6 @@ if bpy is not None:
operator.SelectClashSource,
operator.ExecuteIfcClash,
operator.SelectIfcClashResults,
operator.AssignContext,
operator.SwitchContext,
operator.RemoveContext,
operator.OpenUpstream,
@@ -295,7 +294,6 @@ if bpy is not None:
ui.BIM_UL_document_references,
ui.BIM_UL_topics,
ui.BIM_UL_classifications,
ui.BIM_UL_representation_items,
ui.BIM_ADDON_preferences,
covetool_prop.CoveToolProject,
covetool_prop.CoveToolSimpleAnalysis,
@@ -953,9 +953,6 @@ class IfcImporter():
mesh['ios_material_ids'] = material_ids
mesh['ios_items'] = representation_items
mesh.BIMMeshProperties.is_native = True
for representation_item in representation_items:
new = mesh.BIMMeshProperties.representation_items.add()
new.name = representation_item['name']
return mesh
def get_representation_item_material_name(self, item):
@@ -2347,35 +2347,6 @@ class ActivateView(bpy.types.Operator):
return {'FINISHED'}
class AssignContext(bpy.types.Operator):
bl_idname = 'bim.assign_context'
bl_label = 'Assign Context'
def execute(self, context):
if not self.is_mesh_context_sensitive(bpy.context.active_object.data.name):
bpy.context.active_object.data.name = '{}/{}/{}/{}'.format(
bpy.context.scene.BIMProperties.available_contexts,
bpy.context.scene.BIMProperties.available_subcontexts,
bpy.context.scene.BIMProperties.available_target_views,
bpy.context.active_object.data.name
)
else:
bpy.context.active_object.data.name = '{}/{}/{}/{}'.format(
bpy.context.scene.BIMProperties.available_contexts,
bpy.context.scene.BIMProperties.available_subcontexts,
bpy.context.scene.BIMProperties.available_target_views,
bpy.context.active_object.data.name.split('/')[3]
)
return {'FINISHED'}
def is_mesh_context_sensitive(self, name):
return '/' in name \
and ( \
name[0:6] == 'Model/' \
or name[0:5] == 'Plan/' \
)
class SwitchContext(bpy.types.Operator):
bl_idname = 'bim.switch_context'
bl_label = 'Switch Context'
@@ -1426,5 +1426,4 @@ class BIMMeshProperties(PropertyGroup):
is_parametric: BoolProperty(name='Is Parametric', default=False)
presentation_layer: StringProperty(name="Presentation Layer")
geometry_type: StringProperty(name="Geometry Type")
representation_items: CollectionProperty(name="Representation Items", type=RepresentationItem)
active_representation_item_index: IntProperty(name='Active Representation Item Index')
-19
View File
@@ -600,22 +600,12 @@ class BIM_PT_mesh(Panel):
layout = self.layout
props = context.active_object.data.BIMMeshProperties
row = layout.row(align=True)
row.prop(bpy.context.scene.BIMProperties, 'available_contexts', text='')
row.prop(bpy.context.scene.BIMProperties, 'available_subcontexts', text='')
row.prop(bpy.context.scene.BIMProperties, 'available_target_views', text='')
row = layout.row()
row.operator('bim.assign_context')
row = layout.row(align=True)
row.operator('bim.push_representation')
row = layout.row()
row.prop(props, 'geometry_type')
layout.template_list('BIM_UL_representation_items', '', props, 'representation_items', props, 'active_representation_item_index')
row = layout.row()
row.prop(props, 'presentation_layer')
@@ -1831,15 +1821,6 @@ class BIM_UL_classifications(bpy.types.UIList):
layout.label(text=itemdata['name'])
class BIM_UL_representation_items(bpy.types.UIList):
def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
ob = data
if item:
layout.prop(item, 'name', text='', emboss=False)
else:
layout.label(text="", translate=False)
class BIM_ADDON_preferences(bpy.types.AddonPreferences):
bl_idname = 'blenderbim'
svg2pdf_command: StringProperty(name="SVG to PDF Command")