VStudio Plugin Build Environment for Maya_2012-x64 and Beyond

maya2011_thumbFree yourself from relying on other people to compile your beloved 3rd party plugins.  If you are interested in learning to write plugins it’s a great exercise to do it yourself.  Also take a look at the source code.  If it doesn’t make sense at first, sooner or later it will if you are dedicated to learning c++ or python or other OOP language for that matter.

Here are some concise steps to downloading, editing, and building the source of Micheal Comet’s poseDeformer yourself.  I’m not supplying the link to the source but you should do a quick search to find it.  If you weren’t aware of this awesome plugin dig in to figure out what it does by reading all about it and actually look into the code!  There are also download links out there that have the plugin completely compiled for you on Windows up till 2014.  To really learn, try building it from just the source and then undo from last to first the steps to setup the environment to see what happens when a project fails and actually read the debug output to try and make the connections yourself.

Windows 7 SDK:

  1. Download and install the Windows Software Development Kit version 7.1. Visual C++ 2010 Express does not include a 64 bit compiler, but the SDK does. A link to the SDK:http://msdn.microsoft.com/en-us/windowsserver/bb980924.aspx

To make a VC Studio 2010 project:

  1. Start a new empty project in a directory other than source, name it poseDeformer
  2. Add the source files and header files by right clicking > add > add existing > choose files from extracted source.
  3. Right-click on the project and choose “properties”
  4. It’s probably a good idea when you’re following along to click “apply” after each step when you’re editing in the “properties” dialog
  5. Pull up the “configuration manager”
  6. Find your project, hit the Platform drop-down, select New, then select x64. Now change the “Active solution platform” drop-down menu to “x64.”  ”copy from” drop down can read <empty>
  7. Change your toolset. In the Properties menu of your project, under Configuration Properties > General, change Platform Toolset from “v100″ to “Windows7.1SDK”
  8. Go to General under Configuration Properties
  9. Set the target extension to “.mll”
  10. Set the platform toolset to “Windows7.1 SDK”
  11. Set the configuration type to “dynamic link library (.dll)”
  12. Go to the VC++ Directories panel
  13. Append “;C:\Program Files\Autodesk\Maya2012\include” to the include directories
  14. Append “;C:\Program Files\Autodesk\Maya2012\lib” to the library directories
  15. Navigate to C/C++ and Preprocessor
  16. Append “;NT_PLUGIN;REQUIRE_IOSTREAM” to Preprocessor Definitions
  17. Navigate to Linker and Input
  18. Append to additional dependencies the following list: “;Foundation.lib;OpenMaya.lib;OpenMayaUI.lib;OpenMayaAnim.lib;OpenMayaFX.lib;OpenMayaRender.lib;Image.lib”
  19. This step is optional, some instructions out there say to append: /export:initializePlugin /export:uninitializePlugin to Linker > Command Line Additional Options.  Don’t do it and run debug compilation to see if it works first!
  20. Open up poseDeformer.cpp and poseDeformerEdit.cpp and append this line at the top of the includes: #include <maya/MIOStream.h>
  21. Build

Next up:  Speed up build for future Maya releases with precompiled Maya headers & compile for Linux.

Helpful source link:
 

[Maya-Config] Maya Environment: Phase I.I

maya2011_thumbThis post includes some additional important support material for what was discussed in [Maya-Config] Phase I.  I felt it needed a bit more elaboration than what I had time for.  I will continue with Phase II next time.

Felix Baumgartner Red Bull Stratos Space Jump Oct 14 2012

Felix Baumgartner Red Bull Stratos Space Jump Oct 14 2012

Continue reading

 

Character TD Demo – The Kaylee Rig (Sticky)

Fighting the urge to be unproductive, I locked myself in the house for the past few days to get some work done on a new character TD demo.  Been under the weather anyhow and didn’t feel like doing much else, not even surf *gasp!*.  Here it is in all it’s beautiful animator friendly simplicity.  I plan on extending this demo with character animation tools.  I can’t wait to get away from creating demos and rendering video and go back to actually programming and rigging stuff!  I have so much more advanced rigging techniques to show and some that haven’t gotten to a finished stage on my characters yet so stay tuned.

Continue reading

 

Hephaestus Animated Short Film Work

hephaestus header

From Director/Animator Alex Curtis comes his debut animated short that I luckily got to work on as a freelance pro bono character rigger/td.  Here’s a work in progress reel and Kaylee the character I rigged and supervised rigging the hair and goggles with the help of my friend Suchan.  Keep in mind this demo is months old at this point and a newer one is out that is password protected so I cannot share until later.

Kaylee showin' off her moves

Stay tuned!  The final is looking good!  Should be any day now…

 

Indie Facial Performance Capture R&D

Suchan, a buddy from Nepal, just broke the independent game dev facial performance capture animation barrier.  He deserves kudos for getting it to this stage.  This would be such a valuable asset to any gaming company if he brings it to the next level or even at this stage I suspect.  Suchan is on a solo climb of Mount Mocap and while he is a base camp right now, I expect he could make the difficult summit by himself!  ;)   Nice job!

I wonder how much harder it would be to actually be able to do facial mocap from your smart phone directly to a character in Maya or Unity app without any markers, to me that’s Everest.  It is, however, a tangible goal these days for developers and all the freely available mocap tech that’s on the market these days.

 

Character Development and Rigging for Facial Animation Part 1

This demo illustrates the steps taken to develop a character from concept sketches to finished facial rig in a simplified format. This is an actual rig I developed with the use of proprietary rigging tools in Maya utilized daily at work so I’m not going to demo those tools. However, future installments will incorporate the use of tools that I have written and that you can use to aide the building of complex facial rigs such as this, and include overviews of more advanced rigging techniques. I would also like to break the process down into chunks to really go into more detail about things you should be thinking about if you are trying to rig a face. This is an ongoing process so stay tuned, I have lot’s of useful tips to share.

Continue reading

 

Python in Maya: pyWin32 Clipboard Data Modules Update

pythonUse windows clipboard data in your Maya Python scripts or other generic python.

Dependencies:
setuptools – You should have setuptools installed.
pip – If you have setuptools and/or use easy_install switch to pip by using easy_install to download and install pip, you won’t be sorry.  Pip is awesome, setuptools sux. ;)
pyWin32 – Use pip to download pyWin32 from the commandline using pip install pyWin32.  Copy the installation to your Maya site-packages folder including any .pth, .txt, or .egg-info files.  Tip:  open .pth files in a text editor of choice and check out where pip’s libs are.

'''
based on mel script found here: http://bit.ly/e4qdyH
'''
import win32clipboard

def getClipboardData():
 win32clipboard.OpenClipboard()
 d = win32clipboard.GetClipboardData( win32clipboard.CF_TEXT )
 win32clipboard.CloseClipboard()
 return d
getClipboardData()

def putClipboardData(text):
 win32clipboard.OpenClipboard()
 win32clipboard.EmptyClipboard()
 win32clipboard.SetClipboardText( text )
 win32clipboard.CloseClipboard()
t= 'test text'
putClipboardData(t)

This is based on what I found on teacup’s techy art stuff, written a while ago. I though it deserved an update, plus I needed it for something specific. It is a really handy module to have in your repertoire.  I posted these in a hurry so you probably need to add in some checks to make sure the datatype you are trying to retrieve is text only or else you’ll get errors.

 

PyQt and Qt obviously are way more powerful for getting other types of data including pixmap and slew of others.  This is simplified for a specific purpose.  Maybe soon I will be able to post a Qt version including drag and drop functionality.

 

Python in Maya: Recursively Add Directories to PYTHONPATH

pythonHere’s a script I wrote for adding sub-directories of paths I’ve already added to the sys.path in my userSetup.py.

I’m just starting to code seriously in python and it seems like just getting everything to work right in Maya without a lot of fuss is pretty daunting for a beginner with little outside help except for the internet and a couple books.

As my Script Repo develops over time, I don’t want to have to keep worrying about PYTHONPATH having everything in it so I tell it where the root directories are and this script does the rest. ;)

Hope somebody finds this helpful!

import sys
from os import walk
path = ja_python_paths
for p in path:
 for root, dirs, files in walk(p):
 if p is not root:
 sys.path.append(root)

#You can add an optional print statement at the end
#to see what it's doing...

if p is not root:
 print 'adding', root, 'to sys.path'
 sys.path.append(root)