seithWeightTools

January 18th, 2013 Leave a comment Go to comments

DOWNLOAD:

Version: 5.1 (for Maya 2011 and 2012)

Info:

This script will save and load weights on a smooth-skinned geometry. At one point it was heavily based on a script © by Big Idea Productions (to be honest I don’t know anymore if it still is), so hats down to them!

The concept of this script is that you do not actually choose the name of the weight file to load or save. Instead, the file name is automatically inferred by the name of the skinned geometry itself. You only need to choose the folder where the weight files are saved.

Therefore it is recommended to properly name your geometries with unique names. Anyway, the script will ask for your permission before overwriting any existing file, so you should be pretty safe.

Features:

  • Load and Save weights by point number.
  • Load and Save weights by point position.
  • Works on multiple objects at the same time.
  • Summary window at the end of the process.

Installation:

Copy seithWeightTools.mel and seithWeightTools.py to your Maya scripts directory. Of course make sure you’ve added your Maya scripts directory to your Python environment variable. Which means opening your …/[Documents]/maya/2013/maya.env file and making sure that the path to the folder is present, like so:

PYTHONPATH = C:/the/path/to/my/default/maya/2013/scripts;

Then launch Maya and run:

source “seithWeightTools.mel”;

seithWeightTools;

1: The folder path frame. This is where you can see the current path (where the weight files are saved and from which they are loaded). The text field on the right allows you to quickly create a sub-directory within the current folder. At the top you’ll find a list of quick access paths that you can bookmark by right-clicking on the current path.

2: The threshold value is the spatial precision used when loading weights by point position (inactive when when loading weights by point number).

3: Save and Load weights. It’s safer to save weights using both methods, but to load weights, you need to choose either one or the other. the point number method looks at the vertex (or cv) numbers, whereas the position method looks at the position of the points in order to determine which weights make more sense.

WORKFLOW:

Again, it is good etiquette to correctly name your geometry with unique relevant names. A good method to follow would be to regularly create back-up directories by date. That way, you can keep previous sets of weight files (which is always safer than constantly overwriting them).

1- Saving Weights:

  1. Select the skinned object(s) for which you want to save the weights.
  2. Make sure the path at the top of the window points toward the correct directory.
  3. Choose the method to save the weights (probably best to always leave both boxes checked).
  4. Click the “Save Weights” button.

The weights files will be saved in the specified directory, and named with the same name as the geometry.

Again, please note that the path at the top of the window should point toward a directory (the one in which the weight files are going to be saved or from which they are going to be loaded), and not a file

2- Loading Weights:

  1. Select the skinned object(s) for which you want to load the weights.
  2. Make sure the path at the top of the window points toward the correct directory.
  3. Choose the method to load the weights.
  4. Click the “Load Weights” button.

The weights will be loaded onto the selected skins.

Don’t hesitate to drop me a mail to tell me if something’s weird with this script…
seith[at]seithcg[dot]com

  1. Stephane
    November 27th, 2016 at 17:48 | #1

    @Seith
    Oh my god, why didn’t I think about that before! O_O
    Thanx a lot Seith!

    Will try that Monday,

    Cheers!

    Stephane

  2. Jon
    March 8th, 2017 at 15:57 | #2

    First of all, many thanks for this script.
    It has helped me a bunch :)

    I had a problem today with a character that would have the mesh “explode”, after loading the skin weights.
    Even if I; saved weights, deleted skin, made new and then loaded weights – I would get the problem.

    In the end I found out that instead of replacing weights, the script was for some reason adding them. Allowing my mesh to get a higher than 1 value per vertex.

    I ended up solving it by flooding the new smooth bind with value 0 influence, and then loading the weights.

    Just wanted to write it down, in case anyone else ran into similar problems.

    Thanks again for the handy script Seith :)

    -Jon

  3. Jon
    March 8th, 2017 at 15:58 | #3

    @Jon
    Oh, should have noted down that I had this issue in Maya 2013!

    -Jon

Comment pages
1 2 40
  1. April 2nd, 2011 at 15:14 | #1