Script for simple rigging tool


If anyone is up for it, I need a script programmer to create a script that creates an object which inherits rotation and location of a selected bone in an armature.
I am not a programmer, but I have tried to compile a list of what the script should accomplish.

Here is exactly what the script should be automating:

  1. Make sure a bone is selected (in pose mode or edit mode), save bone and armature names for later use.
  2. Create new cube object.
  3. Add copy location and copy rotation constraints to new cube object. Point these to the previously selected bone so that the cube object has the same location and rotation.
  4. Ctrl+A apply ‘Visual Transform’ on cube object.
  5. Lock all attributes of cube object (loc/rot/scale).
  6. Delete previously added constraints from cube object.
  7. Select previously selected bone and under Bone Properties > Display set the cube object as custom bone shape, tick ‘Wireframe’ and un-tick ‘Bone Size’
  8. Select cube object.

That’s it.
If there are any issues with setting this up, or if it has to be done differently, please write it here.