Skip to content

Free Motion Capture for Everyone πŸ’€βœ¨

TypeScript

Merge branch 'blender_stuff' into origin/blender_stuff

jonmatthis9fb5e5180220
diff --cc freemocap/fmc_runme.py
index ac4f4c1e,45ef22b4..1a391f56
--- a/freemocap/fmc_runme.py
+++ b/freemocap/fmc_runme.py
@@@ -183,21 -264,30 +264,30 @@@ def RunMe(sessionID=None
- # if useBlender == True:
- # #blenderExePath = Path('C:\Program Files\Blender Foundation\Blender 2.93')
- # #os.chdir(blenderExePath)
- # output = subprocess.run([blenderEXEpath, "--background", "--python", str(subprocessPath), "--", str(sesh.dataArrayPath/'mediaPipeSkel_3d.npy')], capture_output=True, text=True, check=True)
- # print(output)
-
- # %% Stage Five - Make Skreleton Animation
- if stage <= 5:
+ if stage <=5:
if useBlender == True:
- blenderPath = startupGUI.RunChooseBlenderPathGUI(session)
- print("Saving out FreeMoCap Data as, like, a bunch of different formats I hope?")
+ thisStage=5
+ console.rule(style="color({})".format(thisStage))
+ console.rule('Exporting Files...'.upper(), style="color({})".format(thisStage))
+ console.rule('Hijacking Blender\'s file format converters to export FreeMoCap data as various file format (.blend, .usd, .gltf, .fbx)', style="color({})".format(thisStage))
+ console.rule(style="color({})".format(thisStage))
+ time.sleep(pauseBetweenStages)
+
+ #blenderPath = Path('C:\Program Files\Blender Foundation\Blender 2.93')
+ #os.chdir(blenderExePath)
- output = subprocess.run([str(blenderPath), "--background", "--python", str(subprocessPath), "--", str(sesh.dataArrayPath/'mediaPipeSkel_3d.npy'), str(sesh.dataArrayPath)], capture_output=True, text=True, check=True)
+ output = subprocess.run([str(blenderPath), "--background", "--python", "fmc_blender.py", "--", str(sesh.dataArrayPath/'mediaPipeSkel_3d.npy'), str(sesh.dataArrayPath), sesh.sessionID], capture_output=True, text=True, check=True)
- print(output)
+ print(output)
+
+ # %% Stage Five - Make Animation
+ if stage <= 6:
+ thisStage=6
+ console.rule(style="color({})".format(thisStage))
+ console.rule('Creating the Skreleton animation!'.upper(),style="color({})".format(thisStage))
+ console.print('The video creation is very slow. This whole animation maker is crazy slow, tbh. Sorry about that, future iterations will be better lol :sweat_smile:',overflow="fold", justify='center',style="color({})".format(thisStage))
+ console.rule(style="color({})".format(thisStage))
+ time.sleep(pauseBetweenStages)
+
- print('Starting Skeleton Plotting')
play_skeleton_animation.PlaySkeletonAnimation(
sesh,
startFrame=sesh.startFrame,