Customizing NI-mate Blender addon for Manuel Bastioni Lab


I replaced:, set_location, set_rotation)

with:[context.scene.delicode_ni_mate_object].pose.bones, set_location, set_rotation)


for key, value in self.original_locations.items():[key].location = value.copy()
for key, value in self.original_rotations.items():[key].rotation_quaternion = value.copy()


for key, value in self.original_locations.items():[context.scene.delicode_ni_mate_object].pose.bones[key].location = value.copy()
for key, value in self.original_rotations.items():[context.scene.delicode_ni_mate_object].pose.bones[key].rotation_quaternion = value.copy()

I also added a object selection box on the panel for the context.scene.delicode_ni_mate_object variable.

I renamed the bone names in NI-mate to match the bone names for Manuel Bastioni Lab skeleton. It sort of works, the arms flap around all crazy. I did it with unmodified Blender addon using empties and that works perfect, no flapping. So I assume I need to handle pose.bones differently or something? Blender’s Python API documentation isn’t really that helpful.

If someone could point me in the right direction, that would be awesome!



I kind of answered my own question.

I think the problem is because the MBL skeleton isn’t the same scale so the model is being stretched way out. When using just Basic format, it’s stretched, using Orientation, it flaps around and when using both it’s stretched out and flapping.

I might be able to select the MLB character in the panel, look up it’s bones’ locations, calculate distances and modify the output of NI mate in the Blender plugin, so that the output has the same scale and character position.