[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31850] trunk/blender/source/blender/ python/intern/bpy_props.c: patch [#23749] IntVectorProperty missing step [ patch]

Campbell Barton ideasman42 at gmail.com
Fri Sep 10 04:46:29 CEST 2010


Revision: 31850
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31850
Author:   campbellbarton
Date:     2010-09-10 04:46:29 +0200 (Fri, 10 Sep 2010)

Log Message:
-----------
patch [#23749] IntVectorProperty missing step [patch]
from Dan Eicher (dna), also edited some comments.

Modified Paths:
--------------
    trunk/blender/source/blender/python/intern/bpy_props.c

Modified: trunk/blender/source/blender/python/intern/bpy_props.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_props.c	2010-09-09 22:39:27 UTC (rev 31849)
+++ trunk/blender/source/blender/python/intern/bpy_props.c	2010-09-10 02:46:29 UTC (rev 31850)
@@ -91,9 +91,9 @@
 static PyObject *pymeth_RemoveProperty = NULL;
 
 
-/* operators use this so it can store the args given but defer running
- * it until the operator runs where these values are used to setup the
- * default args for that operator instance */
+/* operators and classes use this so it can store the args given but defer
+ * running it until the operator runs where these values are used to setup
+ * the default args for that operator instance */
 static PyObject *bpy_prop_deferred_return(PyObject *func, PyObject *kw)
 {
 	PyObject *ret = PyTuple_New(2);
@@ -110,6 +110,8 @@
 	return ret;
 }
 
+/* this define runs at the start of each function and deals with 
+ * returning a deferred property (to be registed later) */
 #define BPY_PROPDEF_HEAD(_func)	\
 	if (PyTuple_GET_SIZE(args) == 1) { \
 		PyObject *ret; \
@@ -350,7 +352,7 @@
 		char *pysubtype= NULL;
 		int subtype= PROP_NONE;
 
-		if (!PyArg_ParseTupleAndKeywords(args, kw, "s|ssOiiiiO!si:IntVectorProperty", (char **)kwlist, &id, &name, &description, &pydef, &min, &max, &soft_min, &soft_max, &PySet_Type, &pyopts, &pysubtype, &size))
+		if (!PyArg_ParseTupleAndKeywords(args, kw, "s|ssOiiiiiO!si:IntVectorProperty", (char **)kwlist, &id, &name, &description, &pydef, &min, &max, &soft_min, &soft_max, &step, &PySet_Type, &pyopts, &pysubtype, &size))
 			return NULL;
 
 		if(RNA_def_property_free_identifier(srna, id) == -1) {
@@ -856,7 +858,6 @@
 	{"PointerProperty", (PyCFunction)BPy_PointerProperty, METH_VARARGS|METH_KEYWORDS, BPy_PointerProperty_doc},
 	{"CollectionProperty", (PyCFunction)BPy_CollectionProperty, METH_VARARGS|METH_KEYWORDS, BPy_CollectionProperty_doc},
 
-	/* only useful as a bpy_struct method */
 	{"RemoveProperty", (PyCFunction)BPy_RemoveProperty, METH_VARARGS|METH_KEYWORDS, BPy_RemoveProperty_doc},
 	{NULL, NULL, 0, NULL}
 };





More information about the Bf-blender-cvs mailing list