mirror of
git://projects.qi-hardware.com/ben-scans.git
synced 2025-04-21 12:27:27 +03:00
Use the project name to disambiguate names in POV-Ray output.
- solidify/main.pov: change name from "Part" to "Part_batcvr" - solidify/solid.h (povray), solidify/solid.c (sanitize, povray): use the project name as prefix for PGM files and a suffix for the object name - solidify/solidify.c (main): pass the project's basename to povray()
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <locale.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
@@ -148,8 +149,15 @@ int main(int argc, char **argv)
|
||||
|
||||
save_project(prj);
|
||||
|
||||
if (!isatty(1))
|
||||
povray(&prj->s);
|
||||
if (!isatty(1)) {
|
||||
const char *slash = strrchr(prj->name, '/');
|
||||
char tmp[1000]; /* @@@ enough */
|
||||
|
||||
strcpy(tmp, slash ? slash+1 : prj->name);
|
||||
if (strchr(tmp, '.'))
|
||||
*strchr(tmp, '.') = 0;
|
||||
povray(tmp, &prj->s);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user