ref: b82c104fddd692f82baeb370a3b8e6d058fe3d2b
parent: cdfd05b4e5b4ffedae1a4fffa46f1217a88d09ee
author: rodri <rgl@antares-labs.eu>
date: Sat Sep 28 07:53:19 EDT 2024
marshal: don't die if textures can't be written. show a warning and move on.
--- a/marshal.c
+++ b/marshal.c
@@ -789,7 +789,6 @@
return n;
}
-/* TODO how do we deal with textures? embedded? keep a path? */
static int
Bprintmtl(Biobuf *b, Material *m)
{
@@ -968,7 +967,7 @@
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 @@
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 @@
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);