diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2004-01-27 06:34:16 +0300 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2004-01-27 06:34:16 +0300 |
commit | 33dd2f5e0d58427d49f9bdbd3a593af5a9cc6302 (patch) | |
tree | 59fc8dcdd2617c78f6a69dbd88ee578dbe44a63d /source/blender/python/BPY_interface.c | |
parent | d482d34ffb7ec92b63a5ffb1fa3237da720cc928 (diff) |
BPython:
- as proposed by Ton, default dir for menu enabled scripts is:
userhome/.blender/scripts if available or (using bprogname -- argv[0]),
blenderInstallationDir/.blender/scripts/ otherwise.
- moved a piece of code from BPY_interface.c to BPY_menus.c to get rid
of a linkage warning reported by J. Walton
-- added the first scripts to release/scripts:
We need time to get more scripts there, but the situation should improve
consistently from now on. Adding three export scripts: cal3d, directX, ac3d.
And one import: ac3d.
Diffstat (limited to 'source/blender/python/BPY_interface.c')
-rw-r--r-- | source/blender/python/BPY_interface.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/source/blender/python/BPY_interface.c b/source/blender/python/BPY_interface.c index 225821dd8c5..70805d71ece 100644 --- a/source/blender/python/BPY_interface.c +++ b/source/blender/python/BPY_interface.c @@ -482,15 +482,7 @@ int BPY_menu_do_python(short menutype, int event) Script *script = G.main->script.first; int len; - if ((menutype < 0) || (menutype > PYMENU_TOTAL) || (event < 0)) - return 0; - - pym = BPyMenuTable[menutype]; - - while (event--) { - if (pym) pym = pym->next; - else break; - } + pym = BPyMenu_GetEntry(menutype, (short)event); if (!pym) return 0; @@ -527,7 +519,7 @@ int BPY_menu_do_python(short menutype, int event) if (pym->dir) /* script is in U.pythondir */ BLI_make_file_string("/", filestr, U.pythondir, pym->filename); else { /* script is in ~/.blender/scripts/ */ - BLI_make_file_string("/", dirname, BLI_gethome(), ".blender/scripts"); + BLI_make_file_string("/", dirname, bpymenu_gethome(), "scripts"); BLI_make_file_string("/", filestr, dirname, pym->filename); } |