- 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.
This commit is contained in:
2004-01-27 03:34:16 +00:00
parent d482d34ffb
commit 33dd2f5e0d
8 changed files with 2308 additions and 13 deletions

View File

@@ -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);
}