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>2018-06-04 10:06:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-04 10:06:14 +0300
commit5b643018348280ee601a20fb9329d5a313c23446 (patch)
treeb2bb37028ac88a655aea37bb7a8b850b84885cea /source/blender/python/generic
parentf6743fcaa4fbccd4bd8a92c44a3cd4bd2d153fd1 (diff)
parent2d3d76693a84224b86eac50729fb5a321753b7e3 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/python/generic')
-rw-r--r--source/blender/python/generic/CMakeLists.txt2
-rw-r--r--source/blender/python/generic/bgl.c8
-rw-r--r--source/blender/python/generic/bgl.h2
-rw-r--r--source/blender/python/generic/blf_py_api.c2
-rw-r--r--source/blender/python/generic/bpy_internal_import.c18
-rw-r--r--source/blender/python/generic/bpy_internal_import.h4
-rw-r--r--source/blender/python/generic/py_capi_utils.c18
7 files changed, 27 insertions, 27 deletions
diff --git a/source/blender/python/generic/CMakeLists.txt b/source/blender/python/generic/CMakeLists.txt
index df611e00d00..77214322b88 100644
--- a/source/blender/python/generic/CMakeLists.txt
+++ b/source/blender/python/generic/CMakeLists.txt
@@ -18,7 +18,7 @@
#
# ***** END GPL LICENSE BLOCK *****
-set(INC
+set(INC
.
../../blenkernel
../../blenlib
diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c
index 1e2837799e3..8f9475822bf 100644
--- a/source/blender/python/generic/bgl.c
+++ b/source/blender/python/generic/bgl.c
@@ -866,7 +866,7 @@ static PyObject *Buffer_slice(Buffer *self, int begin, int end)
{
PyObject *list;
int count;
-
+
if (begin < 0) begin = 0;
if (end > self->dimensions[0]) end = self->dimensions[0];
if (begin > end) begin = end;
@@ -914,11 +914,11 @@ static int Buffer_ass_slice(Buffer *self, int begin, int end, PyObject *seq)
{
PyObject *item;
int count, err = 0;
-
+
if (begin < 0) begin = 0;
if (end > self->dimensions[0]) end = self->dimensions[0];
if (begin > end) begin = end;
-
+
if (!PySequence_Check(seq)) {
PyErr_Format(PyExc_TypeError,
"buffer[:] = value, invalid assignment. "
@@ -934,7 +934,7 @@ static int Buffer_ass_slice(Buffer *self, int begin, int end, PyObject *seq)
"Expected: %d (given: %d)", count, end - begin);
return -1;
}
-
+
for (count = begin; count < end; count++) {
item = PySequence_GetItem(seq, count - begin);
if (item) {
diff --git a/source/blender/python/generic/bgl.h b/source/blender/python/generic/bgl.h
index b27a4d6a0a4..1373c81046b 100644
--- a/source/blender/python/generic/bgl.h
+++ b/source/blender/python/generic/bgl.h
@@ -39,7 +39,7 @@ int BGL_typeSize(int type);
* For Python access to OpenGL functions requiring a pointer.
*/
typedef struct _Buffer {
- PyObject_VAR_HEAD
+ PyObject_VAR_HEAD
PyObject *parent;
int type; /* GL_BYTE, GL_SHORT, GL_INT, GL_FLOAT */
diff --git a/source/blender/python/generic/blf_py_api.c b/source/blender/python/generic/blf_py_api.c
index 02bd1fdbe39..2305d448e04 100644
--- a/source/blender/python/generic/blf_py_api.c
+++ b/source/blender/python/generic/blf_py_api.c
@@ -307,7 +307,7 @@ static PyObject *py_blf_rotation(PyObject *UNUSED(self), PyObject *args)
if (!PyArg_ParseTuple(args, "if:blf.rotation", &fontid, &angle))
return NULL;
-
+
BLF_rotation(fontid, angle);
Py_RETURN_NONE;
diff --git a/source/blender/python/generic/bpy_internal_import.c b/source/blender/python/generic/bpy_internal_import.c
index 750d0c20301..0211e7bd880 100644
--- a/source/blender/python/generic/bpy_internal_import.c
+++ b/source/blender/python/generic/bpy_internal_import.c
@@ -177,7 +177,7 @@ PyObject *bpy_text_import_name(const char *name, int *found)
int namelen = strlen(name);
//XXX Main *maggie = bpy_import_main ? bpy_import_main:G.main;
Main *maggie = bpy_import_main;
-
+
*found = 0;
if (!maggie) {
@@ -210,7 +210,7 @@ PyObject *bpy_text_import_name(const char *name, int *found)
return NULL;
else
*found = 1;
-
+
return bpy_text_import(text);
}
@@ -226,14 +226,14 @@ PyObject *bpy_text_reimport(PyObject *module, int *found)
const char *filepath;
//XXX Main *maggie = bpy_import_main ? bpy_import_main:G.main;
Main *maggie = bpy_import_main;
-
+
if (!maggie) {
printf("ERROR: bpy_import_main_set() was not called before running python. this is a bug.\n");
return NULL;
}
-
+
*found = 0;
-
+
/* get name, filename from the module itself */
if ((name = PyModule_GetName(module)) == NULL)
return NULL;
@@ -288,15 +288,15 @@ static PyObject *blender_import(PyObject *UNUSED(self), PyObject *args, PyObject
/* import existing builtin modules or modules that have been imported already */
newmodule = PyImport_ImportModuleLevel(name, globals, locals, fromlist, level);
-
+
if (newmodule)
return newmodule;
-
+
PyErr_Fetch(&exception, &err, &tb); /* get the python error in case we cant import as blender text either */
-
+
/* importing from existing modules failed, see if we have this module as blender text */
newmodule = bpy_text_import_name(name, &found);
-
+
if (newmodule) { /* found module as blender text, ignore above exception */
PyErr_Clear();
Py_XDECREF(exception);
diff --git a/source/blender/python/generic/bpy_internal_import.h b/source/blender/python/generic/bpy_internal_import.h
index f11571fb933..8de1436ed48 100644
--- a/source/blender/python/generic/bpy_internal_import.h
+++ b/source/blender/python/generic/bpy_internal_import.h
@@ -1,4 +1,4 @@
-/*
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -47,7 +47,7 @@ bool bpy_text_compile(struct Text *text);
PyObject *bpy_text_import(struct Text *text);
PyObject *bpy_text_import_name(const char *name, int *found);
PyObject *bpy_text_reimport(PyObject *module, int *found);
-/* void bpy_text_clear_modules(int clear_all);*/ /* Clear user modules */
+/* void bpy_text_clear_modules(int clear_all);*/ /* Clear user modules */
void bpy_text_filename_get(char *fn, size_t fn_len, struct Text *text);
diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c
index 6f265b2ae87..22646462163 100644
--- a/source/blender/python/generic/py_capi_utils.c
+++ b/source/blender/python/generic/py_capi_utils.c
@@ -295,7 +295,7 @@ void PyC_LineSpit(void)
PyErr_Clear();
PyC_FileAndNum(&filename, &lineno);
-
+
fprintf(stderr, "%s:%d\n", filename, lineno);
}
@@ -317,7 +317,7 @@ void PyC_StackSpit(void)
void PyC_FileAndNum(const char **filename, int *lineno)
{
PyFrameObject *frame;
-
+
if (filename) *filename = NULL;
if (lineno) *lineno = -1;
@@ -375,22 +375,22 @@ PyObject *PyC_Object_GetAttrStringArgs(PyObject *o, Py_ssize_t n, ...)
Py_ssize_t i;
PyObject *item = o;
const char *attr;
-
+
va_list vargs;
va_start(vargs, n);
for (i = 0; i < n; i++) {
attr = va_arg(vargs, char *);
item = PyObject_GetAttrString(item, attr);
-
- if (item)
+
+ if (item)
Py_DECREF(item);
else /* python will set the error value here */
break;
-
+
}
va_end(vargs);
-
+
Py_XINCREF(item); /* final value has is increfed, to match PyObject_GetAttrString */
return item;
}
@@ -839,7 +839,7 @@ void PyC_RunQuicky(const char *filepath, int n, ...)
}
}
va_end(vargs);
-
+
/* set the value so we can access it */
PyDict_SetItemString(py_dict, "values", values);
Py_DECREF(values);
@@ -865,7 +865,7 @@ void PyC_RunQuicky(const char *filepath, int n, ...)
for (i = 0; i * 2 < n; i++) {
const char *format = va_arg(vargs, char *);
void *ptr = va_arg(vargs, void *);
-
+
PyObject *item;
PyObject *item_new;
/* prepend the string formatting and remake the tuple */