diff options
author | rodri <rgl@antares-labs.eu> | 2024-09-28 11:53:19 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-09-28 11:53:19 +0000 |
commit | b82c104fddd692f82baeb370a3b8e6d058fe3d2b (patch) | |
tree | eec02d342f8ef3ead2ad01fc61e075f184c0a6ee /marshal.c | |
parent | cdfd05b4e5b4ffedae1a4fffa46f1217a88d09ee (diff) | |
download | libgraphics-b82c104fddd692f82baeb370a3b8e6d058fe3d2b.tar.gz libgraphics-b82c104fddd692f82baeb370a3b8e6d058fe3d2b.tar.bz2 libgraphics-b82c104fddd692f82baeb370a3b8e6d058fe3d2b.zip |
marshal: don't die if textures can't be written. show a warning and move on.
Diffstat (limited to 'marshal.c')
-rw-r--r-- | marshal.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -789,7 +789,6 @@ Bprintprim(Biobuf *b, Wireprim *p) return n; } -/* TODO how do we deal with textures? embedded? keep a path? */ static int Bprintmtl(Biobuf *b, Material *m) { @@ -968,7 +967,7 @@ exportmodel(char *path, Model *m) sysfatal(Esmallbuf); if(exporttexture(buf, mtl->diffusemap) < 0) - return -1; + fprint(2, "warning: %r\n"); // if(mtl->diffusemap->file == nil) mtl->diffusemap->file = estrdup(strrchr(buf, '/')+1); @@ -979,7 +978,7 @@ exportmodel(char *path, Model *m) sysfatal(Esmallbuf); if(exporttexture(buf, mtl->specularmap) < 0) - return -1; + fprint(2, "warning: %r\n"); // if(mtl->specularmap->file == nil) mtl->specularmap->file = estrdup(strrchr(buf, '/')+1); @@ -990,7 +989,7 @@ exportmodel(char *path, Model *m) sysfatal(Esmallbuf); if(exporttexture(buf, mtl->normalmap) < 0) - return -1; + fprint(2, "warning: %r\n"); // if(mtl->normalmap->file == nil) mtl->normalmap->file = estrdup(strrchr(buf, '/')+1); |