Don't force 'spawn' method, add explanation for workaround

This commit is contained in:
Ellwood Zwovic
2017-08-19 19:05:14 -07:00
parent 1766e1fa6e
commit 85ce4c3bc7

View File

@@ -15,6 +15,10 @@ bl_info = {
import logging
log = logging.getLogger(__name__)
# HACK:
# due to lack of fork() on windows, multiprocessing will re-execute this module
# in a new process. In such cases we only need subproc, everything else is only
# used to spawn the subprocess in the first place.
try:
import bpy
except ImportError:
@@ -50,7 +54,7 @@ else:
from pathlib import Path
from collections import OrderedDict
import multiprocessing
mp_context = multiprocessing.get_context('spawn')
mp_context = multiprocessing.get_context()
mp_context.set_executable(bpy.app.binary_path_python)
# global list of all known packages, indexed by name