Import FACS from FBX for BVH

Issue #2035 resolved
bouich jules created an issue

Hi!

Doing extensive test on BVH which i think is simply become the #1 retarget addon on the internet.

A small bug i discovered, is if i import a file and my Scene format rate is 24 it will automatic change it to 30

and this crash will appear if i try change it back and do it again.

Blender 4.1

Thank you!

Comments (11)

  1. bouich jules reporter

    Hi Thomas, please note that the frame rate of the Scene is always FORCED to change to 30 fps, even if initially it was 24 fps

    Did multiple test so the crash will pop up only if the bone are not posable, when you make all bones posable then you import FBX to facs you won’t get the crash

    tested with the last build.

    Thank you!

  2. bouich jules reporter

    Actually not only the FACS but any FBX animation will force change my frame rate to 30 fps.. i believe it’s maybe a normal behavior then?

  3. Thomas Larsson repo owner

    The frame time is specified in the bvh file. E.g., in the Mixamo file you provided the bvh file contains the lines

    MOTION
    Frames: 641
    Frame Time: 0.033333
    

    which indeed corresponds to 30 FPS. However, apparently keyframes still end up on integer frames. Will look into that.

    The crash is hopefully gone now. Each button starts by going into object mode. However, if there is no active object, or if the active object is hidden or belongs to an excluded collection, that will cause a polling error. Hopefully fixed in all cases now.

  4. bouich jules reporter

    Hi Thomas

    Crash is still there, importat G9 -) import standard morph -) BVH import facs from fbx

  5. Alessandro Padovani

    bvh 2.2.0027, blender 4.1.1

    I can confirm the crash.

    steps:

    1. easy import G9 with FACS
    2. select G9, then import facs from fbx file

    Traceback (most recent call last):
    File "C:\Users\Alessandro\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\retarget_bvh\utils.py", line 433, in execute
    self.sequel(context, data)
    File "C:\Users\Alessandro\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\retarget_bvh\utils.py", line 445, in sequel
    bpy.ops.object.mode_set(mode=self.mode)
    File "C:\Program Files\blender-4.1.1-windows-x64\4.1\scripts\modules\bpy\ops.py", line 109, in call
    ret = _op_call(self.idname_py(), kw)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    RuntimeError: Operator bpy.ops.object.mode_set.poll() Context missing active object

    p.s. @Bouich, as noted in the installation docs you have to rename the folders, so it’s “retarget_bvh“. Also I’m not sure that using the “admin“ user is a good thing.

  6. Alessandro Padovani

    bvh 2.2.0030

    The crash is gone now it imports fine. As for the “quick facial movoments“, they’re in the original file as well so they are imported correctly. We can clearly see them by importing the fbx with blender then parenting a camera to the head bone.

    steps:

    1. import fbx with blender
    2. parent a camera to the head bone
    3. watch the face animation

    If there’s nothing to add we can close as resolved.

  7. Log in to comment