[parse_blend_file] Allow basic instancing
wahn opened this issue · 1 comments
Right now we expect the object name to be exactly the same as the mesh name, the material name etc. For textures we already have an exception. Now we would like to re-use mesh information (and attached materials) for several objects following a naming convention (like this):
Right now we get a warning like this:
WARNING: looking up object_to_world by name ("ceilingLamp_metal") failed
So, while we found a mesh with the name ceilingLamp_metal
we could could search for objects (and their transformation matrices) with names like ceilingLamp_metal1
, ceilingLamp_metal2
, etc. That is not using real instances (yet), but could allow to re-use the same geometry for several objects with different transformations.
Commit f82f9d5 follows a naming convention like this:
If the instances (objects with transformation info) are called object_name1, object_name2, etc.,
the shared mesh should be called object_name, and the material (shared for all objects) should be called object_name1 (notice the trailing one). If you follow that naming convention each instance of the shared mesh will show up in the rendering: