Scene .duf parsing, How to distinguish between a Pose and a Shape animation key

I'm trying to parse scene .duf files to extract Poses and/or Shape animation keys.

What's the best way to do this ?

for Shape/Morph

Right now I'm looking inside the url to a substring "/Morphs/", as I loop over the animation keys something like,

animations[i].url.includes("/Morphs/")

for Posing

animations[i].url.includes("?translation/")

animations[i].url.includes("?rotation/")

animations[i].url.includes("?scale/")

 

Any thoughts or recomendations ?

 

 

Comments

  • If you have the target loaded can't you just get the property from it and check the type? Or use the URI from the file to open the .dsf file and check its type value.

  • TromNekTromNek Posts: 41

    I don't have this loaded in DS. I'm opening up a different scene .duf file (hoping to copy posing and shaping from it for a single frame/time).

    In the .duf file;

    The nodes section only has bones with the 'current' rotation, translation and scale (I want them for a specific frame/time).

    the animations section does have both posing and shaping, but not 'type' to tell me which is which (see attached).

    It looks like searching for "/Morphs/" in the url will identify the Shaping. But I'm not sure how consistant that will be

    dzDufAnimationsSection.PNG
    1657 x 271 - 22K
  • TromNek said:

    I don't have this loaded in DS. I'm opening up a different scene .duf file (hoping to copy posing and shaping from it for a single frame/time).

    In the .duf file;

    The nodes section only has bones with the 'current' rotation, translation and scale (I want them for a specific frame/time).

    the animations section does have both posing and shaping, but not 'type' to tell me which is which (see attached).

    It looks like searching for "/Morphs/" in the url will identify the Shaping. But I'm not sure how consistant that will be

    Actual; morph assets will be in the Morphs folder as DS assumes that and appends the Author/Product names as sub-folders without user intervention, but if people tweak their settings or use another type that may go out of the window - and don't forget that the morphs can be embedded in the scene file, not saved as an asset.

  • TromNekTromNek Posts: 41

    Richard Haseltine said:

    TromNek said:

    I don't have this loaded in DS. I'm opening up a different scene .duf file (hoping to copy posing and shaping from it for a single frame/time).

    In the .duf file;

    The nodes section only has bones with the 'current' rotation, translation and scale (I want them for a specific frame/time).

    the animations section does have both posing and shaping, but not 'type' to tell me which is which (see attached).

    It looks like searching for "/Morphs/" in the url will identify the Shaping. But I'm not sure how consistant that will be

    Actual; morph assets will be in the Morphs folder as DS assumes that and appends the Author/Product names as sub-folders without user intervention, but if people tweak their settings or use another type that may go out of the window - and don't forget that the morphs can be embedded in the scene file, not saved as an asset.

    Good point on the embedded morphs (that's probably all the 'geometry' stuff I see in files). I'm going to ignore them for now (until it bites me in the butt).

    So, I think searching for "/Morphs/" will get most of the Shaping stuff.

    Maybe I'll get everything and classify them as "Posing" (trans, rot, scale), "Shaping" (/Morphs/), and "All Other Keys".

    That way I can keep track of everything.

     

     

     

Sign In or Register to comment.