mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 05:00:53 +00:00
Rename blenderbim.sh, better initialisation #2399
This commit is contained in:
@@ -9,8 +9,8 @@ install :
|
|||||||
${DESTDIR}/share/icons/hicolor/128x128/mimetypes \
|
${DESTDIR}/share/icons/hicolor/128x128/mimetypes \
|
||||||
${DESTDIR}/share/applications \
|
${DESTDIR}/share/applications \
|
||||||
${DESTDIR}/share/mime/packages
|
${DESTDIR}/share/mime/packages
|
||||||
cp blenderbim.sh ${DESTDIR}/bin/
|
cp blenderbim ${DESTDIR}/bin/
|
||||||
chmod +x ${DESTDIR}/bin/blenderbim.sh
|
chmod +x ${DESTDIR}/bin/blenderbim
|
||||||
cp blenderbim.png ${DESTDIR}/share/icons/hicolor/128x128/apps/
|
cp blenderbim.png ${DESTDIR}/share/icons/hicolor/128x128/apps/
|
||||||
cp blenderbim.desktop ${DESTDIR}/share/applications/
|
cp blenderbim.desktop ${DESTDIR}/share/applications/
|
||||||
cp blenderbim.xml ${DESTDIR}/share/mime/packages/
|
cp blenderbim.xml ${DESTDIR}/share/mime/packages/
|
||||||
@@ -20,7 +20,7 @@ install :
|
|||||||
|
|
||||||
uninstall :
|
uninstall :
|
||||||
rm -f \
|
rm -f \
|
||||||
${DESTDIR}/bin/blenderbim.sh \
|
${DESTDIR}/bin/blenderbim \
|
||||||
${DESTDIR}/share/icons/hicolor/128x128/apps/blenderbim.png \
|
${DESTDIR}/share/icons/hicolor/128x128/apps/blenderbim.png \
|
||||||
${DESTDIR}/share/applications/blenderbim.desktop \
|
${DESTDIR}/share/applications/blenderbim.desktop \
|
||||||
${DESTDIR}/share/mime/packages/blenderbim.xml \
|
${DESTDIR}/share/mime/packages/blenderbim.xml \
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ configure associations and icons for a single user by running `make`:
|
|||||||
Test by running the wrapper script directly, this should launch BlenderBIM with
|
Test by running the wrapper script directly, this should launch BlenderBIM with
|
||||||
an empty IFC project:
|
an empty IFC project:
|
||||||
|
|
||||||
blenderbim.sh
|
blenderbim
|
||||||
|
|
||||||
This `Makefile` installs files to `~/.local` by default, to install to an
|
This `Makefile` installs files to `~/.local` by default, to install to an
|
||||||
alternative location, set `DESTDIR`:
|
alternative location, set `DESTDIR`:
|
||||||
|
|||||||
Executable
+16
@@ -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;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Type=Application
|
Type=Application
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Exec=blenderbim.sh %f
|
Exec=blenderbim %f
|
||||||
Name=BlenderBIM
|
Name=BlenderBIM
|
||||||
Icon=blenderbim
|
Icon=blenderbim
|
||||||
X-Desktop-File-Install-Version=0.26
|
X-Desktop-File-Install-Version=0.26
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
#!/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.collections.remove(bpy.data.collections[0]); bpy.ops.bim.load_project(filepath="'"$@"'")'
|
|
||||||
else
|
|
||||||
"${BLENDER_EXE}" --python-expr 'import bpy; bpy.data.collections.remove(bpy.data.collections[0]); bpy.ops.bim.create_project()'
|
|
||||||
fi;
|
|
||||||
Reference in New Issue
Block a user