0
$\begingroup$

I'm writing a c++ code that parses blender file. It 's quite clear with static graphical data (vertices, indices) and armature bones noding, but I have problems with finding a structure that contains animation keys (using only rotation ones), the parsing orders I've been using (by structures name, envelopped): bArmature -> AnimData -> NlaTRacks -> Action -> ActionGroup, the last contains a huge list of FCurves for all the bones in the armature which dont seem to store any float[3] data that should appear to contain rotation keys.

The bones themselves dont have any data I'm looking for, they just contain positional and inheritance data, which is not what I need.

Here is parsing log:

************************************************
file: primitives.blend size in (bytes): 553300
version: 279, little endian, 64 bit.

file contains: 4291 names.
file contains: 706 types.
file contains: 621 structures.
object struct index: 153
mesh struct index: 57
armature struct index: 343
animdata struct index: 528

file contains: 1426 blocks.

file contains: 4 objects.
file contains: 3 meshes.


********* OBJECT NAME: OBcubic_rotated_armature
     data: (u2long), type: bArmature, amount: 1
      id: (name), ARArmature
      adt: (u2long), ---
      bonebase: (ListBase), type: Bone, homany: 1
      chainbase: (ListBase), no entry...
      edbo: (u2long), ---
      act_bone: (u2long), type: Bone, amount: 1
      act_edbone: (u2long), ---
      sketch: (u2long), ---
      flag: (integer), 2056
      drawtype: (integer), 0
      gevertdeformer: (integer), 0
      deformflag: (short), 3
      pathflag: (short), 0
      layer_used: (integer), 1
      layer: (integer), 1
      layer_protected: (integer), 0
      ghostep: (short), 0
      ghostsize: (short), 1
      ghosttype: (short), 0
      pathsize: (short), 0
      ghostsf: (integer), 0
      ghostef: (integer), 0
      pathsf: (integer), 0
      pathef: (integer), 0
      pathbc: (integer), 0
      pathac: (integer), 0
 parent: (u2long), ---

 VOID42S:
    anim data: (u2long), type: AnimData, amount: 1

   Animdata listbases:
   nla_tracks :(ListBase), type: NlaTrack, homany: 2


      nla track: [Action Stash], u2long: 174195208

         reporting nla_strips listbase:
         nla strip: TestAnimaTwo
         start: 0 end: 60
         actual start: 0 actual end: 60
         strip time: 0

               bAction name: (name), ACTestAnimaTwo
               listbase: curves has type: FCurve
               listbase: chanbase has no records.
               listbase: groups has type: bActionGroup


               reporting action group listbase:
               action group: core_bone
               channels(ListBase), type: FCurve, homany: 49
               action group: core_bone_right
               channels(ListBase), type: FCurve, homany: 42
               action group: core_bone_left
               channels(ListBase), type: FCurve, homany: 35
               action group: front_leg_right
               channels(ListBase), type: FCurve, homany: 28
               action group: back_leg_left
               channels(ListBase), type: FCurve, homany: 21
               action group: front_leg_left
               channels(ListBase), type: FCurve, homany: 14
               action group: bacl_leg_right
               channels(ListBase), type: FCurve, homany: 7
               7 action groups.


               listbase: markers:  has no records.
               flag: (integer), 0
               active_marker: (integer), 0
               idroot: (integer), 16975

         listbase: strips has no records.
         listbase: modifiers has no records.
         listbase: fcurves has no records.
         1 nla strip.

      nla track: [Action Stash].001, u2long: 174195336

         reporting nla_strips listbase:
         nla strip: TestAnimaOne
         start: 1 end: 40
         actual start: 1 actual end: 40
         strip time: 0

               bAction name: (name), ACTestAnimaOne
               listbase: curves has type: FCurve
               listbase: chanbase has no records.
               listbase: groups has type: bActionGroup


               reporting action group listbase:
               action group: core_bone
               channels(ListBase), type: FCurve, homany: 49
               action group: core_bone_right
               channels(ListBase), type: FCurve, homany: 42
               action group: core_bone_left
               channels(ListBase), type: FCurve, homany: 35
               action group: front_leg_right
               channels(ListBase), type: FCurve, homany: 28
               action group: back_leg_left
               channels(ListBase), type: FCurve, homany: 21
               action group: front_leg_left
               channels(ListBase), type: FCurve, homany: 14
               action group: bacl_leg_right
               channels(ListBase), type: FCurve, homany: 7
               7 action groups.


               listbase: markers:  has no records.
               flag: (integer), 0
               active_marker: (integer), 0
               idroot: (integer), 16975

         listbase: strips has no records.
         listbase: modifiers has no records.
         listbase: fcurves has no records.
         1 nla strip.

      2 nla tracks.

   drivers :(ListBase), no entry...
   overrides :(ListBase), no entry...

   Animdata u2longs:
   action :(u2long), type: bAction, amount: 1
   tmpact :(u2long), ---
   remap :(u2long), ---
   act_track :(u2long), ---
   actstrip :(u2long), ---
   flag :(integer), 49152
   recalc :(integer), 0
   act_blendmode :(short), 0
   act_extendmode :(short), 0
   act_influence :(float), 1

 track: (u2long), ---
 proxy: (u2long), ---
 proxy_group: (u2long), ---
 proxy_from: (u2long), ---
 ipo: (u2long), ---
 bb: (u2long), type: unnamed, amount: 0
 action: (u2long), ---
 poselib: (u2long), ---
 pose: (u2long), type: bPose, amount: 1
 gpd: (u2long), ---

  LISTBASES:
     constraintChannels: (ListBase), no entry...
     effect: (ListBase), no entry...
     defbase: (ListBase), no entry...
     modifiers: (ListBase), no entry...
     constraints: (ListBase), no entry...
     nlastrips: (ListBase), no entry...
     hooks: (ListBase), no entry...
     particlesystem: (ListBase), no entry...

Для продолжения нажмите любую клавишу . . .
************************************************

I would love just to receive the hints where I should dig next time to get the keys, I guess I 'll manage the rest of the problem, thanks for the ideas.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.