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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user