![]() |
assimp importer error - Printable Version +- AB4D Forum (https://forum.ab4d.com) +-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4) +--- Forum: Ab3d.PowerToys (https://forum.ab4d.com/forumdisplay.php?fid=9) +--- Thread: assimp importer error (/showthread.php?tid=4311) |
assimp importer error - kreativasas - 01-11-2022 Hi guys, i need a help!!! I needed to upgrade assimp to the latest version. With the oldversion of assimp i can read with assimpwpfimporter and get a geometrymodel like: Code:
Code: Dim readmodel3d As GeometryModel3D = AssimpWpfImporter.ReadModel3D(mfile) With the last version the code gives me an error (cannot cast objects 'System.Windows.Media.Media3D.Model3DGroup' on 'System.Windows.Media.Media3D.GeometryModel3D) Why? how i can read geometry using assimp? RE: assimp importer error - abenedik - 01-12-2022 I guess that the new version returns a Model3DGroup and not GeometryModel3D anymore. To fix this you need to change your line of code into: Dim readmodel3d As Model3D = AssimpWpfImporter.ReadModel3D(mfile) (Model3D is a base class for both GeometryModel3D and Model3DGroup) RE: assimp importer error - kreativasas - 01-12-2022 (01-12-2022, 10:55 AM)abenedik Wrote: I guess that the new version returns a Model3DGroup and not GeometryModel3D anymore. Ok but with a model3d i can't read geometry or set material... How can I solve? |