Giter VIP home page Giter VIP logo

vtool's Introduction

vtool - Vetala Auto Rig

A set of rigging and asset creation scripts.

Required

You will need Maya or Unreal or Houdini to run Vetala. It is also possible to directly from PySide. Currently Vetala works best with Maya. Other platforms are really early work in progress.

Getting Started

  • Download from git to the path of your chose.

Maya

Vetala works with older and newer versions of Maya but is less tested. Maya 2022 and python2, 2023, 2024, 2025 Python 2 should be working in older versions, but Vetala is currently most tested in python 3.

  • In Maya in Python add the path to the sys.path. For example:
import sys
sys.path.append('C:/vtool/python')
  • launch the ui by running the following:
from vtool.maya_lib import ui 
ui.tool_manager()

Unreal

The Unreal implementation is still fairly buggy compared to Maya. Lots missing and incomplete, could use help testing.

  • Install PySide 2
    • pip install directly to your install of unreal. In a command prompt/shell, e.g.: "/UE_5.0/Engine/Binaries/ThirdParty/Python/Win64/python.exe" -m pip install PySide2
    • If you are working at a studio you may need to install pyside separately. If you have python 3.7 installed separate from Unreal, pip install pyside 2 to that python and then source it in your Unreal project. Search for python in your project settings and add your python site packages /Python/Python39/Lib/site-packages to the Additional Paths.
  • Add your vetala install path to your project python settings. Search for python in your project settings and add the python folder of the vtool package. E.g.: /dev/git/vtool/python
  • launch the ui by running
from vtool import ui 
ui.process_manager()

Templates

https://github.com/louisVottero/vtool_templates

vetala_pose

Resources

Documentation: https://vetala-auto-rig.readthedocs.io/en/latest/index.html

Vetala Youtube channel: https://www.youtube.com/channel/UCcZl_ADvTJXd3xAiPg-jVQQ

Join Vetala Discord Server: https://discord.gg/RgkYeKVeFc

vtool's People

Contributors

louisvottero avatar caterpillarattack avatar louisvotterounity avatar dependabot[bot] avatar iommedia avatar ppautler avatar

Stargazers

 avatar Manuel Köster | shadesoforange avatar Hal avatar yingnierxiao avatar Anthony Lynch avatar  avatar James Deschenes avatar  avatar  avatar  avatar Cesar Lopez avatar Tyler Wilson avatar  avatar Jascha Wohlkinger avatar Adam Fok avatar Aamir Raza avatar Mark Ainslie avatar

Watchers

 avatar Alexei Gaidachev avatar  avatar  avatar  avatar

vtool's Issues

Skin weight export error when no skin cluster

# Warning: V: 	No skin weights found on selected. Please select a mesh, curve, nurb surface or lattice with skin weights.
V: Error!	Traceback (most recent call last):	
V:		  File "E:\dev/git/vtool/python\vtool\util.py", line 76, in wrapper	
V:		    return_value = function(*args, **kwargs)	
V:		  File "E:\dev/git/vtool/python\vtool\data.py", line 1860, in export_data	
V:		    util_file.get_permission(path)	
V:		UnboundLocalError: local variable 'path' referenced before assignment
V:		It took SkinWeightData.export_data: 0.01 seconds

FkCurveRig not giving good feedback when joints = None or []

FkCurveRig currently gives a bunch of errors when passing none to set_joints

# Error: Need at least (degree + 1) control vertices to create a curve span
# Traceback (most recent call last):
#   File "<maya console>", line 5, in <module>
#   File "D:/dev/git/vtool/python\vtool\maya_lib\rigs.py", line 357, in __getattribute__
#     result_values = result()
#   File "D:/dev/git/vtool/python\vtool\maya_lib\rigs.py", line 4062, in create
#     self._create_aims(self.clusters)
#   File "D:/dev/git/vtool/python\vtool\maya_lib\rigs.py", line 4001, in create
#   File "D:/dev/git/vtool/python\vtool\maya_lib\rigs.py", line 3169, in _create_geo
#     return
#   File "D:/dev/git/vtool/python\vtool\maya_lib\rigs.py", line 3025, in _create_curve
#   File "D:/dev/git/vtool/python\vtool\maya_lib\geo.py", line 2851, in transforms_to_curve
#     curve = cmds.curve(p = transform_positions, degree = 1)
# RuntimeError: Need at least (degree + 1) control vertices to create a curve span # 

Would be nice if it gave a descriptive warning instead.

folder and sub folder access

I like this
import_data('WIP/structure') and will add this as a feature
maybe also
import_data('structure.sub_folder') in as well
I mean both, so you can easily access things

Options Int and Boolean getting confused

Boolean options are getting confused with integer options.
This results in 2 entries in the options.
Option Name and option Name1
where Name1 is the boolean.

I apologize to anyone dealing with this issue. Hope to have a fix soon.

vtool/process_manager/ui_data.py error

V: Error!	Traceback (most recent call last):	
V:		  File "E:\dev/git/vtool/python\vtool\util_file.py", line 2456, in create_dir	
V:		    os.makedirs(full_path)	
V:		  File "E:\Program Files/Autodesk/Maya2023/Maya2023\Python\lib\os.py", line 210, in makedirs	
V:		    head, tail = path.split(name)	
V:		  File "E:\Program Files/Autodesk/Maya2023/Maya2023\Python\lib\ntpath.py", line 185, in split	
V:		    p = os.fspath(p)	
V:		TypeError: expected str, bytes or os.PathLike object, not bool
# Traceback (most recent call last):
#   File "E:\dev/git/vtool/python\vtool\process_manager\ui_process_manager.py", line 728, in _item_selection_changed
#     self._update_process(name)
#   File "E:\dev/git/vtool/python\vtool\process_manager\ui_process_manager.py", line 803, in _update_process
#     self._clear_data()
#   File "E:\dev/git/vtool/python\vtool\process_manager\ui_process_manager.py", line 1167, in _clear_data
#     self.data_widget.clear_data()
#   File "E:\dev/git/vtool/python\vtool\process_manager\ui_data.py", line 307, in clear_data
#     self.set_directory('')
#   File "E:\dev/git/vtool/python\vtool\process_manager\ui_data.py", line 301, in set_directory
#     self.data_widget.set_directory(directory)
#   File "E:\dev/git/vtool/python\vtool\process_manager\ui_data.py", line 449, in set_directory
#     self._set_file_widget_directory(directory)
#   File "E:\dev/git/vtool/python\vtool\process_manager\ui_data.py", line 362, in _set_file_widget_directory
#     self.file_widget.set_temp_sub_folder(sub_folder)
#   File "E:\dev/git/vtool/python\vtool\qt_ui.py", line 1751, in set_temp_sub_folder
#     self.data_class.set_temp_sub_folder(folder_name)
# AttributeError: 'NoneType' object has no attribute 'set_temp_sub_folder'
# Traceback (most recent call last):
#   File "E:\dev/git/vtool/python\vtool\process_manager\ui_data.py", line 2256, in _import_data
#     found = self.data_class.get_existing()
# AttributeError: 'NoneType' object has no attribute 'get_existing'

userSetup.py can get accidentally run if "python" dir put on PYTHONPATH

There is a userSetup.py file in the "python" folder, sort of a template for the user copy, modify and put in one of the directories Maya looks in - it isn't intended to be run as is. But if you set up vtool by putting the "python" folder on PYTHONPATH (as one might with a central copy in a studio setting), then Maya will run this one - it runs userSetup.py from all directories on PYTHONPATH

I've create a pull request which moves this file into a separate "install" folder - the name and location doesn't matter, as long as this userSetup isn't in a place that will be put on PYTHONPATH.

Pull request - #26

FK Use Hierarchy should return a dict

FK Use Hierarchy should return a dictionary to easily access joint and control correspondence after the rig is built

something like fk_controls[joint] = corresponding_control

Problem with util_file.fix_slashes and UNC paths

The routine vtool.util_file.fix_slashes() attempts to convert Windows "\" path separator backslashes to the forward slash "/", which will still work on Windows. But it then converts doubled slashes ("//") to a single slash. This is problematic for UNC paths on windows, which start with a doubled separator ("\\hostname\sharename\dirname", etc). Given that example, it produces "/hostname/sharename/dirname", which is no longer valid on Windows. We came across the problem while trying to use a shared network copy the vtool package on a networked drive (UNC path) in our studio pipeline.

    if not directory.find('https://') > -1:
        directory = directory.replace('//', '/')

I'm not sure what the intent of removing the doubled slashes was. Posix filesystems are designed to treat multiple slashes to a single slash and should have no problem with them, and Windows appears to handle doubled slashes internally as well, while removing the initial doubled slash for a UNC path obviously breaks it.

We're going to try just disabling that bit of fix_slashes, and if I get a chance I'll submit a pull request with that patch.

Delivery tool

Be nice for freelancers and sometimes in studio if there was a configurable way to save maya data (and now fbx) to a configurable filepath. Especially for freelancers, this could save out to a dropbox directory, etc and allow for sharing only specific data.

corrective import error

BETA 0.6.171:
# Error: NameError: file /mnt/rez/release/ext/vetala/0.6.15.sse.1.0.0/python/vtool/maya_lib/ui_core.py line 70: name 'selection_change_signal' is not defined

The error occurs when selecting anything in the scene after importing correctives.

fk scale rig hierarchy

fk scale rig with hierarchy used for parenting turned on, does inverse scale on the wrong joints

Add a setting to the process to initialize a process_inst

When templating a process it would be nice to initialize it in the process settings part of the ui. Then options and code could have it initialized and ready. This could help scripts added to the options to run code from the template and scripts run through the code manifest to already have access to the template process inst without the need to run a script at the top of the manifest.

Empty process_manager settings not dealing properly with project history

When adding a project settings history to a list with just one entry, it will not accumulate the entries properly
If there is just one entry in the project history it will replace it automically with the default project. This is confusing behavior.
It seems currently if you add more than one project history entry it will keep

string entry in vetala

The options ui string entry automatically converts to list when commas are found. Converting to a list from an entry like this ["test1","test2"] no longer works.

Bug when selecting a process - probably python3 related

V: Error! Traceback (most recent call last):
V: File "/users/lrpvottero/git/vtool/python/vtool/util_file.py", line 2468, in create_dir
V: os.makedirs(full_path)
V: File "/usr/autodesk/maya2022/lib/python3.7/os.py", line 208, in makedirs
V: head, tail = path.split(name)
V: File "/usr/autodesk/maya2022/lib/python3.7/posixpath.py", line 107, in split
V: p = os.fspath(p)
V: TypeError: expected str, bytes or os.PathLike object, not bool

put update when script turned on

When scripts are turned off they don't get in the put auto complete.
However when a script gets turned on it doesn't update the put auto complete.

Dual Quaternion Weights not working for export/import

9:46 AM]plaidmonthly: Hi @LouisVot !
I haven't had a chance to test the double skinCluster stuff you added recently, but hopefully I will be able to do that soon.
I think I did find a bug with Vetala 0.6.11 running in Maya 2024, however:

If you try to import skin weights that have Dual Quaternion Blend Weights, it sets the skinning method correctly on the skinCluster but it doesn't actually import the DQ blend weights. I'm not entirely sure if it's the import or export function that's not working correctly, but the DQ blend weights are all set to zero after importing.
Image
[9:48 AM]plaidmonthly: I did notice these new options in the UI for the skin weights data, but changing the DQ Blend Weights check box doesn't seem to have any effect.
Image

ast.NamedConstant deprecated

There's a pull request (#29) to fix a typo in a check for Python 3 in util_file.

The check was being done around some use of the stdlib "ast" parsing module. There's a use of the ast.NameConstant, whichI notice is deprecated in Python 3.8, and will eventually be removed. At some point you may want to replace that with ast.Constant, which I think is used for all cases now, but I didn't dig in to make sure. Looks like they are still around in early 3.11 releases, so no rush... :)

process.get_new_process(directory)

Add process class function to initialize and return a new process instance given a path.

This can help with templating to easily get a new process instance given a path.

reference options

In the referenced options, add a button to pull the values from source, so that values can match the source values

code completion error when no sub imports

t = self.completer.handle_text(text)
#   File "D:/dev/git/vtool/python\vtool\qt_ui.py", line 5637, in handle_text
#     passed = self.handle_import_load(text, cursor)
#   File "D:/dev/git/vtool/python\vtool\qt_ui.py", line 5776, in handle_import_load
#     defined = self.get_sub_imports(path)
#   File "D:/dev/git/vtool/python\vtool\qt_ui.py", line 5598, in get_sub_imports
#     defined.sort()
# AttributeError: 'NoneType' object has no attribute 'sort'

ctrl-s in options script

# Traceback (most recent call last):
#   File "E:/dev/git/vtool/python\vtool\qt_ui.py", line 4566, in _save
#     new_last_modified = util_file.get_last_modified_date(self.filepath)
#   File "E:/dev/git/vtool/python\vtool\util_file.py", line 1816, in get_last_modified_date
#     mtime = os.path.getmtime(filepath)
#   File "E:/Program Files/Autodesk/Maya2022\Python37\lib\genericpath.py", line 55, in getmtime
#     return os.stat(filename).st_mtime
# TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

switching projects error

V:		Auto focus
// V:		Imported control_cvs data.
V: Error!	Traceback (most recent call last):	
V:		  File "/users/lrpvottero/git/vtool/python/vtool/util_file.py", line 2429, in create_dir	
V:		    os.makedirs(full_path)	
V:		  File "/usr/autodesk/maya2023/lib/python3.9/os.py", line 210, in makedirs	
V:		    head, tail = path.split(name)	
V:		  File "/usr/autodesk/maya2023/lib/python3.9/posixpath.py", line 103, in split	
V:		    p = os.fspath(p)	
V:		TypeError: expected str, bytes or os.PathLike object, not bool
# Traceback (most recent call last):
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_process_manager.py", line 1811, in set_project_directory
#     self.clear_stage()
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_process_manager.py", line 1884, in clear_stage
#     self._clear_data()
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_process_manager.py", line 1167, in _clear_data
#     self.data_widget.clear_data()
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_data.py", line 307, in clear_data
#     self.set_directory('')
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_data.py", line 301, in set_directory
#     self.data_widget.set_directory(directory)
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_data.py", line 449, in set_directory
#     self._set_file_widget_directory(directory)
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_data.py", line 362, in _set_file_widget_directory
#     self.file_widget.set_temp_sub_folder(sub_folder)
#   File "/users/lrpvottero/git/vtool/python/vtool/qt_ui.py", line 1751, in set_temp_sub_folder
#     self.data_class.set_temp_sub_folder(folder_name)
# AttributeError: 'NoneType' object has no attribute 'set_temp_sub_folder'
V: Error!	Traceback (most recent call last):	
V:		  File "/users/lrpvottero/git/vtool/python/vtool/util_file.py", line 2429, in create_dir	
V:		    os.makedirs(full_path)	
V:		  File "/usr/autodesk/maya2023/lib/python3.9/os.py", line 210, in makedirs	
V:		    head, tail = path.split(name)	
V:		  File "/usr/autodesk/maya2023/lib/python3.9/posixpath.py", line 103, in split	
V:		    p = os.fspath(p)	
V:		TypeError: expected str, bytes or os.PathLike object, not bool
# Traceback (most recent call last):
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_process_manager.py", line 1811, in set_project_directory
#     self.clear_stage()
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_process_manager.py", line 1884, in clear_stage
#     self._clear_data()
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_process_manager.py", line 1167, in _clear_data
#     self.data_widget.clear_data()
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_data.py", line 307, in clear_data
#     self.set_directory('')
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_data.py", line 301, in set_directory
#     self.data_widget.set_directory(directory)
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_data.py", line 449, in set_directory
#     self._set_file_widget_directory(directory)
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_data.py", line 362, in _set_file_widget_directory
#     self.file_widget.set_temp_sub_folder(sub_folder)
#   File "/users/lrpvottero/git/vtool/python/vtool/qt_ui.py", line 1751, in set_temp_sub_folder
#     self.data_class.set_temp_sub_folder(folder_name)
# AttributeError: 'NoneType' object has no attribute 'set_temp_sub_folder'
V: Error!	Traceback (most recent call last):	
V:		  File "/users/lrpvottero/git/vtool/python/vtool/util_file.py", line 2429, in create_dir	
V:		    os.makedirs(full_path)	
V:		  File "/usr/autodesk/maya2023/lib/python3.9/os.py", line 210, in makedirs	
V:		    head, tail = path.split(name)	
V:		  File "/usr/autodesk/maya2023/lib/python3.9/posixpath.py", line 103, in split	
V:		    p = os.fspath(p)	
V:		TypeError: expected str, bytes or os.PathLike object, not bool
# Traceback (most recent call last):
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_process_manager.py", line 1811, in set_project_directory
#     self.clear_stage()
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_process_manager.py", line 1884, in clear_stage
#     self._clear_data()
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_process_manager.py", line 1167, in _clear_data
#     self.data_widget.clear_data()
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_data.py", line 307, in clear_data
#     self.set_directory('')
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_data.py", line 301, in set_directory
#     self.data_widget.set_directory(directory)
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_data.py", line 449, in set_directory
#     self._set_file_widget_directory(directory)
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_data.py", line 362, in _set_file_widget_directory
#     self.file_widget.set_temp_sub_folder(sub_folder)
#   File "/users/lrpvottero/git/vtool/python/vtool/qt_ui.py", line 1751, in set_temp_sub_folder
#     self.data_class.set_temp_sub_folder(folder_name)
# AttributeError: 'NoneType' object has no attribute 'set_temp_sub_folder'
V: Error!	Traceback (most recent call last):	
V:		  File "/users/lrpvottero/git/vtool/python/vtool/util_file.py", line 2429, in create_dir	
V:		    os.makedirs(full_path)	
V:		  File "/usr/autodesk/maya2023/lib/python3.9/os.py", line 210, in makedirs	
V:		    head, tail = path.split(name)	
V:		  File "/usr/autodesk/maya2023/lib/python3.9/posixpath.py", line 103, in split	
V:		    p = os.fspath(p)	
V:		TypeError: expected str, bytes or os.PathLike object, not bool
# Traceback (most recent call last):
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_process_manager.py", line 1811, in set_project_directory
#     self.clear_stage()
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_process_manager.py", line 1884, in clear_stage
#     self._clear_data()
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_process_manager.py", line 1167, in _clear_data
#     self.data_widget.clear_data()
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_data.py", line 307, in clear_data
#     self.set_directory('')
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_data.py", line 301, in set_directory
#     self.data_widget.set_directory(directory)
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_data.py", line 449, in set_directory
#     self._set_file_widget_directory(directory)
#   File "/users/lrpvottero/git/vtool/python/vtool/process_manager/ui_data.py", line 362, in _set_file_widget_directory
#     self.file_widget.set_temp_sub_folder(sub_folder)
#   File "/users/lrpvottero/git/vtool/python/vtool/qt_ui.py", line 1751, in set_temp_sub_folder
#     self.data_class.set_temp_sub_folder(folder_name)
# AttributeError: 'NoneType' object has no attribute 'set_temp_sub_folder'

removing a tag from shape combo produces this error

# Traceback (most recent call last):
#   File "E:/dev/git/vtool/python\vtool\maya_lib\ui_lib\ui_shape_combo.py", line 1574, in _right_click_remove_tag
#     self.remove_tag(self._right_click_tag)
#   File "E:/dev/git/vtool/python\vtool\maya_lib\ui_lib\ui_shape_combo.py", line 1625, in remove_tag
#     self.manager.remove_tag(tag_name)
#   File "E:/dev/git/vtool/python\vtool\maya_lib\blendshape.py", line 2142, in remove_tag
#     data_dict.pop(tag_name)
# KeyError: 'test'

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.