mirror of https://github.com/AxioDL/metaforce.git
Use empty .blend on create; remove MallocNanoZone workaround
This commit is contained in:
parent
a22a5e9473
commit
62f5617539
|
@ -475,7 +475,8 @@ try:
|
||||||
if len(cmdargs) >= 4:
|
if len(cmdargs) >= 4:
|
||||||
bpy.ops.wm.open_mainfile(filepath=cmdargs[3])
|
bpy.ops.wm.open_mainfile(filepath=cmdargs[3])
|
||||||
else:
|
else:
|
||||||
bpy.ops.wm.read_homefile()
|
bpy.ops.wm.read_homefile(use_empty=True)
|
||||||
|
bpy.context.scene.world = bpy.data.worlds.new('World')
|
||||||
loaded_blend = cmdargs[1]
|
loaded_blend = cmdargs[1]
|
||||||
bpy.context.preferences.filepaths.save_version = 0
|
bpy.context.preferences.filepaths.save_version = 0
|
||||||
if 'FINISHED' in bpy.ops.wm.save_as_mainfile(filepath=cmdargs[1]):
|
if 'FINISHED' in bpy.ops.wm.save_as_mainfile(filepath=cmdargs[1]):
|
||||||
|
|
|
@ -453,11 +453,6 @@ Connection::Connection(int verbosityLevel) {
|
||||||
std::string writefds = fmt::format(FMT_STRING("{}"), m_readpipe[1]);
|
std::string writefds = fmt::format(FMT_STRING("{}"), m_readpipe[1]);
|
||||||
std::string vLevel = fmt::format(FMT_STRING("{}"), verbosityLevel);
|
std::string vLevel = fmt::format(FMT_STRING("{}"), verbosityLevel);
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
// Undocumented flag that makes Blender not crash ¯\_(ツ)_/¯
|
|
||||||
setenv("MallocNanoZone", "1", 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Try user-specified blender first */
|
/* Try user-specified blender first */
|
||||||
if (blenderBin) {
|
if (blenderBin) {
|
||||||
execlp(blenderBin, blenderBin, "--background", "-P", blenderShellPath.c_str(), "--", readfds.c_str(),
|
execlp(blenderBin, blenderBin, "--background", "-P", blenderShellPath.c_str(), "--", readfds.c_str(),
|
||||||
|
|
Loading…
Reference in New Issue