Skip to content
Snippets Groups Projects
  • Bastien Montagne's avatar
    c552e884
    FBX: Fix template issue when several sub-types use the same 'super type' element. · c552e884
    Bastien Montagne authored
    E.g. camera, lamp and empty (Null) data all use the same "NodeAttribute" element type,
    while having different "sub-types" (FbxNull, FbxCamera, etc.) with different properties.
    
    It would have been perfectly possible to have multiple property templates, but from
    "reading" official FBX files, it’s obvious this is not supported, so in this case we
    have to pick one to write a real template, and for the other subtypes, we have to
    explicitely write the whole templates' content in each and every element...
    
    At this point, you might wonder why introducing templates, if you have to handle
    such hairy cases? Well, I’m wondering too...
    c552e884
    History
    FBX: Fix template issue when several sub-types use the same 'super type' element.
    Bastien Montagne authored
    E.g. camera, lamp and empty (Null) data all use the same "NodeAttribute" element type,
    while having different "sub-types" (FbxNull, FbxCamera, etc.) with different properties.
    
    It would have been perfectly possible to have multiple property templates, but from
    "reading" official FBX files, it’s obvious this is not supported, so in this case we
    have to pick one to write a real template, and for the other subtypes, we have to
    explicitely write the whole templates' content in each and every element...
    
    At this point, you might wonder why introducing templates, if you have to handle
    such hairy cases? Well, I’m wondering too...