Skip to content
Snippets Groups Projects
  • Bastien Montagne's avatar
    f125c03b
    Fix T40040: Binary FBX export only exports one action. · f125c03b
    Bastien Montagne authored
    That was not really true, since each strip from NLA would be exported as an animstack already.
    
    Supporting 'all actions' feature was in fact a bit hairy, because actions are not
    linked to objects in Blender (you can assign any action to any object). Did it this way:
    
    for all exported objects:
        for all actions in bpy.data.actions:
            if action is 100% compatible with object:
                temp assign this action to the object, and bake animation of this object only into an animstack
    
    This does not make great code, but seems to work rather well... Just be sure to not have invalid
    paths in your actions! ;)
    f125c03b
    History
    Fix T40040: Binary FBX export only exports one action.
    Bastien Montagne authored
    That was not really true, since each strip from NLA would be exported as an animstack already.
    
    Supporting 'all actions' feature was in fact a bit hairy, because actions are not
    linked to objects in Blender (you can assign any action to any object). Did it this way:
    
    for all exported objects:
        for all actions in bpy.data.actions:
            if action is 100% compatible with object:
                temp assign this action to the object, and bake animation of this object only into an animstack
    
    This does not make great code, but seems to work rather well... Just be sure to not have invalid
    paths in your actions! ;)