How can I parse a mayaBinary file?
mayaAscii files are easy to parse: Just open them in a text editor. But how about a mayaBinary?While I have yet to try it, this suite of tools appears to be able to do...
View ArticleHow can I store and read metadata in Maya files, without having to open them?
I've wanted a way to be able to store metadata to Maya files that could be read without having to actually open those files in Maya. I started a thread here, that got a working...
View ArticleHow can I execute a smooth bind?
So simple, but I always seem to forget the syntax... :-Simport maya.cmds as mc sc = mc.skinCluster(someListOfJoints, aMesh, dropoffRate=5.0, maximumInfluences=4, toSelectedBones=True) print sc #...
View ArticleCalculate pi
Pi is the ratio of the circumference of a circle to its diameter, approximately 3.14159. So if you wanted to calculate this yourself:# Python code: # diameter is circumference / pi: diameter = 5.0 #...
View ArticleHow can I force an open file to "save as"?
import maya.cmds as mc mc.file(renameToSave=True) From this tip by Morgan Loomis.Note, I have been unable to find something comparable in PyMel, so I end up doing this:pm.mel.eval("file -renameToSave 1")
View ArticlePyMel : File command access
PyMel took the file command and split it apart into its own package, pymel.core.system. Cheat sheet for where all the functionality has gone:For the below examples:import maya.cmds as mc import...
View ArticleI can't get a movie to play in Maya, why?
Talking to the Autodesk devs (for Maya 2016+) they reported if you use "h.264 codec and mpeg4 codecs that were in .mov", it should work. Unfortunately neither movies I compress this way work for me,...
View ArticlePython & Qt versions in Maya
MayaPythonQtCompatible PyQtCompatible PySideWin CompilerLinux CompilerMac Compiler8.52.4.320082.5.132bit & 64bit vc8.0 + SP1 + qtHotfix, Intel 9.1.03432bit & 64bit, gcc 4.1.2, Intel...
View ArticleHow can I connect to the next instance of an array or multi attr?
Always have trouble trying to connect to the next index in an array attr.The connectAttr command has a 'nextAvailable' arg, but I've never been able to get it to work.So instead, query the size of the...
View ArticlePyMel : Connection Access
Three transforms, 'nodeA', 'nodeB', & 'nodeC'. nodeC.translateY is connected to nodeB.translateY, & nodeB.translateX is connected to nodeA.translateX.import pymel.core as pm nodeA =...
View ArticleWhy does my loop code crash in 2016?
Update:I've been told, but not yet tried, that you can execute this code after your loop, and it may also stop the crash:mc.evaluationManager(invalidate=True) A number of tools that loop over frames...
View ArticleHow can I convert rotation to translation?
The vectorProduct node can aid with this, concepts below, using a joint.Create a new vectorProduct node, and set it's 'operation' to 'Vector Matrix Product'.Connect the output myJoint.matrix attr to...
View ArticleHow can I add an Attribute Editor template for a custom node?
The core command is the editorTemplateGenerally this is called to when making a some new plugin based MPxNode subclass.One way to support a custom node is to make a custom...
View ArticleHow do I find what version of Maya I'm running?
aboutNote it's values are string, not int.import pymel.core as pm print "version:", pm.about(version=True) print "apiVersion", pm.about(apiVersion=True) print "installedVersion",...
View ArticleWelcome
AboutInstructionsLatest Updates...Always refresh your cache (F5 on most PC browsers) to see the latest stuff...Browse \ Search using Ctrl+F:<--- Major Categories in the Left columnKey-word Tags in...
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 ArticleWorking with proxy attrs
I can't believe how long I've been working in Maya without knowing about this feature.In a nutshell, 'proxy' flagged attributes act like bi-directional attrs. Or to put it another way, they're like...
View ArticleDash Scripting
Introduced in Maya 2018To activate the Dash Script EditorSelect one or more attributes in the Channel Box.Alt + right-click anywhere in the Channel Box.Maya displays the Dash Script Editor where you...
View ArticleUnderstanding Maya Modules and Pacakges
DocsMaya 2018Older Maya blog postModules are a way to distribute custom plugins, but can also be used to configure global Maya script & plugin paths in general.A given module will udpate Maya's...
View ArticleMy window is missing / off-screen: How do I get it back?
Sometimes windows go missing, usually hiding off-screen somewhere. The brute force approach is to quit Maya, and delete this file:windowPrefs.mel Which will reset all the window positions to factory...
View Article