diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-03-22 12:30:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-03-22 12:30:00 +0300 |
commit | 1e9bf0cfdb6c925b28af6f0330467e7d9d798c05 (patch) | |
tree | c8356d8bc812dc6e3f23b9c381e94ec4c9d4c879 /source/blender/python/intern | |
parent | 9b2dd9aac65aa49c05176bb8b7aabde9fe1aeeac (diff) |
spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text)
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r-- | source/blender/python/intern/bpy.c | 20 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_array.c | 6 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_driver.c | 14 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_props.c | 22 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 22 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_util.h | 6 |
6 files changed, 45 insertions, 45 deletions
diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c index 1a75406d6c1..3f8daec0161 100644 --- a/source/blender/python/intern/bpy.c +++ b/source/blender/python/intern/bpy.c @@ -52,23 +52,23 @@ static char bpy_home_paths_doc[] = PyObject *bpy_home_paths(PyObject *self, PyObject *args) { - PyObject *ret= PyTuple_New(3); - char *path; - char *subfolder= ""; + PyObject *ret= PyTuple_New(3); + char *path; + char *subfolder= ""; if (!PyArg_ParseTuple(args, "|s:blender_homes", &subfolder)) return NULL; - path= BLI_gethome_folder(subfolder, BLI_GETHOME_SYSTEM); - PyTuple_SET_ITEM(ret, 0, PyUnicode_FromString(path?path:"")); + path= BLI_gethome_folder(subfolder, BLI_GETHOME_SYSTEM); + PyTuple_SET_ITEM(ret, 0, PyUnicode_FromString(path?path:"")); - path= BLI_gethome_folder(subfolder, BLI_GETHOME_LOCAL); - PyTuple_SET_ITEM(ret, 1, PyUnicode_FromString(path?path:"")); + path= BLI_gethome_folder(subfolder, BLI_GETHOME_LOCAL); + PyTuple_SET_ITEM(ret, 1, PyUnicode_FromString(path?path:"")); - path= BLI_gethome_folder(subfolder, BLI_GETHOME_USER); - PyTuple_SET_ITEM(ret, 2, PyUnicode_FromString(path?path:"")); + path= BLI_gethome_folder(subfolder, BLI_GETHOME_USER); + PyTuple_SET_ITEM(ret, 2, PyUnicode_FromString(path?path:"")); - return ret; + return ret; } static PyMethodDef meth_bpy_home_paths[] = {{ "home_paths", (PyCFunction)bpy_home_paths, METH_VARARGS, bpy_home_paths_doc}}; diff --git a/source/blender/python/intern/bpy_array.c b/source/blender/python/intern/bpy_array.c index a20a7f54e22..9ceba4ae004 100644 --- a/source/blender/python/intern/bpy_array.c +++ b/source/blender/python/intern/bpy_array.c @@ -34,15 +34,15 @@ typedef void (*RNA_SetIndexFunc)(PointerRNA *, PropertyRNA *, int index, void *) /* arr[3][4][5] - 0 1 2 <- dimension index + 0 1 2 <- dimension index */ /* arr[2] = x py_to_array_index(arraydim=0, arrayoffset=0, index=2) - validate_array(lvalue_dim=0) - ... make real index ... + validate_array(lvalue_dim=0) + ... make real index ... */ /* arr[3]=x, self->arraydim is 0, lvalue_dim is 1 */ diff --git a/source/blender/python/intern/bpy_driver.c b/source/blender/python/intern/bpy_driver.c index eab4d352225..00ea556792e 100644 --- a/source/blender/python/intern/bpy_driver.c +++ b/source/blender/python/intern/bpy_driver.c @@ -271,11 +271,11 @@ float BPY_pydriver_eval (ChannelDriver *driver) PyGILState_Release(gilstate); - if(finite(result)) { - return (float)result; - } - else { - fprintf(stderr, "\tBPY_pydriver_eval() - driver '%s' evaluates to '%f'\n", dvar->name, result); - return 0.0f; - } + if(finite(result)) { + return (float)result; + } + else { + fprintf(stderr, "\tBPY_pydriver_eval() - driver '%s' evaluates to '%f'\n", dvar->name, result); + return 0.0f; + } } diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index c23ff2f2951..85935c05cb1 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -111,7 +111,7 @@ PyObject *BPy_BoolProperty(PyObject *self, PyObject *args, PyObject *kw) StructRNA *srna; if (PyTuple_GET_SIZE(args) > 0) { - PyErr_SetString(PyExc_ValueError, "all args must be keywords"); + PyErr_SetString(PyExc_ValueError, "all args must be keywords"); return NULL; } @@ -177,7 +177,7 @@ PyObject *BPy_BoolVectorProperty(PyObject *self, PyObject *args, PyObject *kw) StructRNA *srna; if (PyTuple_GET_SIZE(args) > 0) { - PyErr_SetString(PyExc_ValueError, "all args must be keywords"); + PyErr_SetString(PyExc_ValueError, "all args must be keywords"); return NULL; } @@ -254,7 +254,7 @@ PyObject *BPy_IntProperty(PyObject *self, PyObject *args, PyObject *kw) StructRNA *srna; if (PyTuple_GET_SIZE(args) > 0) { - PyErr_SetString(PyExc_ValueError, "all args must be keywords"); + PyErr_SetString(PyExc_ValueError, "all args must be keywords"); return NULL; } @@ -321,7 +321,7 @@ PyObject *BPy_IntVectorProperty(PyObject *self, PyObject *args, PyObject *kw) StructRNA *srna; if (PyTuple_GET_SIZE(args) > 0) { - PyErr_SetString(PyExc_ValueError, "all args must be keywords"); + PyErr_SetString(PyExc_ValueError, "all args must be keywords"); return NULL; } @@ -402,7 +402,7 @@ PyObject *BPy_FloatProperty(PyObject *self, PyObject *args, PyObject *kw) StructRNA *srna; if (PyTuple_GET_SIZE(args) > 0) { - PyErr_SetString(PyExc_ValueError, "all args must be keywords"); + PyErr_SetString(PyExc_ValueError, "all args must be keywords"); return NULL; } @@ -477,7 +477,7 @@ PyObject *BPy_FloatVectorProperty(PyObject *self, PyObject *args, PyObject *kw) StructRNA *srna; if (PyTuple_GET_SIZE(args) > 0) { - PyErr_SetString(PyExc_ValueError, "all args must be keywords"); + PyErr_SetString(PyExc_ValueError, "all args must be keywords"); return NULL; } @@ -555,7 +555,7 @@ PyObject *BPy_StringProperty(PyObject *self, PyObject *args, PyObject *kw) StructRNA *srna; if (PyTuple_GET_SIZE(args) > 0) { - PyErr_SetString(PyExc_ValueError, "all args must be keywords"); + PyErr_SetString(PyExc_ValueError, "all args must be keywords"); return NULL; } @@ -667,7 +667,7 @@ PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw) StructRNA *srna; if (PyTuple_GET_SIZE(args) > 0) { - PyErr_SetString(PyExc_ValueError, "all args must be keywords"); + PyErr_SetString(PyExc_ValueError, "all args must be keywords"); return NULL; } @@ -731,7 +731,7 @@ static StructRNA *pointer_type_from_py(PyObject *value, const char *error_prefix } if(!RNA_struct_is_a(srna, &RNA_IDPropertyGroup)) { - PyErr_Format(PyExc_SystemError, "%.200s expected an RNA type derived from IDPropertyGroup", error_prefix); + PyErr_Format(PyExc_SystemError, "%.200s expected an RNA type derived from IDPropertyGroup", error_prefix); return NULL; } @@ -752,7 +752,7 @@ PyObject *BPy_PointerProperty(PyObject *self, PyObject *args, PyObject *kw) StructRNA *srna; if (PyTuple_GET_SIZE(args) > 0) { - PyErr_SetString(PyExc_ValueError, "all args must be keywords"); + PyErr_SetString(PyExc_ValueError, "all args must be keywords"); return NULL; } @@ -813,7 +813,7 @@ PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject *kw) StructRNA *srna; if (PyTuple_GET_SIZE(args) > 0) { - PyErr_SetString(PyExc_ValueError, "all args must be keywords"); + PyErr_SetString(PyExc_ValueError, "all args must be keywords"); return NULL; } diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index dcbdc6d64d4..55b4d52ddf4 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -2030,8 +2030,8 @@ static PyObject *pyrna_struct_getattro( BPy_StructRNA *self, PyObject *pyname ) } } else if ((prop = RNA_struct_find_property(&self->ptr, name))) { - ret = pyrna_prop_to_py(&self->ptr, prop); - } + ret = pyrna_prop_to_py(&self->ptr, prop); + } /* RNA function only if callback is declared (no optional functions) */ else if ((func = RNA_struct_find_function(&self->ptr, name)) && RNA_function_defined(func)) { ret = pyrna_func_to_py((BPy_DummyPointerRNA *)self, func); @@ -3903,19 +3903,19 @@ StructRNA *pyrna_struct_as_srna(PyObject *self, int parent, const char *error_pr } if(py_srna==NULL) { - PyErr_Format(PyExc_SystemError, "%.200s internal error, self of type '%.200s' had no bl_rna attribute, should never happen", error_prefix, Py_TYPE(self)->tp_name); + PyErr_Format(PyExc_SystemError, "%.200s internal error, self of type '%.200s' had no bl_rna attribute, should never happen", error_prefix, Py_TYPE(self)->tp_name); return NULL; } if(!BPy_StructRNA_Check(py_srna)) { - PyErr_Format(PyExc_SystemError, "%.200s internal error, bl_rna was of type '%.200s', instead of %.200s instance", error_prefix, Py_TYPE(py_srna)->tp_name, pyrna_struct_Type.tp_name); - Py_DECREF(py_srna); + PyErr_Format(PyExc_SystemError, "%.200s internal error, bl_rna was of type '%.200s', instead of %.200s instance", error_prefix, Py_TYPE(py_srna)->tp_name, pyrna_struct_Type.tp_name); + Py_DECREF(py_srna); return NULL; } if(py_srna->ptr.type != &RNA_Struct) { PyErr_Format(PyExc_SystemError, "%.200s internal error, bl_rna was not a RNA_Struct type of rna struct", error_prefix); - Py_DECREF(py_srna); + Py_DECREF(py_srna); return NULL; } @@ -4441,12 +4441,12 @@ PyObject *pyrna_basetype_register(PyObject *self, PyObject *py_class) PyObject *item; const char *identifier= ""; - if(PyDict_GetItemString(((PyTypeObject*)py_class)->tp_dict, "bl_rna")) { + if(PyDict_GetItemString(((PyTypeObject*)py_class)->tp_dict, "bl_rna")) { PyErr_SetString(PyExc_AttributeError, "bpy.types.register(...): already registered as a subclass."); return NULL; - } + } - /* warning: gets parent classes srna, only for the register function */ + /* warning: gets parent classes srna, only for the register function */ srna= pyrna_struct_as_srna(py_class, 1, "bpy.types.register(...):"); if(srna==NULL) return NULL; @@ -4513,10 +4513,10 @@ PyObject *pyrna_basetype_unregister(PyObject *self, PyObject *py_class) StructUnregisterFunc unreg; StructRNA *srna; - /*if(PyDict_GetItemString(((PyTypeObject*)py_class)->tp_dict, "bl_rna")==NULL) { + /*if(PyDict_GetItemString(((PyTypeObject*)py_class)->tp_dict, "bl_rna")==NULL) { PyErr_SetString(PyExc_ValueError, "bpy.types.unregister(): not a registered as a subclass."); return NULL; - }*/ + }*/ srna= pyrna_struct_as_srna(py_class, 0, "bpy.types.unregister(...):"); if(srna==NULL) diff --git a/source/blender/python/intern/bpy_util.h b/source/blender/python/intern/bpy_util.h index 10cd6ba010b..e7e7bb09419 100644 --- a/source/blender/python/intern/bpy_util.h +++ b/source/blender/python/intern/bpy_util.h @@ -50,9 +50,9 @@ PyObject *PyObject_GetAttrStringArgs(PyObject *o, Py_ssize_t n, ...); /* Class type checking, use for checking classes can be added as operators, panels etc */ typedef struct BPY_class_attr_check { const char *name; /* name of the class attribute */ - char type; /* 's' = string, 'f' = function, 'l' = list, (add as needed) */ - int arg_count; /* only for function types, -1 for undefined, includes self arg */ - int len; /* only for string types currently */ + char type; /* 's' = string, 'f' = function, 'l' = list, (add as needed) */ + int arg_count; /* only for function types, -1 for undefined, includes self arg */ + int len; /* only for string types currently */ int flag; /* other options */ } BPY_class_attr_check; |