June Tool: ml_pivot

It’s the end of the month, and thanks to my Patreon supporters that means a new tool. This months flavour comes by request, though it remains to be seen whether it works as they hoped. It was a bit of a science experiment, and there’s probably more features which could be added in the future, so I’m interested in hearing feedback from you about it.

So it’s a tool for changing the pivot of an animated transform in maya. The workflow is like this:

  1. Animate something.
  2. With it selected, run the tool and press “Edit Pivot”
  3. Your selection will change to a handle. Position the handle to where you want the pivot to be, and then press Return. If you deselect the handle or press Escape it will cancel.
  4. The scene will play through to bake, and afterward you should have the exact same animation but with a different pivot.

Disclaimer! Because everyone’s rigs are set up differently, in some cases changing the pivot position may break a rig. Before you try this on a new rig, please save your scene, and do let me know if you have found a bug that causes trouble. Also if you haven’t updated ml_utilities in a while, you may want to grab that too.

Give it a go:

Pivot
Pivot
ml_pivot.py
Version: 1
10.2 KiB
494 Downloads
Details
Share Button
This entry was posted in Crowdfunding, Tools. Bookmark the permalink.

6 Responses to June Tool: ml_pivot

  1. Ru says:

    Hey Morgan and thanks again for another interesting tool 🙂

    I tried to run it on a basic poly cube and it doesnt seem to do anything after hitting return other than making a new ‘null1’ in the outliner.

    It throws up this error if it helps:

    # Traceback (most recent call last):
    # File “C:/Users/***/Documents/maya/scripts\ml_pivot.py”, line 106, in eventFilter
    # self.enterCommand()
    # File “C:/Users/***/Documents/maya/scripts\ml_pivot.py”, line 197, in bakePivot
    # utl.matchBake(source=[self.node], destination=[tempPosition], bakeOnOnes=True, maintainOffset=True, preserveTangentWeight=False, rotate=False)
    # AttributeError: ‘module’ object has no attribute ‘matchBake’

  2. Hey Ru can you check you have the latest ml_utilities script?

  3. Ru says:

    Hi Morgan,

    I have version 19 ( 2016-06-02) , is that the latest one?

    cheers

  4. Hey the error suspiciously looks like an outdated ml_utilities, could you try running this:

    import ml_utilities
    print ml_utilities.__revision__
    print ml_utilities.__file__

    That should print the revision and the file path to what’s being loaded. Sometimes people have an old pyc file that’s being picked up instead. If the filepath isn’t to the script you downloaded, just go ahead and delete that file, restart maya and try again.

  5. Ru says:

    Hey Morgan you were right,

    It was revision 19 in my main scripts folder but found an older rogue utilities file in my prefs-scripts folder.

    That seems to have sorted it thanks.

    Just wondered is the functionality to bake all the keys in the timeline? As there are a lot of static keys that need deleted after running it – not a huge issue but wondered if it was meant to bake up until the frame you are on (though understand you may want to preserve keys afterward).

    cheers again

  6. At the moment that’s the only way to make sure motion fidelity isn’t lost, since this isn’t a switch it needs bake the whole timeline. I would like to make it smarter about what keys need to be baked though, for example it doesn’t need to bake out translation from frames where rotation is static. I’ll implement this in the future but any other suggestions I’d love to hear.

Leave a Reply

Your email address will not be published. Required fields are marked *