Closed GoogleCodeExporter closed 9 years ago
Should be fixed in r128, the well known properties on material were using fully
qualified rather than base name when adding the properties. You could still
have used the AddProperty API to manually add the diffuse texture though.
Original comment by nicholas.woodfield
on 22 Feb 2015 at 5:21
I grabbed the latest binaries (AssimpNet.3.3.1) I could find a couple of weeks
ago, but it doesn't appear to have this fix. I tested in code and I have to use
the following to get it to work:
material.AddProperty(new MaterialProperty(/*Assimp.Unmanaged.AiMatKeys.NAME_BASE*/ "?mat.name", meshName + "-" + m.ToString()));
material.AddProperty(new MaterialProperty(/*Assimp.Unmanaged.AiMatKeys.COLOR_DIFFUSE_BASE*/ "$clr.diffuse", colorDiffuse));
material.AddProperty(new MaterialProperty(Assimp.Unmanaged.AiMatKeys.TEXTURE_BASE, GetTextureName(file.m_axModels[0], m), TextureType.Diffuse, 0));
When I try the same way as the OP, these return true, but HasTextureDiffuse and
HasColorDiffuse show as false.
I think I obtained the binaries from NuGet. Is that definitely up to date?
Original comment by andrew.f...@gmail.com
on 5 Apr 2015 at 11:37
Original issue reported on code.google.com by
a.merez...@gmail.com
on 25 Jan 2015 at 3:00