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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2007-04-28 03:54:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-04-28 03:54:30 +0400
commit3bd0d2e227276f7350dc72e06a43f23001429047 (patch)
tree7660a384387aafa8fd7b09d659d490f535f53b5a /source
parenta2000b53cd2a8c8b3945c8f457f1189f750c8c98 (diff)
Draw.c - error setting the callback button values when using UIBlock (was not offset)
BPyMesh.py - own dumb error, was using dir as an arg (which is a py keyword) object_drop.py - new script, the first to use UIBlock, it drops objects into terrain, either a group or the active object. on teh Z axis or view axis.
Diffstat (limited to 'source')
-rw-r--r--source/blender/python/api2_2x/Draw.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/Draw.c b/source/blender/python/api2_2x/Draw.c
index 7dbcf79a70c..9ff57f247f1 100644
--- a/source/blender/python/api2_2x/Draw.c
+++ b/source/blender/python/api2_2x/Draw.c
@@ -791,7 +791,11 @@ static void exec_but_callback(PyObject *callback, uiBut *but)
printf("Error, no button type matched.");
}
- PyTuple_SetItem( arg, 0, PyInt_FromLong(but->retval - EXPP_BUTTON_EVENTS_OFFSET) );
+ if (uiblock==NULL)
+ PyTuple_SetItem( arg, 0, PyInt_FromLong(but->retval - EXPP_BUTTON_EVENTS_OFFSET) );
+ else
+ PyTuple_SetItem( arg, 0, PyInt_FromLong(but->retval) );
+
PyTuple_SetItem( arg, 1, pyvalue );
result = PyObject_CallObject( callback, arg );