Merge branch 'blender-v2.91-release'
This commit is contained in:
commit
83f369a0b9
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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},
|
||||
};
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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},
|
||||
};
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue