shithub: libobj

Download patch

ref: b31457e40a5178320d1aefa588d2d9fc2c5bdfc0
parent: 5a6f5e0d2e19b72a4264eeb6300a9352901c8a42
author: rodri <rgl@antares-labs.eu>
date: Fri May 3 08:55:50 EDT 2024

attach material properties to points and lines as well.

--- a/obj.c
+++ b/obj.c
@@ -665,6 +665,8 @@
 					o = alloco("default");
 					pusho(obj, o);
 				}
+				if(m != nil)
+					e->mtl = m;
 				addelem(o, e);
 			}
 			break;
@@ -746,6 +748,8 @@
 					o = alloco("default");
 					pusho(obj, o);
 				}
+				if(m != nil)
+					e->mtl = m;
 				addelem(o, e);
 			}
 			break;