assimp / assimp-net

Automatically exported from code.google.com/p/assimp-net
196 stars 83 forks source link

Not able to export a scene #41

Open Pilzinsel64 opened 6 years ago

Pilzinsel64 commented 6 years ago

I am using Assimp Libs v4.1.0, but I also tried v3.3.1 and 3.3.2.

I can't export a scene. I also tried to import an scene and export it withut tuching it. But It doesn't work.

Here a code that I have tested and failed:

            Dim mdl As Scene = Nothing
            Dim ac As New AssimpContext
            Dim channelIndicies As New Dictionary(Of Material, Integer)

            ac.SetConfig(New Configs.NormalSmoothingAngleConfig(66.0F))
            mdl = ac.ImportFile(fileName, PostProcessPreset.TargetRealTimeMaximumQuality Or PostProcessSteps.Triangulate)

            Dim formatID As String = ""
            Dim myExt As String = Path.GetExtension(fileName).ToLower.Substring(1)
            For Each efd As ExportFormatDescription In ac.GetSupportedExportFormats
                If myExt = efd.FileExtension Then
                    formatID = efd.FormatId
                    Exit For
                End If
            Next

            ac.ExportFile(mdl, fileName, formatID, PostProcessPreset.TargetRealTimeMaximumQuality)

What I do wrong? Or is that a bug?

Please help me!