make exception a bit nicer (since wiki docs dont make much sense how it was before)
authorCampbell Barton <ideasman42@gmail.com>
Mon, 25 Jan 2010 18:09:46 +0000 (18:09 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 25 Jan 2010 18:09:46 +0000 (18:09 +0000)
release/scripts/modules/bpy/ops.py
source/blender/python/intern/bpy_operator.c

index 75976ebf9a1834c9b525c813d42593829ecddea6..971a14208a6b67b3ea7dcb68f9ee4534e70b71a9 100644 (file)
@@ -134,7 +134,7 @@ class bpy_ops_submodule_op(object):
 
     def idname(self):
         # submod.foo -> SUBMOD_OT_foo
-        return self.module.upper() + '_OT_' + self.func
+        return self.module + '.' + self.func
 
     def __call__(self, *args, **kw):
 
index bd7a0a971151d49d273879822dca1511ef7d6482..b98dab1c5c4af0a29e6e0f3937047e1d6c727080 100644 (file)
@@ -66,7 +66,7 @@ static PyObject *pyop_call( PyObject * self, PyObject * args)
        ot= WM_operatortype_exists(opname);
 
        if (ot == NULL) {
-               PyErr_Format( PyExc_SystemError, "_bpy.ops.call: operator \"%s\" could not be found", opname);
+               PyErr_Format( PyExc_SystemError, "Calling operator \"bpy.ops.%s\" error, could not be found", opname);
                return NULL;
        }
        
@@ -79,7 +79,7 @@ static PyObject *pyop_call( PyObject * self, PyObject * args)
        Py_XINCREF(context_dict); /* so we done loose it */
 
        if(WM_operator_poll((bContext*)C, ot) == FALSE) {
-               PyErr_Format( PyExc_SystemError, "_bpy.ops.call: operator %.200s.poll() function failed, context is incorrect", opname);
+               PyErr_Format( PyExc_SystemError, "Operator bpy.ops.%.200s.poll() failed, context is incorrect", opname);
                error_val= -1;
        }
        else {