Skip to content

XGL Import Error #797

Closed
Closed

Description

@hans-peter-4711

Importing a XGL file, which contains meshes (<MESH>) without geometry produces the following error: <meshref> index out of range. I know that meshes without geometry doesn't make much sense, but Autodesk Inventor sometimes produces such files. Maybe it would be better to ignore empty meshes instead of throwing an error.

Minimal example (example.xgl):

<?xml``version="1.0"?>
<WORLD>
  <DATA ORG="streamline.autodesk.com">
    <STR NAME="units">cm</STR>
  </DATA>
  <BACKGROUND>
    <BACKCOLOR>0.643,0.643,0.643</BACKCOLOR>
  </BACKGROUND>
  <LIGHTING>
    <DIRECTIONALLIGHT>
      <DIFFUSE>0.500,0.500,0.500</DIFFUSE>
      <SPECULAR>0.500,0.500,0.500</SPECULAR>
      <DIRECTION>0.305,-0.719,-0.624</DIRECTION>
    </DIRECTIONALLIGHT>
    <DIRECTIONALLIGHT>
      <DIFFUSE>0.353,0.359,0.402</DIFFUSE>
      <SPECULAR>0.353,0.359,0.402</SPECULAR>
      <DIRECTION>-0.482,0.643,0.595</DIRECTION>
    </DIRECTIONALLIGHT>
    <AMBIENT>0.591,0.594,0.611</AMBIENT>
  </LIGHTING>
  <MESH ID="0">
    <MAT ID="1">
      <DIFF>0.813,0.814,0.816</DIFF>
      <AMB>0.813,0.814,0.816</AMB>
      <EMISS>0.000,0.000,0.000</EMISS>
      <SPEC>0.183,0.183,0.184</SPEC>
      <ALPHA>1.000</ALPHA>
      <SHINE>100000.000</SHINE>
    </MAT>
    <MAT ID="70001">
      <DIFF>0.996,0.997,1.000</DIFF>
      <AMB>0.996,0.997,1.000</AMB>
      <EMISS>0.000,0.000,0.000</EMISS>
      <SPEC>0.000,0.000,0.000</SPEC>
      <ALPHA>1.000</ALPHA>
      <SHINE>0.000</SHINE>
    </MAT>
  </MESH>
  <OBJECT PATHID="1">
    <TRANSFORM>
      <FORWARD>0.000000,0.000000,1.000000</FORWARD>
      <UP>0.000000,1.000000,0.000000</UP>
      <POSITION>0.000000,0.000000,0.000000</POSITION>
    </TRANSFORM>
    <MESHREF>0</MESHREF>
  </OBJECT>
</WORLD>

Activity

  1. added
    Bug
    on Jan 1, 2019
  2. added
    XGL
    on Sep 9, 2021
  3. added this to the Release 5.1 milestone on Sep 9, 2021
  4. removed this from the Release 5.1 milestone on Dec 2, 2022
  5. moved this from 📋 Backlog to 👀 In review in The Asset-Importer-Lib DevOps Boardon Nov 9, 2023
  6. moved this from 👀 In review to ✅ Done in The Asset-Importer-Lib DevOps Boardon Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugXGL

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions