Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-10-29 03:29:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-10-29 03:29:13 +0300
commit83f369a0b917fbf4e554d65c1d28eaa67f5a96de (patch)
treebdc33d505ed2b18c4c5078ed5d24e1150721492b
parentcac8a7cddb56a654145ed1c9db2add8abff12704 (diff)
parent52b38d9c3d84485385d5bc2e58f16c5acfaca9b7 (diff)
Merge branch 'blender-v2.91-release'
-rw-r--r--release/scripts/modules/sys_info.py4
-rw-r--r--release/scripts/startup/bl_ui/space_dopesheet.py8
-rw-r--r--release/scripts/startup/bl_ui/space_nla.py8
-rw-r--r--source/blender/editors/space_action/action_edit.c8
-rw-r--r--source/blender/editors/space_graph/graph_edit.c10
-rw-r--r--source/blender/editors/space_nla/nla_edit.c8
-rw-r--r--source/blender/python/intern/bpy_interface.c23
7 files changed, 45 insertions, 24 deletions
diff --git a/release/scripts/modules/sys_info.py b/release/scripts/modules/sys_info.py
index fc3ffe4dd88..cb80529f0f3 100644
--- a/release/scripts/modules/sys_info.py
+++ b/release/scripts/modules/sys_info.py
@@ -82,10 +82,10 @@ def write_sysinfo(filepath):
output.write("\t%r\n" % p)
output.write(title("Python (External Binary)"))
- output.write("binary path: %s\n" % prepr(bpy.app.binary_path_python))
+ output.write("binary path: %s\n" % prepr(sys.executable))
try:
py_ver = prepr(subprocess.check_output([
- bpy.app.binary_path_python,
+ sys.executable,
"--version",
]).strip())
except Exception as e:
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index 5e53eec4ae6..9a716621b08 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -668,10 +668,10 @@ class DOPESHEET_MT_snap_pie(Menu):
layout = self.layout
pie = layout.menu_pie()
- pie.operator("action.snap", text="Current Frame").type = 'CFRA'
- pie.operator("action.snap", text="Nearest Frame").type = 'NEAREST_FRAME'
- pie.operator("action.snap", text="Nearest Second").type = 'NEAREST_SECOND'
- pie.operator("action.snap", text="Nearest Marker").type = 'NEAREST_MARKER'
+ pie.operator("action.snap", text="Selection to Current Frame").type = 'CFRA'
+ pie.operator("action.snap", text="Selection to Nearest Frame").type = 'NEAREST_FRAME'
+ pie.operator("action.snap", text="Selection to Nearest Second").type = 'NEAREST_SECOND'
+ pie.operator("action.snap", text="Selection to Nearest Marker").type = 'NEAREST_MARKER'
class LayersDopeSheetPanel:
diff --git a/release/scripts/startup/bl_ui/space_nla.py b/release/scripts/startup/bl_ui/space_nla.py
index 4ecc4e7fdd9..d472352084c 100644
--- a/release/scripts/startup/bl_ui/space_nla.py
+++ b/release/scripts/startup/bl_ui/space_nla.py
@@ -241,10 +241,10 @@ class NLA_MT_snap_pie(Menu):
layout = self.layout
pie = layout.menu_pie()
- pie.operator("nla.snap", text="Current Frame").type = 'CFRA'
- pie.operator("nla.snap", text="Nearest Frame").type = 'NEAREST_FRAME'
- pie.operator("nla.snap", text="Nearest Second").type = 'NEAREST_SECOND'
- pie.operator("nla.snap", text="Nearest Marker").type = 'NEAREST_MARKER'
+ pie.operator("nla.snap", text="Selection to Current Frame").type = 'CFRA'
+ pie.operator("nla.snap", text="Selection to Nearest Frame").type = 'NEAREST_FRAME'
+ pie.operator("nla.snap", text="Selection to Nearest Second").type = 'NEAREST_SECOND'
+ pie.operator("nla.snap", text="Selection to Nearest Marker").type = 'NEAREST_MARKER'
class NLA_MT_context_menu(Menu):
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index e14e78912d7..f058ec5546a 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -1696,23 +1696,23 @@ static const EnumPropertyItem prop_actkeys_snap_types[] = {
{ACTKEYS_SNAP_CFRA,
"CFRA",
0,
- "Current Frame",
+ "Selection to Current Frame",
"Snap selected keyframes to the current frame"},
{ACTKEYS_SNAP_NEAREST_FRAME,
"NEAREST_FRAME",
0,
- "Nearest Frame",
+ "Selection to Nearest Frame",
"Snap selected keyframes to the nearest (whole) frame (use to fix accidental sub-frame "
"offsets)"},
{ACTKEYS_SNAP_NEAREST_SECOND,
"NEAREST_SECOND",
0,
- "Nearest Second",
+ "Selection to Nearest Second",
"Snap selected keyframes to the nearest second"},
{ACTKEYS_SNAP_NEAREST_MARKER,
"NEAREST_MARKER",
0,
- "Nearest Marker",
+ "Selection to Nearest Marker",
"Snap selected keyframes to the nearest marker"},
{0, NULL, 0, NULL, NULL},
};
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 753e41b7ec7..0f3dda6f905 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -2956,28 +2956,28 @@ static const EnumPropertyItem prop_graphkeys_snap_types[] = {
{GRAPHKEYS_SNAP_CFRA,
"CFRA",
0,
- "Current Frame",
+ "Selection to Current Frame",
"Snap selected keyframes to the current frame"},
{GRAPHKEYS_SNAP_VALUE,
"VALUE",
0,
- "Cursor Value",
+ "Selection to Cursor Value",
"Set values of selected keyframes to the cursor value (Y/Horizontal component)"},
{GRAPHKEYS_SNAP_NEAREST_FRAME,
"NEAREST_FRAME",
0,
- "Nearest Frame",
+ "Selection to Nearest Frame",
"Snap selected keyframes to the nearest (whole) frame (use to fix accidental sub-frame "
"offsets)"},
{GRAPHKEYS_SNAP_NEAREST_SECOND,
"NEAREST_SECOND",
0,
- "Nearest Second",
+ "Selection to Nearest Second",
"Snap selected keyframes to the nearest second"},
{GRAPHKEYS_SNAP_NEAREST_MARKER,
"NEAREST_MARKER",
0,
- "Nearest Marker",
+ "Selection to Nearest Marker",
"Snap selected keyframes to the nearest marker"},
{GRAPHKEYS_SNAP_HORIZONTAL,
"HORIZONTAL",
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index fa27a6941ec..ed8e5ad76e9 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -2158,12 +2158,12 @@ void NLA_OT_clear_scale(wmOperatorType *ot)
/* defines for snap keyframes tool */
static const EnumPropertyItem prop_nlaedit_snap_types[] = {
- {NLAEDIT_SNAP_CFRA, "CFRA", 0, "Current Frame", ""},
+ {NLAEDIT_SNAP_CFRA, "CFRA", 0, "Selection to Current Frame", ""},
/* XXX as single entry? */
- {NLAEDIT_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", ""},
+ {NLAEDIT_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Selection to Nearest Frame", ""},
/* XXX as single entry? */
- {NLAEDIT_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", ""},
- {NLAEDIT_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Nearest Marker", ""},
+ {NLAEDIT_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Selection to Nearest Second", ""},
+ {NLAEDIT_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Selection to Nearest Marker", ""},
{0, NULL, 0, NULL, NULL},
};
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index e3afe49b22f..bff8f0582c4 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -306,7 +306,11 @@ void BPY_python_start(bContext *C, int argc, const char **argv)
PyThreadState *py_tstate = NULL;
const char *py_path_bundle = BKE_appdir_folder_id(BLENDER_SYSTEM_PYTHON, NULL);
- /* Not essential but nice to set our name. */
+ /* Needed for Python's initialization for portable Python installations.
+ * We could use #Py_SetPath, but this overrides Python's internal logic
+ * for calculating it's own module search paths.
+ *
+ * `sys.executable` is overwritten after initialization to the Python binary. */
{
const char *program_path = BKE_appdir_program_path();
wchar_t program_path_wchar[FILE_MAX];
@@ -353,6 +357,23 @@ void BPY_python_start(bContext *C, int argc, const char **argv)
Py_DECREF(py_argv);
}
+ /* Setting the program name is important so the 'multiprocessing' module
+ * can launch new Python instances. */
+ {
+ char program_path[FILE_MAX];
+ if (BKE_appdir_program_python_search(
+ program_path, sizeof(program_path), PY_MAJOR_VERSION, PY_MINOR_VERSION)) {
+ PyObject *py_program_path = PyC_UnicodeFromByte(program_path);
+ PySys_SetObject("executable", py_program_path);
+ Py_DECREF(py_program_path);
+ }
+ else {
+ fprintf(stderr,
+ "Unable to find the python binary, "
+ "the multiprocessing module may not be functional!\n");
+ }
+ }
+
# ifdef WITH_FLUID
/* Required to prevent assertion error, see:
* https://stackoverflow.com/questions/27844676 */