diff options
author | Joshua Leung <aligorith@gmail.com> | 2008-02-14 13:42:53 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2008-02-14 13:42:53 +0300 |
commit | 4339c32c6c3c10f61913ebfce4675aff8b2c4d5b (patch) | |
tree | 584eb5201f6423bada51435f8169aa0803530b85 /source/blender/src/editconstraint.c | |
parent | 4cb91914c97c81f1259174228f0c7c0372498409 (diff) |
Bugfix #8283: PyConstraints menu problems
The menu listing the scripts available for use was not working correctly for newly created PyConstraints. This was caused by a missing initialisation for the 'active' index.
Diffstat (limited to 'source/blender/src/editconstraint.c')
-rw-r--r-- | source/blender/src/editconstraint.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/src/editconstraint.c b/source/blender/src/editconstraint.c index b30fbf47b6a..542b31b1157 100644 --- a/source/blender/src/editconstraint.c +++ b/source/blender/src/editconstraint.c @@ -884,6 +884,10 @@ char *buildmenu_pyconstraints (Text *con_text, int *pyconindex) sprintf(buf, "Scripts: %%t|[None]%%x0|"); BLI_dynstr_append(pupds, buf); + /* init active-index first */ + if (con_text == NULL) + *pyconindex= 0; + /* loop through markers, adding them */ for (text=G.main->text.first, i=1; text; i++, text=text->id.next) { /* this is important to ensure that right script is shown as active */ |