Request Help/Script - Copy and Paste Visual Pose

Only those who have made an animation where the character need to pick up or drop something know
how parenting animation can be painful.

Disable contraints and having to deal with the offset generated is a real pain in the ass.

Thinking about it a few months ago, even without having much experience in Python,
I tried to create a script to automate this task.

The result was as follows:

At first sight, it seems functional, but in practice it presents a series of limitations
which makes it impractical for use in a serious work.

However, since part of the Child Of off and maintain the visual position worked well,
I thought of adapting to a new script.

Until days ago, while animating a simple walkcycle and using the Copy and Paste Pose, something came to mind.

And if it were possible to copy a Visual Pose and later, paste it to the same global position?!. That would solve the problems
generated to deal with unwanted offset and allow a more practical repositioning bones of parents / child objects without affecting bones / objects.

Unfortunately, I dont have enough knowledge to program something.
For this reason I come here asking for your help, as this script could be useful for us all.

I hope that my idea has been clear and sorry for my Google Tranlated English :stuck_out_tongue:

I have tried to develop the script based on the getmat() function from “Copy Attributes Addon”.

But still no sucess on get a Copy/Paste Visual Pose.
Probably, I´m not correctly calculating the matrices.
I’m not good with calculations, still less with matrices and definitely, I need help with this =/.