cgtinker / BlendArMocap

realtime motion tracking in blender using mediapipe and rigify
GNU General Public License v3.0
916 stars 111 forks source link

When I try to Transfer my cgt_Pose to my meta-rig or rig, it doesnt work #116

Closed Shaniman864 closed 1 year ago

Shaniman864 commented 1 year ago

When I try to Transfer my cgt_Pose to my meta-rig or rig, it doesnt work. > I was using BlendAR Mocap and the detection works. However, when I tried to transfer the animations to the transfer animation button. an Error popped up > This is the error from the metarig > > > Python: Traceback (most recent call last): File "C:\Users\nasha\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\BlendArMocap-main\src\cgt_blender\interface\ui_operators.py", line 53, in execute col_mapping[col](armature, driver_objects) File "C:\Users\nasha\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\BlendArMocap-main\src\cgt_blender\cgt_rig\rigify_pose.py", line 139, in init self.remove_bone_constraints(bone_names) File "C:\Users\nasha\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\BlendArMocap-main\src\cgt_blender\cgt_rig\abs_rigging.py", line 135, in remove_bone_constraints constraints.remove_constraints(self.pose_bones[bone_name]) # pair 0 = bone name in dict KeyError: 'bpy_prop_collection[key]: key "torso" not found' This is the error from rig > > > Python: Traceback (most recent call last): File "C:\Users\nasha\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\BlendArMocap-main\src\cgt_blender\interface\ui_operators.py", line 53, in execute col_mapping[col](armature, driver_objects) File "C:\Users\nasha\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\BlendArMocap-main\src\cgt_blender\cgt_rig\rigify_pose.py", line 143, in init objects.set_mode('EDIT') File "C:\Users\nasha\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\BlendArMocap-main\src\cgt_blender\utils\objects.py", line 340, in set_mode bpy.ops.object.mode_set(mode=mode, toggle=False) File "G:\Shani's Animation Programs\Blender 3.4.1\3.4\scripts\modules\bpy\ops.py", line 113, in call ret = _op_call(self.idname_py(), None, kw) RuntimeError: Operator bpy.ops.object.mode_set.poll() Context missing active object If you can help me with this problem I would really appreciate it. Thank you

Shaniman864 commented 1 year ago

Also please hang with me here some of my laptop buttons do not seem to work.

cgtinker commented 1 year ago

Do you have a generated rigify rig as target? I'm not sure about the modes, that's confusing me a little. Are you in object mode?

I totally rewrote the transfer - just pushed it to the main branch. You can give it a try if you like. Still making some test on different platforms before I call it an official release. But as everything changes anyways, you might give it a shot ;)

Shaniman864 commented 1 year ago

Yes I was in Object mode. I have a rig that was downloaded from a website called turbosquid. The name of the character was Fur Boy Teen Full Rigged in Blender 3D model. This is my screenshot that I took
For Githubs Question

cgtinker commented 1 year ago

Is the rig generated? Ensure to select the metarig, navigate to either theobject armature tab > rigify buttons or in the 3D View > Rigify tab and selected generate rig.

cgtinker commented 1 year ago

Yes I was in Object mode. I have a rig that was downloaded from a website called turbosquid. The name of the character was Fur Boy Teen Full Rigged in Blender 3D model. This is my screenshot that I took For Githubs Question

on the screenshot, you are trying to transfer to the metarig. You have to transfer to a generated rigify rig.