I want to open an Attribute Editor for a certain object. How to do so?
showEditor($myObjName); Also see:How can I create a floating Attribute Editor for the selected node?
View ArticleHow can I create a floating Attribute Editor for the selected node?
A combo of the mel copyAEWindow & showEditor global procs, which lives in this script:C:\Program Files\Autodesk\Maya20XX\scripts\others\showEditor.mel string $sel[] = `ls -sl`; showEditor $sel[0];...
View ArticleHow can I turn off Maya's refresh?
Often times when engaging in such activities as baking animation curves, you can speed up Maya's performance by replacing the current 3d view (modelPanel) with a non-refreshing item, like the Outliner....
View ArticleMaya compiler versions
This post has a pretty extensive overview:http://around-the-corner.typepad.com/adn/2012/06/maya-compiler-versions.html
View ArticleHow can I query if Maya is open?
In Windows the tasklist command will return this info. Example if you have two Maya's open:> tasklist /FI "IMAGENAME eq maya.exe" Image Name PID Session Name Session# Mem Usage...
View ArticleCommand: currentUnit
Find\set the current LINEAR (meters, feet, etc.) units, ANGULAR (degrees, radians) units, or FRAME RATE (film, video, etc.) that Maya uses.
View ArticleHow can I query the width and height of the active view or panel?
Based on this post by Ryan Trowbridge, I found some code I slightly changed to spit out the width and height in pixels of the active view. The rest of the module he wrote to render selected meshes is...
View ArticleHow can I track the mouse's position in realtime?
A couple different solutions I've come up with:autoPlace running in a Python Thread:The autoPlace command can return the mouse's current 3d worldspace position (always in cm). If you execute that in a...
View ArticleHow can I open a Windows Explorer or Mac Finder window to the same directory...
Mel solution, for Windows:system("start explorer " + toNativePath(dirname(`file -q -sn`))); Python solution, for Mac:import os import subprocess import maya.cmds as mc def main(): fn =...
View ArticleAPI: Commonly used classes
Scratch-pad as I become more familiar with the various API classes. Also see:API: class organizationStarting with Maya 2013, they offered a API Class Taxonomy online, which is all classes arranged...
View ArticleCommand: attributeQuery
On an individual attribute on an individual node, use to find:If the attribute existsIf it is a mulit-attributefind the range of its valuefind any "sibling" attributesfind its parent attributefind any...
View ArticleCopyright Information
Much of this I have learned from others, we all ride on shoulders of giants. But for what I present as my own work, it's under the below licence:All information on this wiki is under the Apache...
View ArticleUnderstanding and creating hotkeys
Notes on the below info:The top section shows two different ways for authoring hotkey commands. I've only had success using runTimeCommand: using namedCommand just doesn't seem to work. When authoring...
View ArticleAPI: How can I find the working units?
The below classes compare with the mel currentUnit command.The below classes have the ability to query both the internal units, and the ui units (except MTime). The internal units, while they can be...
View ArticleAPI: How can I convert from linear internal units to ui units?
When dealing with the API, all linear 'internal units' are held in cm (unless overridden, but I've never seen this happen). But if you're passing that data to mel/Python commands, they expect the...
View ArticleAPI: Apply vertex color
Mel has the polyColorPerVertex command, that will change the color of one vertex at a time. This works fine you're doing it on less than 100 verts at a time. But on more than 1000, it really starts to...
View ArticlePlayblast settings for use on iPhone
I've heard this used successfully (Maya 2013):Format: qt (quicktime)Encoding: Sorenson VideoQuality: 50%Display size: Custom, 1280 x 820Scale: .5Notes: 15 sec clip is about 5 megs.Thanks for the tip TJ ;)
View ArticleHow can I do vector math via Python in Maya?
Python has no built-in vector math calls :( You can see my notes on this here. In Maya however, you have a few solutions to continue to do vector math:Method A: Write your own wrappers around the mel...
View ArticleWhy does Maya create unitConversion nodes?
When connecting attribute to attribute, sometimes you'll see Maya introduce a unitConversion node. For the longest time (until today, using Maya 2013) I've always wondered why this is. For example, if...
View ArticleWhy does my motionPath have a different length than reported by my curve?
A motionPath node can report a different 'length' than other curve querying nodes like nearestPointOnCurve, or even the curve itself. Here is a breakdown of what I've found:nurbsCurve.minValue,...
View Article