Hello everyone, I need your help to import my json file to blender, in fact, I’m bad with script that’s why I need you.
I’ve tried several script that I found but no one worked for me,
first of all I’ve tried the Maya script that I found on Nvidia assets → blendshape solve load_bs_weight_maya.py
but I’ve this issue
script is here :
import maya.cmds as mc
import json
with open(r’C:\Users\celeb\OneDrive\Documents\Kit\shared\capture\a2f_cache’, “r”) as f:
facs_data = json.loads(f.read())
facsNames = facs_data[“facsNames”]
numPoses = facs_data[“numPoses”]
numFrames = facs_data[“numFrames”]
weightMat = facs_data[“weightMat”]
mc.playbackOptions(ast=0, min=0, max=numFrames-1, aet=numFrames-1)
bsNode = 'blendShape1'
for fr in range(numFrames):
for i in range(numPoses):
mc.setKeyframe(bsNode+'.'+facsNames[i], v=weightMat[fr][i], t=fr)
And it’s pretty similar with other script, does anyone could help me ?
Thank you very much