Coder Social home page Coder Social logo

weights_editor's Introduction

A skin weights component editor inspired from Softimage.

๐Ÿ–ฅ๏ธ Interface

weightsEditorList
The interface using the list view with averaged values


weightsEditorTable
The interface using the table view for more granular control

โญ Features

  • Editable table and list views to quickly set weights with selected components (verts, edges, faces)
  • Buttons with preset values to add, subtract, scale, or set weights (buttons are customizable)
  • Quickly lock or unlock selected influences from the list/table/influence views by pressing space
  • Influence list on the side
    • Select the influence
    • Select all vertexes weighted to the influence
  • Displays weights in different color themes
    • 3DsMax style (from blue to red)
    • Maya style (from red to white)
    • Softimage style (displays all influences at once)
    • Maximum influences (colors vertexes red if they are over a specific influence count)
  • Weight utilities
    • Prune weights under a specified value
    • Prune weights over a specified influence count
    • Smooth weights using the vert's influences
    • Smooth weights with the verts neighboring influences (using Brave Rabbit's plugin)
    • Mirror selected vertexes or all weights
    • Copy & paste vertex weights
  • Skin weights exporter, which include dual-quaternion weights
    • A button to batch export let's you export out all skinClusters from the scene to a specified folder.
  • Skin weights importer
    • Import via point order
    • Import via world space positions from the mesh's vertices
    • Weights can also import onto selected vertices only, so you can maintain existing skin weights outside of the selection.
    • A button to batch import let's you pick a folder that contains skin files that were previously exported, and import them all at once.
  • Button to flood full weights to the vertex's closest influence to begin quick blocking
  • All operations support undo/redo
  • Most operations are assigned to hotkeys, which can be re-assigned
import_weights.mp4

Exporting weights then importing them onto a different object via world positions

import_weights_on_selection.mp4

Importing weights onto selected vertices

โค๏ธ Supported Versions

In short, Maya 2017 and above is supported.
Release v2.0.0 was heavily used in production in Maya 2018 Extension 4.
It was also rewritten to work with Python 3 so it will run on Maya 2022.

For earlier versions of Maya using PySide (Qt4), only release v1.0.0 will work as future releases will only support PySide2 (Qt5).

โž• Installation

  • Open up a session of Maya
  • Drag and drop the installer file DRAG_AND_DROP_INSTALLER.py into the viewport. Please do not move this file, it uses relative paths to copy over the files.
  • Follow the instructions to complete the installation.

If you prefer to manually install it then simply copy the weights_editor_tool directory to wherever your Python path is pointing to.

After installation you can immediately launch the tool by executing in the script editor:

from weights_editor_tool import weights_editor
weights_editor.run()

๐Ÿ‘ช Dependencies

This tool doesn't require any extra libraries and uses all native modules that ship with Maya.

An optional plugin is needed to perform a smooth with all influences.
By default this feature will be disabled if the plugin is not loaded.

The plugin is smoothSkinClusterWeight by Ingo Clemens.
It's fantastic, free, and you can download it here.

๐Ÿ› Reporting a Bug

If you run into any errors during installation or using the tool itself, then please create a new issue from this repository.

Please include the following:

  • Your operating system (Windows, Linux, Mac)
  • Your version of Maya
  • If possible, open up the script editor and copy & paste the error message.
  • If possible, include a screenshot showing the error.
  • Include any steps that will reproduce the error.

โœ‰๏ธ Requests and New Features

If you have any ideas to improve this tool then feel free to send any suggestions!

๐Ÿ™ Credits and Thanks

Enrique Caballero and John Lienard for pushing me to make this.
Ingo Clemens (Brave Rabbit) for his smoothSkinClusterWeight plugin.

Happy skinning ๐Ÿ˜๐ŸŽจ๐Ÿ–Œ๏ธ

weights_editor's People

Contributors

jasonlabbe avatar therussetpotato avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

weights_editor's Issues

Update for maya 2025?

I want to ask is there an update for maya 2025?
i tried to install it in 2025, but it didn't work

Error with duplicate naming

When switching to a new object to edit, it will throw an error if another object with the same name exists. This only happens in component mode, and is ok in object mode.

Weight export doesn't work with curves

Can't export weights on curves, I assume this also means that we can't import weights on curves. Would be a valuable addition to round out this great tool.

Error follows:

return om2.MFnMesh(mdag_path)

ValueError: object is incompatible with MFnMesh constructor

# Error: 'PySide2.QtWidgets.QShortcut' called with wrong argument types:

Windows 10
Maya 2020.4

Ran the Drag 'n Drop Installer and ran the command:

from weights_editor_tool import weights_editor
weights_editor.run()

# Error: 'PySide2.QtWidgets.QShortcut' called with wrong argument types:
#   PySide2.QtWidgets.QShortcut(long, QWidget)
# Supported signatures:
#   PySide2.QtWidgets.QShortcut(PySide2.QtGui.QKeySequence, PySide2.QtWidgets.QWidget, Callable, PySide2.QtCore.Qt.ShortcutContext=PySide2.QtCore.Qt.ShortcutContext.WindowShortcut)
#   PySide2.QtWidgets.QShortcut(PySide2.QtGui.QKeySequence, PySide2.QtWidgets.QWidget, str=None, str=None, PySide2.QtCore.Qt.ShortcutContext=PySide2.QtCore.Qt.ShortcutContext.WindowShortcut)
#   PySide2.QtWidgets.QShortcut(PySide2.QtWidgets.QWidget)
# Traceback (most recent call last):
#   File "<maya console>", line 2, in <module>
#   File "C:/Users/colem/OneDrive/Documents/maya/scripts\weights_editor_tool\weights_editor.py", line 1799, in run
#     WeightsEditor.run()
#   File "C:/Users/colem/OneDrive/Documents/maya/scripts\weights_editor_tool\weights_editor.py", line 116, in run
#     inst = cls()
#   File "C:/Users/colem/OneDrive/Documents/maya/scripts\weights_editor_tool\weights_editor.py", line 111, in __init__
#     self.register_shortcuts()
#   File "C:/Users/colem/OneDrive/Documents/maya/scripts\weights_editor_tool\weights_editor.py", line 689, in register_shortcuts
#     hotkey.key_code(), hotkey.func))
#   File "C:/Users/colem/OneDrive/Documents/maya/scripts\weights_editor_tool\weights_editor_utils.py", line 35, in create_shortcut
#     shortcut = QtWidgets.QShortcut(key_sequence, get_maya_window())
# TypeError: 'PySide2.QtWidgets.QShortcut' called with wrong argument types:
#   PySide2.QtWidgets.QShortcut(long, QWidget)
# Supported signatures:
#   PySide2.QtWidgets.QShortcut(PySide2.QtGui.QKeySequence, PySide2.QtWidgets.QWidget, Callable, PySide2.QtCore.Qt.ShortcutContext=PySide2.QtCore.Qt.ShortcutContext.WindowShortcut)
#   PySide2.QtWidgets.QShortcut(PySide2.QtGui.QKeySequence, PySide2.QtWidgets.QWidget, str=None, str=None, PySide2.QtCore.Qt.ShortcutContext=PySide2.QtCore.Qt.ShortcutContext.WindowShortcut)
#   PySide2.QtWidgets.QShortcut(PySide2.QtWidgets.QWidget) #

Flood to closest doesn't undo properly

Pressing flood to closest, and then pressing the undo button on the menu doesn't work properly. It seems to change the weights on the weight table but it doesn't update the geometry in the viewport.

Tested on Maya 2022

Support edge selections

Like the title says, have the tool work when selection edge components! Might as well support faces too.

Presets increments

Hello,
Thank you so much for developing this tool. I am a Softimage user and I really really miss Softimage's skinning workflow. Specially the weight editor.
By testing your tool, I notice a few things that I would like to give feedback on:

  • The lowest preset for the ADD is too high. I think that the lowest increment should be 0.01
  • The step of the spinner box is too high. I think that it is set to 10.
  • Not sure how to use the spinner box. The value seems to be applied when pressing enter, but how to apply it multiple times? It feels like it is missing an "apply" button or an "ADD" and a "SUBTRACT" button that uses the spinner value.
  • It would be awesome if there could be a slider like in the softimage weight editor. This is the feature that I miss the most. Being able to use a slider to add or remove weighting while seeing the result in real-time. And having that slider reset to zero when we change influence. (As an example, this is super useful when fine tweaking the weights of an edge loop around an elbow)
  • The weight locking seems to work per joints, but it would be awesome if it could work per cell of the table. (This is probably a limitation of Maya I suppose)
  • I do not know if it is possible, but it would be great when using the Softimage color theme if the colors on the polygons could use the weight values. In softimage it looks like the point colors are 100% of the main influence color, but the color on the polygons are weighted. This allows a better visualization of the weights. It is easier to see smoothed areas.

That is all that I can think of right now.
Great work! Thanks so much for this tool!

Window Focus not working on Maya 2022 +

In Maya 2022, and possibly in previous versions, there seems to be a new issue with window focus. When I press space to lock a collumn it also minimizes or maximizes whichever viewport is under the window. This wasn't a problem before.

Considering how important the lock function is on this tool, this is a big deal. This tools strength is in how easy it is to lock and unlock weights so that you can steal weight from peter to give to paul in an easy manner.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.