Wednesday, 7 March 2012

Python: Create Cluster from soft selection

Edit: Source now available on GitHub.

Get the script 
here.
or from creativecrash here.


All thanks to Brian Escribano for his softSelection() code that gathers the id and weights of the current soft selection (basically, all the hard work).
It was simple enough to apply that information to a new cluster.

Usage:
Extract and place script file into a maya script directory (or python path directory) and run with this
import ld_createSoftCluster as sc
sc.ld_createSoftCluster()

and thanks to Valen Wagner for the icon.

Update:
07/03/12 - 0.4.0
    Alters cluster position to match selection rather than influenced average.

10 comments:

  1. This is useful, now can you have the cluster b placed on the surface of the mesh instead of the average of the selection?

    ReplyDelete
  2. Hey Matt, that should be sorted (link altered).
    Quickest way seemed was to query moveManipulator (after invoking). I'm not 100% happy with that, but it works for now.
    Working on a cleaner solution atm.

    ReplyDelete
  3. Hi Lee,
    Is there a chance you can make it work with Maya 2014?
    Thanks!

    ReplyDelete
  4. I love this script since Maya 2012 but now it doesn't work for Maya 2014. Is there something I should do?

    ReplyDelete
  5. Can't get it to work on Maya 2014 either.

    ReplyDelete
  6. Replies
    1. Source is now available here https://github.com/ldunham1/maya_utilities/blob/master/ld_soft_cluster.py

      Delete