Created
June 16, 2020 11:24
-
-
Save naotohori/2f63adbe0f45905cc9b5abe17f349cba to your computer and use it in GitHub Desktop.
any difference between save_as_mainfile and save_mainfile?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
bpy.data.objects['Cube'].select_set(True) | |
bpy.ops.object.delete() | |
#bpy.ops.wm.save_as_mainfile(filepath='A_new_world_without_the_cube.blend') | |
# This returns an error | |
# "ERROR (bke.bpath): /home/sources/buildbot-x86_64-slave/linux_glibc217_x86_64_cmake/blender.git/source/blender/blenkernel/intern/bpath.c:233 BKE_bpath_relative_convert: basedir='', this is a bug" | |
# although it can successfully generates a file and finishes. | |
bpy.ops.wm.save_mainfile(filepath='A_new_world_without_the_cube.blend') | |
# This one does not return the error. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you! not sure why, but it works