[Bf-committers] Problems with python menus

Willian Padovani Germano bf-committers@blender.org
Thu, 29 Jul 2004 13:20:46 -0300


Hi Peter, good catch

----- Original Message -----
From: "Peter den Bak" <blender.reply.for.peter@xs4all.nl>
To: <bf-committers@blender.org>
Sent: Thursday, July 29, 2004 10:12 AM
Subject: [Bf-committers] Problems with python menus


> Hi,
>
> Found a problem:
> Start blender press P press ESC, now look at the help menu and the import
> and export scripts.
> There gone.....
>
> Probably has something to do with the game engine reinitializing Python.

Yes, bpython init is done in two steps.  space.c re-inits with
BPY_start_python(), but
didn't call BPY_post_start_python() after it.  After 2.34 we'll test
removing this part of the code, so that normal bpython scripts can access
the game engine api, but for now simply adding the missing command should
solve the problem.

I don't know if this can still be committed, it's already Thursday.  If
there's still time or some developer got an OK to commit some other fix,
diff is at the end of this msg.  BTW: there are two buttons in Blender that
can be used to update the scripts menus, one at the Info window, to the
right of the user pref scripts dir and a menu entry at the Scripts space.

--
Willian, wgermano@ig.com.br
--

Index: source/blender/src/space.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/space.c,v
retrieving revision 1.159
diff -r1.159 space.c
471a472
>  BPY_post_start_python(); /* userpref path and menus init */