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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-03-23 18:25:33 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-03-23 18:25:33 +0300
commitcb6d2685bd9cc092ef5e1c9bea10bb3a1577d288 (patch)
tree8034f8bac42daa6b91bba1b1fe65dfae26475d71 /source/blender/python
parentd87e7393e33c3b4bd20d4170fde745826c92014f (diff)
rna/py-api fix.
C functions and python used different argument order, this relied on mapping non-keyword arguments to 'REQUIRED' arguments but meant that you could not have an optional, non-keyword argument. next commit will make order of arguments consistant (currently only changed order that rna wrapped). (commit 27674 by Campbell from render25 branch)
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/intern/bpy_rna.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 3f4f707a9bd..4792d284ca7 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -3004,7 +3004,7 @@ static PyObject * pyrna_func_call(PyObject *self, PyObject *args, PyObject *kw)
parm_id= RNA_property_identifier(parm);
item= NULL;
- if ((i < pyargs_len) && (flag & PROP_REQUIRED)) {
+ if (i < pyargs_len) {
item= PyTuple_GET_ITEM(args, i);
i++;
@@ -3049,14 +3049,6 @@ static PyObject * pyrna_func_call(PyObject *self, PyObject *args, PyObject *kw)
RNA_parameter_list_end(&iter);
- /* TODO: arg passing is currently messed up with keyword and args,
- * needs reworking however this should stop annoying problems
- * where args are ignored (for now) */
- if(i != pyargs_len) {
- PyErr_Format(PyExc_TypeError, "%.200s.%.200s(): congratulations, you found a bug in blender. argument %d needs to be a keyword argument until its fixed", RNA_struct_identifier(self_ptr->type), RNA_function_identifier(self_func), i+1);
- err= -1;
- }
-
/* Check if we gave args that dont exist in the function
* printing the error is slow but it should only happen when developing.
* the if below is quick, checking if it passed less keyword args then we gave.