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:
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r--source/blender/python/intern/bpy.c2
-rw-r--r--source/blender/python/intern/bpy_interface_atexit.c2
-rw-r--r--source/blender/python/intern/bpy_props.c8
-rw-r--r--source/blender/python/intern/bpy_rna.c2
-rw-r--r--source/blender/python/intern/bpy_rna_anim.c21
-rw-r--r--source/blender/python/intern/bpy_traceback.c2
6 files changed, 12 insertions, 25 deletions
diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c
index b8a83d0588d..8c34699b598 100644
--- a/source/blender/python/intern/bpy.c
+++ b/source/blender/python/intern/bpy.c
@@ -386,7 +386,7 @@ void BPy_init_modules(void)
Py_DECREF(py_modpath);
}
else {
- printf("bpy: couldnt find 'scripts/modules', blender probably wont start.\n");
+ printf("bpy: couldn't find 'scripts/modules', blender probably wont start.\n");
}
/* stand alone utility modules not related to blender directly */
IDProp_Init_Types(); /* not actually a submodule, just types */
diff --git a/source/blender/python/intern/bpy_interface_atexit.c b/source/blender/python/intern/bpy_interface_atexit.c
index 1c48dc1baae..4a43d4e6853 100644
--- a/source/blender/python/intern/bpy_interface_atexit.c
+++ b/source/blender/python/intern/bpy_interface_atexit.c
@@ -36,7 +36,7 @@ static PyObject *bpy_atexit(PyObject *UNUSED(self), PyObject *UNUSED(args), PyOb
/* close down enough of blender at least not to crash */
struct bContext *C = BPy_GetContext();
- WM_exit_ext(C, 0);
+ WM_exit_ex(C, false);
Py_RETURN_NONE;
}
diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c
index ad7d5137ebc..50c61dd0061 100644
--- a/source/blender/python/intern/bpy_props.c
+++ b/source/blender/python/intern/bpy_props.c
@@ -2566,8 +2566,8 @@ PyDoc_STRVAR(BPy_FloatProperty_doc,
".. function:: FloatProperty(name=\"\", "
"description=\"\", "
"default=0.0, "
- "min=sys.float_info.min, max=sys.float_info.max, "
- "soft_min=sys.float_info.min, soft_max=sys.float_info.max, "
+ "min=-3.402823e+38, max=3.402823e+38, "
+ "soft_min=-3.402823e+38, soft_max=3.402823e+38, "
"step=3, "
"precision=2, "
"options={'ANIMATABLE'}, "
@@ -2578,7 +2578,7 @@ PyDoc_STRVAR(BPy_FloatProperty_doc,
"get=None, "
"set=None)\n"
"\n"
- " Returns a new float property definition.\n"
+ " Returns a new float (single precision) property definition.\n"
"\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_NUM_MIN_DOC
" :type min: float\n" BPY_PROPDEF_NUM_MAX_DOC
" :type max: float\n" BPY_PROPDEF_NUM_SOFTMIN_DOC
@@ -2968,7 +2968,7 @@ PyDoc_STRVAR(
" The first three elements of the tuples are mandatory.\n"
"\n"
" :identifier: The identifier is used for Python access.\n"
- " :name: Name for the interace.\n"
+ " :name: Name for the interface.\n"
" :description: Used for documentation and tooltips.\n"
" :icon: An icon string identifier or integer icon value\n"
" (e.g. returned by :class:`bpy.types.UILayout.icon`)\n"
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 734e929fdf4..9a8d8c5ec21 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -1857,7 +1857,7 @@ static int pyrna_py_to_prop(
else {
/* Same as bytes. */
/* XXX, this is suspect, but needed for function calls,
- * need to see if theres a better way. */
+ * need to see if there's a better way. */
if (data) {
*((char **)data) = (char *)param;
}
diff --git a/source/blender/python/intern/bpy_rna_anim.c b/source/blender/python/intern/bpy_rna_anim.c
index 710ae0433e0..fb9454bf108 100644
--- a/source/blender/python/intern/bpy_rna_anim.c
+++ b/source/blender/python/intern/bpy_rna_anim.c
@@ -301,7 +301,7 @@ char pyrna_struct_keyframe_insert_doc[] =
" - ``INSERTKEY_VISUAL`` Insert keyframes based on 'visual transforms'.\n"
" - ``INSERTKEY_XYZ_TO_RGB`` Color for newly added transformation F-Curves (Location, "
"Rotation, Scale) is based on the transform axis.\n"
- " - ``INSERTKEY_REPLACE`` Only replace already exising keyframes.\n"
+ " - ``INSERTKEY_REPLACE`` Only replace already existing keyframes.\n"
" - ``INSERTKEY_AVAILABLE`` Only insert into already existing F-Curves.\n"
" - ``INSERTKEY_CYCLE_AWARE`` Take cyclic extrapolation into account "
"(Cycle-Aware Keying option).\n"
@@ -337,7 +337,6 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb
* strips themselves. These are stored separately or else the properties will
* not have any effect.
*/
- struct Depsgraph *depsgraph = CTX_data_depsgraph(BPy_GetContext());
ReportList reports;
short result = 0;
@@ -357,8 +356,7 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb
NlaStrip *strip = (NlaStrip *)ptr.data;
FCurve *fcu = list_find_fcurve(&strip->fcurves, RNA_property_identifier(prop), index);
- result = insert_keyframe_direct(
- depsgraph, &reports, ptr, prop, fcu, cfra, keytype, NULL, options);
+ result = insert_keyframe_direct(&reports, ptr, prop, fcu, cfra, keytype, NULL, options);
}
else {
BKE_reportf(&reports, RPT_ERROR, "Could not resolve path (%s)", path_full);
@@ -373,25 +371,14 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb
}
else {
ID *id = self->ptr.id.data;
- struct Depsgraph *depsgraph = CTX_data_depsgraph(BPy_GetContext());
ReportList reports;
short result;
BKE_reports_init(&reports, RPT_STORE);
BLI_assert(BKE_id_is_in_global_main(id));
- result = insert_keyframe(G_MAIN,
- depsgraph,
- &reports,
- id,
- NULL,
- group_name,
- path_full,
- index,
- cfra,
- keytype,
- NULL,
- options);
+ result = insert_keyframe(
+ G_MAIN, &reports, id, NULL, group_name, path_full, index, cfra, keytype, NULL, options);
MEM_freeN((void *)path_full);
if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) {
diff --git a/source/blender/python/intern/bpy_traceback.c b/source/blender/python/intern/bpy_traceback.c
index c9c9e4adafb..06d8b645ac7 100644
--- a/source/blender/python/intern/bpy_traceback.c
+++ b/source/blender/python/intern/bpy_traceback.c
@@ -143,7 +143,6 @@ void python_script_error_jump(const char *filepath, int *lineno, int *offset)
/* no traceback available when SyntaxError.
* python has no api's to this. reference parse_syntax_error() from pythonrun.c */
PyErr_NormalizeException(&exception, &value, (PyObject **)&tb);
- PyErr_Restore(exception, value, (PyObject *)tb); /* takes away reference! */
if (value) { /* should always be true */
PyObject *message;
@@ -165,6 +164,7 @@ void python_script_error_jump(const char *filepath, int *lineno, int *offset)
*lineno = -1;
}
}
+ PyErr_Restore(exception, value, (PyObject *)tb); /* takes away reference! */
}
else {
PyErr_NormalizeException(&exception, &value, (PyObject **)&tb);