[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36395] trunk/blender/source/blender/ python/intern: whitespace edits for bpy api, split some really long lines.
Campbell Barton
ideasman42 at gmail.com
Sat Apr 30 15:58:32 CEST 2011
Revision: 36395
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36395
Author: campbellbarton
Date: 2011-04-30 13:58:31 +0000 (Sat, 30 Apr 2011)
Log Message:
-----------
whitespace edits for bpy api, split some really long lines.
Modified Paths:
--------------
trunk/blender/source/blender/python/intern/bpy_interface.c
trunk/blender/source/blender/python/intern/bpy_library.c
trunk/blender/source/blender/python/intern/bpy_operator.c
trunk/blender/source/blender/python/intern/bpy_props.c
trunk/blender/source/blender/python/intern/bpy_rna.c
trunk/blender/source/blender/python/intern/bpy_rna_anim.c
trunk/blender/source/blender/python/intern/bpy_traceback.c
trunk/blender/source/blender/python/intern/bpy_util.c
Modified: trunk/blender/source/blender/python/intern/bpy_interface.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_interface.c 2011-04-30 13:47:25 UTC (rev 36394)
+++ trunk/blender/source/blender/python/intern/bpy_interface.c 2011-04-30 13:58:31 UTC (rev 36395)
@@ -370,7 +370,9 @@
#endif
}
else {
- PyErr_Format(PyExc_IOError, "Python file \"%s\" could not be opened: %s", fn, strerror(errno));
+ PyErr_Format(PyExc_IOError,
+ "Python file \"%s\" could not be opened: %s",
+ fn, strerror(errno));
py_result= NULL;
}
}
Modified: trunk/blender/source/blender/python/intern/bpy_library.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_library.c 2011-04-30 13:47:25 UTC (rev 36394)
+++ trunk/blender/source/blender/python/intern/bpy_library.c 2011-04-30 13:58:31 UTC (rev 36395)
@@ -230,7 +230,9 @@
if(self->blo_handle == NULL) {
if(BPy_reports_to_error(&reports, PyExc_IOError, TRUE) != -1) {
- PyErr_Format(PyExc_IOError, "load: %s failed to open blend file", self->abspath);
+ PyErr_Format(PyExc_IOError,
+ "load: %s failed to open blend file",
+ self->abspath);
}
return NULL;
}
@@ -301,7 +303,9 @@
if(item_str) {
if(!BLO_library_append_named_part(NULL, mainl, &(self->blo_handle), item_str, code, self->flag)) {
- PyErr_Format(PyExc_KeyError, "load: %s does not contain %s[\"%s\"]", self->abspath, name_plural, item_str);
+ PyErr_Format(PyExc_KeyError,
+ "load: %s does not contain %s[\"%s\"]",
+ self->abspath, name_plural, item_str);
err= -1;
break;
}
Modified: trunk/blender/source/blender/python/intern/bpy_operator.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_operator.c 2011-04-30 13:47:25 UTC (rev 36394)
+++ trunk/blender/source/blender/python/intern/bpy_operator.c 2011-04-30 13:58:31 UTC (rev 36395)
@@ -79,14 +79,19 @@
ot= WM_operatortype_find(opname, TRUE);
if (ot == NULL) {
- PyErr_Format(PyExc_AttributeError, "Polling operator \"bpy.ops.%s\" error, could not be found", opname);
+ PyErr_Format(PyExc_AttributeError,
+ "Polling operator \"bpy.ops.%s\" error, "
+ "could not be found", opname);
return NULL;
}
if(context_str) {
if(RNA_enum_value_from_id(operator_context_items, context_str, &context)==0) {
char *enum_str= BPy_enum_as_string(operator_context_items);
- PyErr_Format(PyExc_TypeError, "Calling operator \"bpy.ops.%s.poll\" error, expected a string enum in (%.200s)", opname, enum_str);
+ PyErr_Format(PyExc_TypeError,
+ "Calling operator \"bpy.ops.%s.poll\" error, "
+ "expected a string enum in (%.200s)",
+ opname, enum_str);
MEM_freeN(enum_str);
return NULL;
}
@@ -96,7 +101,10 @@
context_dict= NULL;
}
else if (!PyDict_Check(context_dict)) {
- PyErr_Format(PyExc_TypeError, "Calling operator \"bpy.ops.%s.poll\" error, custom context expected a dict or None, got a %.200s", opname, Py_TYPE(context_dict)->tp_name);
+ PyErr_Format(PyExc_TypeError,
+ "Calling operator \"bpy.ops.%s.poll\" error, "
+ "custom context expected a dict or None, got a %.200s",
+ opname, Py_TYPE(context_dict)->tp_name);
return NULL;
}
@@ -146,19 +154,27 @@
ot= WM_operatortype_find(opname, TRUE);
if (ot == NULL) {
- PyErr_Format(PyExc_AttributeError, "Calling operator \"bpy.ops.%s\" error, could not be found", opname);
+ PyErr_Format(PyExc_AttributeError,
+ "Calling operator \"bpy.ops.%s\" error, "
+ "could not be found", opname);
return NULL;
}
if(!pyrna_write_check()) {
- PyErr_Format(PyExc_RuntimeError, "Calling operator \"bpy.ops.%s\" error, can't modify blend data in this state (drawing/rendering)", opname);
+ PyErr_Format(PyExc_RuntimeError,
+ "Calling operator \"bpy.ops.%s\" error, "
+ "can't modify blend data in this state (drawing/rendering)",
+ opname);
return NULL;
}
if(context_str) {
if(RNA_enum_value_from_id(operator_context_items, context_str, &context)==0) {
char *enum_str= BPy_enum_as_string(operator_context_items);
- PyErr_Format(PyExc_TypeError, "Calling operator \"bpy.ops.%s\" error, expected a string enum in (%.200s)", opname, enum_str);
+ PyErr_Format(PyExc_TypeError,
+ "Calling operator \"bpy.ops.%s\" error, "
+ "expected a string enum in (%.200s)",
+ opname, enum_str);
MEM_freeN(enum_str);
return NULL;
}
@@ -168,7 +184,10 @@
context_dict= NULL;
}
else if (!PyDict_Check(context_dict)) {
- PyErr_Format(PyExc_TypeError, "Calling operator \"bpy.ops.%s\" error, custom context expected a dict or None, got a %.200s", opname, Py_TYPE(context_dict)->tp_name);
+ PyErr_Format(PyExc_TypeError,
+ "Calling operator \"bpy.ops.%s\" error, "
+ "custom context expected a dict or None, got a %.200s",
+ opname, Py_TYPE(context_dict)->tp_name);
return NULL;
}
@@ -179,7 +198,9 @@
if(WM_operator_poll_context((bContext*)C, ot, context) == FALSE) {
const char *msg= CTX_wm_operator_poll_msg_get(C);
- PyErr_Format(PyExc_RuntimeError, "Operator bpy.ops.%.200s.poll() %.200s", opname, msg ? msg : "failed, context is incorrect");
+ PyErr_Format(PyExc_RuntimeError,
+ "Operator bpy.ops.%.200s.poll() %.200s",
+ opname, msg ? msg : "failed, context is incorrect");
CTX_wm_operator_poll_msg_set(C, NULL); /* better set to NULL else it could be used again */
error_val= -1;
}
@@ -225,7 +246,9 @@
{
/* no props */
if (kw != NULL) {
- PyErr_Format(PyExc_AttributeError, "Operator \"%s\" does not take any args", opname);
+ PyErr_Format(PyExc_AttributeError,
+ "Operator \"%s\" does not take any args",
+ opname);
return NULL;
}
@@ -281,7 +304,9 @@
ot= WM_operatortype_find(opname, TRUE);
if (ot == NULL) {
- PyErr_Format(PyExc_AttributeError, "_bpy.ops.as_string: operator \"%.200s\"could not be found", opname);
+ PyErr_Format(PyExc_AttributeError,
+ "_bpy.ops.as_string: operator \"%.200s\" "
+ "could not be found", opname);
return NULL;
}
Modified: trunk/blender/source/blender/python/intern/bpy_props.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_props.c 2011-04-30 13:47:25 UTC (rev 36394)
+++ trunk/blender/source/blender/python/intern/bpy_props.c 2011-04-30 13:58:31 UTC (rev 36395)
@@ -223,8 +223,14 @@
char *pysubtype= NULL;
int subtype= PROP_NONE;
- if (!PyArg_ParseTupleAndKeywords(args, kw, "s#|ssiO!s:BoolProperty", (char **)kwlist, &id, &id_len, &name, &description, &def, &PySet_Type, &pyopts, &pysubtype))
+ if (!PyArg_ParseTupleAndKeywords(args, kw,
+ "s#|ssiO!s:BoolProperty",
+ (char **)kwlist, &id, &id_len,
+ &name, &description, &def,
+ &PySet_Type, &pyopts, &pysubtype))
+ {
return NULL;
+ }
BPY_PROPDEF_SUBTYPE_CHECK(BoolProperty, property_flag_items, property_subtype_number_items)
@@ -277,8 +283,14 @@
char *pysubtype= NULL;
int subtype= PROP_NONE;
- if (!PyArg_ParseTupleAndKeywords(args, kw, "s#|ssOO!si:BoolVectorProperty", (char **)kwlist, &id, &id_len, &name, &description, &pydef, &PySet_Type, &pyopts, &pysubtype, &size))
+ if (!PyArg_ParseTupleAndKeywords(args, kw,
+ "s#|ssOO!si:BoolVectorProperty",
+ (char **)kwlist, &id, &id_len,
+ &name, &description, &pydef,
+ &PySet_Type, &pyopts, &pysubtype,&size))
+ {
return NULL;
+ }
BPY_PROPDEF_SUBTYPE_CHECK(BoolVectorProperty, property_flag_items, property_subtype_array_items)
@@ -335,8 +347,15 @@
char *pysubtype= NULL;
int subtype= PROP_NONE;
- if (!PyArg_ParseTupleAndKeywords(args, kw, "s#|ssiiiiiiO!s:IntProperty", (char **)kwlist, &id, &id_len, &name, &description, &def, &min, &max, &soft_min, &soft_max, &step, &PySet_Type, &pyopts, &pysubtype))
+ if (!PyArg_ParseTupleAndKeywords(args, kw,
+ "s#|ssiiiiiiO!s:IntProperty",
+ (char **)kwlist, &id, &id_len,
+ &name, &description, &def,
+ &min, &max, &soft_min, &soft_max,
+ &step, &PySet_Type, &pyopts, &pysubtype))
+ {
return NULL;
+ }
BPY_PROPDEF_SUBTYPE_CHECK(IntProperty, property_flag_items, property_subtype_number_items)
@@ -390,8 +409,16 @@
char *pysubtype= NULL;
int subtype= PROP_NONE;
- if (!PyArg_ParseTupleAndKeywords(args, kw, "s#|ssOiiiiiO!si:IntVectorProperty", (char **)kwlist, &id, &id_len, &name, &description, &pydef, &min, &max, &soft_min, &soft_max, &step, &PySet_Type, &pyopts, &pysubtype, &size))
+ if (!PyArg_ParseTupleAndKeywords(args, kw,
+ "s#|ssOiiiiiO!si:IntVectorProperty",
+ (char **)kwlist, &id, &id_len,
+ &name, &description, &pydef,
+ &min, &max, &soft_min, &soft_max,
+ &step, &PySet_Type, &pyopts,
+ &pysubtype, &size))
+ {
return NULL;
+ }
BPY_PROPDEF_SUBTYPE_CHECK(IntVectorProperty, property_flag_items, property_subtype_array_items)
@@ -454,8 +481,16 @@
char *pyunit= NULL;
int unit= PROP_UNIT_NONE;
- if (!PyArg_ParseTupleAndKeywords(args, kw, "s#|ssffffffiO!ss:FloatProperty", (char **)kwlist, &id, &id_len, &name, &description, &def, &min, &max, &soft_min, &soft_max, &step, &precision, &PySet_Type, &pyopts, &pysubtype, &pyunit))
+ if (!PyArg_ParseTupleAndKeywords(args, kw,
+ "s#|ssffffffiO!ss:FloatProperty",
+ (char **)kwlist, &id, &id_len,
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list