Skip to content

read_rig_anim_from_json

read_rig_anim_from_json(anim_file)

Reads a rig animation from a json file

Parameters:

Name Type Description Default
anim_file str

Path to the json file containing the rig animation

required
Source code in src\fast_cody\read_rig_anim_from_json.py
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
def read_rig_anim_from_json(anim_file):
    """
    Reads a rig animation from a json file

    Parameters
    ----------
    anim_file : str
        Path to the json file containing the rig animation
    """
    import json
    with open(anim_file) as f:
        rig = json.load(f)


    P = np.array(rig["P"])

    return P