Restore file association files removed by accident #5212

This commit is contained in:
Andrej730
2024-08-21 15:11:07 +05:00
parent 38e8130793
commit 1aae710286
4 changed files with 39 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/bin/bash
# Wrapper script to launch BlenderBIM.
# If the `blender` executable can't be found in your PATH environment, set
# BLENDER_EXE to the location of your preferred `blender` executable.
#BLENDER_EXE=/opt/blender-3.3/blender
: ${BLENDER_EXE:=blender}
if [[ $# -eq 1 && -f "$@" ]]; then
"${BLENDER_EXE}" --python-expr 'import bpy; bpy.data.batch_remove(bpy.data.objects); bpy.ops.outliner.orphans_purge(do_local_ids=True, do_linked_ids=True, do_recursive=True); bpy.ops.bim.load_project(filepath="'"$@"'")'
else
"${BLENDER_EXE}" --python-expr 'import bpy; bpy.data.batch_remove(bpy.data.objects); bpy.ops.outliner.orphans_purge(do_local_ids=True, do_linked_ids=True, do_recursive=True); bpy.ops.bim.create_project()'
fi;
@@ -0,0 +1,9 @@
[Desktop Entry]
Type=Application
Terminal=false
Exec=blenderbim %f
Name=BlenderBIM
Icon=blenderbim
X-Desktop-File-Install-Version=0.26
GenericName=Blender BIM add-on
MimeType=application/x-ifc;
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-ifc">
<sub-class-of type="text/plain"/>
<comment xml:lang="en">Industry Foundation Classes</comment>
<magic priority="50">
<match type="string" value="ISO-10303-21;" offset="0"/>
</magic>
<generic-icon name="x-ifc"/>
<glob pattern="*.ifc"/>
<glob pattern="*.ifczip"/>
<glob pattern="*.ifcxml"/>
</mime-type>
</mime-info>