unable to parse file Xaml exported for blender.

Topics: Developer Forum, Project Management Forum, User Forum
Nov 25, 2008 at 12:25 PM
Hello ALL

Please Help

When i export a model from blender to xaml. i doubleclick and it shows good in the internet explorer. but when i want to load the xaml model into the 3d viewer i get this error:

Unable to cast object of type 'System.Windows.Controls.ViewPort3D' to 'System.Windows.Media.Media3D.Model3D'

Why is that.

Kind Regards
Steen Osterby
Dec 9, 2008 at 5:26 AM
hi steen--

i've found that in order to use what i've exported from blender, i have to remove:

  • the root Viewport3D tag (and the closing tag from the end)
  • the entire Viewport3D.Camera element
  • the following ModelVisual3D tag (and the closing tag from the end)
  • the following ModelVisual3D.Content tag (and the closing tag from the end)
  • move the namespace declarations from the root Viewport3D to the following Model3DGroup tag
thus, the first line in my new xaml file is:

<Model3DGroup xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">