mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
Linux escape double-quotes in filenames #6630
Special chars ('#{)$ were already escaped, but " wasn't
This commit is contained in:
@@ -9,8 +9,11 @@
|
||||
|
||||
: ${BLENDER_EXE:=blender}
|
||||
|
||||
|
||||
ESCAPED_FILEPATH="${@//\"/\\\"}"
|
||||
|
||||
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="'"$@"'")'
|
||||
"${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="'"${ESCAPED_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;
|
||||
|
||||
Reference in New Issue
Block a user