Revision: 15125
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15125
Author: campbellbarton
Date: 2008-06-05 00:32:15 +0200 (Thu, 05 Jun 2008)
Log Message:
-----------
numbutton python expression evaluation used driver dictionary, when
EnableScriptlinks was disabled number
button input didnt
work. narrow down this test to the part of the pydriver module init that uses a
blender textblock as a module. This should
should reload the pydriver dict whenever the "EnableScriptlinks" state changes.
but for now working numbuttons is priority.
Modified Paths:
--------------
trunk/blender/source/blender/python/BPY_interface.c
Modified: trunk/blender/source/blender/python/BPY_interface.c
===================================================================
--- trunk/blender/source/blender/python/BPY_interface.c 2008-06-04 21:29:47 UTC
(rev 15124)
+++ trunk/blender/source/blender/python/BPY_interface.c 2008-06-04 22:32:15 UTC
(rev 15125)
@@ -1222,7 +1222,7 @@
{
PyObject *d, *mod;
- if (bpy_pydriver_Dict || (G.f&G_DOSCRIPTLINKS)==0) return -1;
+ if (bpy_pydriver_Dict) return -1;
d = PyDict_New();
if (!d) return -1;
@@ -1259,15 +1259,16 @@
/* If there's a Blender text called pydrivers.py, import it.
* Users can add their own functions to this module. */
- mod = importText("pydrivers"); /* can also use PyImport_Import() */
- if (mod) {
- PyDict_SetItemString(d, "pydrivers", mod);
- PyDict_SetItemString(d, "p", mod);
- Py_DECREF(mod);
+ if (G.f&G_DOSCRIPTLINKS) {
+ mod = importText("pydrivers"); /* can also use
PyImport_Import() */
+ if (mod) {
+ PyDict_SetItemString(d, "pydrivers", mod);
+ PyDict_SetItemString(d, "p", mod);
+ Py_DECREF(mod);
+ } else {
+ PyErr_Clear();
+ }
}
- else
- PyErr_Clear();
-
/* short aliases for some Get() functions: */
/* ob(obname) == Blender.Object.Get(obname) */
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs