PyMel : Renaming nodes
By default, PyNodes have a rename method that is pretty straight forward:import pymel.core as pm node = pm.PyNode("null1") node.rename("awesomeNull") You can also easily rename them with a namespace,...
View ArticleHow can I add a new target to a blendshape node?
Presuming you have a head mesh called head, that already has a blendshape node input called blendShape1, add a new mesh called headShape3 as the next target in the list:import pymel.core as pm...
View ArticleCommon & usefull commands
Here is a growing list of commands for the new coder that I consider super useful.Data Query:ls : Used for querying nodes in Maya. By selection, by type, by name, by any number of different rules....
View ArticleMaya compiler versions
These posts have a pretty extensive overview:Maya 2008 -> 2013Maya 2014Maya 2015Maya 2016Maya 2016.5, aka "Extension 2".Also see:Python & Qt versions in Maya
View ArticleMainMenu
Welcome:About mel wiki:Instructions For Use:Latest Updates:Maya Links:About Author:Copyright Information:Subscribe:RSSAll...
View ArticleHow do I turn the mouse into a mocap device?
recordAttrNote : This tool only appears to work if Maya is in cm UI units :SExample:Select the object you want to record motion on.In the script editor, enterrecordAttr -at "translateX" -at...
View ArticleHow can I snap mesh together by 3 points?
Maya's tool for this is a bunch of mel wrapper code. If you want to proceduralize it, you can use this hacky way below:It will snap all mesh to the last picked, based on the same 3 verts that exist on...
View ArticleAPI : How can I detect a ray intersection with a mesh or face?
http://help.autodesk.com/view/MAYAUL/2017/ENU/?guid=__py_ref_class_open_maya_1_1_m_fn_mesh_htmlMFnMesh.closestIntersectionNote, I'e been unable to get this to work via maya.OpenMaya, but I have got it...
View ArticleBatching Maya Files via Python
This subject is about batching Maya files in a session of Maya other than the one that is currently open, via Python. It's one thing to (via the currently opened Maya) loop over a list of files opening...
View ArticleMASH : MASH_Python node
MASH_Python node docs (Maya 2016)MASH Python Youtube TutorialThis is the default Python that comes with the MASH_Python node:import openMASH #initialise the MASH network data md =...
View ArticleMASH Basics
Scratchpad as I learn MASH.MASH Docs (all Maya 2016):MASH Procedural EffectsMASH Node OverviewMASH Utilities : MASH Utilities are a set of helpful tools unique to MASH networks. You can access them by...
View ArticleHow can I edit the the custom gradient values for the Paint Skin Weights Tool?
There is a 'Gradient' dropdown in the 'Paint Skin Weights' tool, that allows you to "Use Color Ramp", then set that color.But how can you set it through script?The default values for the gradient...
View ArticleMaya open error with msvcr90.dll
Been seeing an error pop open a lot on new installs of Maya in Windows 10. Something like this:Microsoft Visual C++ Runtime Library Runtime Error! Program: C:\Program Files\Autodesk\Maya2016\maya.exe...
View ArticleSource Analysis in Wing
This subject is about getting source analysis \ auto-completion functionality setup in Wing IDE for Maya's maya.cmds and maya.OpenMaya (and associated API) packages.Note, Wing has their own tutorials...
View ArticleAPI : How to compile a plugin
All of the api (OpenMaya) work I do is via the Python bindings. And plugins authored that way don't need to be 'compiled', since they're considered 'scripted plugins'. Sometimes however I'll run into...
View ArticleHow can I add a command to the 'Recent Commands' menu?
Maya has a repeatLast command, that appears to be undocumented (as of Maya 2016). Here's the interactive help:help repeatLast; // Result: Synopsis: repeatLast [flags] Flags: -e -edit -q -query -ac...
View ArticleWhy does my loop code crash in 2016?
A number of tools that loop over frames that worked in 2015 & earlier will now hard-lock Maya in 2016. I have yet to find the direct cause, but the fix is to exit 'parallel' evaluation mode (if you...
View ArticleThe Evaluation Graph Bugs, notes, and other info
Maya 2016 introduced the Evaluation Graph. Bugs:The MPxNode.schedulingType method isn't supported in 2016 OpenMaya Python APIIssueYou can't do this, it's not supported: def schedulingType(self): return...
View ArticleEvaluation Graph: Node types to avoid
When running the evaluation graph in parallel mode, there are certain node types that will stop it in its tracks, and push it back into serial mode. These nodes include:ExpressionsAvoid them, they are...
View Article