Saturday, 27 May 2017

Maya channelBox in-line math operations


I wanted to make a post about this common technique, that not every TD in Maya knows. Especially the new ones who maybe switched from XSI or 3ds max.

How can make relative proportional change of one attribute value for multiple selected objects in Channel Box.


Imagine you have bunch of locators on one side, all different position, and you want to make duplicated locators on opposite side across some axis, let`s say world X.
So you duplicate them first and with the duplicated locators selected, you can now click select the TranslateX channel number field ( make sure its the number field, not the name) and now type:

*=-1

This simple formula will multiply each selected locator TranslateX value. And the effect will be moving them to the opposite side.

You can read more here at this post by Asephei.
http://asephei.blogspot.cz/2011/03/maya-numeric-expressions-in-channel-box.html





Thursday, 18 May 2017

Maya python UI passing argument in command

Here is example of Maya UI code in case you need to build in a command to UI element which passes an argument.
More about this technique here:
http://download.autodesk.com/us/maya/2011help/pymel/ui.html

Note - this is all one function myUI(), where buttonPressed is function defined inside that function. It doesn`t have to be, but this way it is localised and only visible to the UI function.

import maya.cmds as mc

def myUI():

    def buttonPressed(name):
        print "pressed %s!" % name

    win = mc.window(title="My Window")
    layout = mc.columnLayout()
    btn = mc.button( command = lambda *args: buttonPressed('chad') )

    showWindow()



Saturday, 14 January 2017

Maya 2017 Pose Editor script tweak

If you worked with Pose Editor in Maya 2017 there is a chance you got an error when using Add Pose function.

In case your mesh shape was the same like its transform parent. For example transform: "body_geo" has shape: "body_geo". Maya will get clashing name problem when using duplicated shape which gets created for Pose Shape. Because duplicate command does not return long names.

If you want to prevent this to happen, just edit the duplicate command in file:

Maya2017/plug-ins/camd/scriptsposeInterpolatorAddShapePose.mel

add -rc flag to duplicate command on line 19 like this:

string $copyMesh[] = `duplicate -rc $longName`;

This is renameChildren flag which makes sure that new DAG nodes will have unique names. The whole edited file is also available for download on this link:
https://drive.google.com/open?id=0B7o5K0aCMVWPdURJMkdYOXpROFE


Free Animation Tools

I just got couple of tips for some great Maya animation tools. And it`s even better because they are FREE ;)

http://www.studiolibrary.com/

http://camiloalan.wixsite.com/atoolswebsite




Sunday, 1 January 2017

Find the biggest files on your Google Drive

Here is handy link in case you are using Google Drive to store you data on cloud. In case you want to do some (New Year) clean up:
https://drive.google.com/drive/quota

Just be careful not to delete anything important ;) Better download to your local drive before.