What is up?!

Okay been a bit, what is new?! First it’s personal, then some pictures. For added effort, a couple links to some ‘Braindance’ and ‘micro house’ I would be caught listening to.

I’ve just completed my finals for an A.I. for Robotics class. Wow. It’s was a wonderful follow-up to my first class, Intro. to Artificial Intelligence. My brain has been stretched in good ways, and my Python programming chops are up.

It was fascinating to learn about what used to be a mysterious concept to me. I’m not sure how I’ll use my new found powers, but I’ll try and use them for good. Obama asked the nation to ‘get educated’ and I’m doing my part. Even better, both classes were free! If you have any interest in Computer Science (of which A.I. is part of) I suggest checking out UDACITY. It almost goes without saying but Khan Academy was part of these efforts.

Work – you gotta do it and I’ve been busy, working for Lowes while on duty at Mass Market apparently.

2 wide shots of garden carpet unrolling around 11 seconds in. Houdini, mantra, Nuke. Maya, Arnold.

CG Sup. I got my hands all over this one, but the credit is certainly shared with my friends! Maya, Arnold, Nuke. Vray for door knobs.

And just in case you’re not sure ‘what we did’.

Lastly, I can’t take any credit for the paint simulations (that was ILP), but I did the pre and post visualization. Don’t worry though, I’ll be getting my hands wet soon enough. Maya, Naiid, V-Ray, Nuke.

Now for some fuggin jams! This is typically the kinds of things I listen too while working. First some Braindance by Global Goon…

Then some ‘micro house’.
DJ more

More of the above here.

My 2011 Visual Effects Demo Reel

I present my 2011 VFX Demo Reel with all new content.
Pinkreel 2011. 113MB. HD720p. 24fps. 3:03. H.264. Help from many. Music by Plaid.
High resolution version of the above picutre.
It’s been a few years since my 2007 demo reel, I hope you enjoy it.

You can find a detailed list of my responsibilities for the various spots on my resume page. Plus I’m happy to discuss ‘how we did it’. That’s the fun part.

This was edited on my Debian Linux 6.0 “squeeze” distribution (64-bit) with Kdenlive. I used Quicktime compressed with JPEG maximum quality for the intermediate codec from original source material. Running on an Intel Core i7 CPU. The playback was pretty amazing. This is why I donate to free and open source software and you should to.

Maya and Python and menus oh my!

Updated, was, “Multiple Python commands with Maya’s menuItem MEL”

Maya drives me nuts. I really wish I could spend my day in Houdini to see if it sucks less. Anyway, I digress. Python is awesome. Python’s integration with the rest of Maya is, well lacking.

I like to add my own ‘Pinkwerks’ menu to the main menu bar in Maya for ease of access to my favorite hacks. Turns out, you can’t add a custom menu to the main menu bar in Maya via userSetup.py as you would in userSetup.mel – It doesn’t seem to have access to the GUI when it’s evaluated during Maya’s start-up. Maybe someone can prove me wrong. So, I’m lamely forced to writing my own menu for the main menu bar with classic MEL which looks something like this.


global string $gMainWindow;
setParent $gMainWindow;
global string $gPinkwerksMenu = "Pinkwerks";
menu -label "Pinkwerks" -allowOptionBoxes true -tearOff true $gPinkwerksMenu;
menuItem -label "My Fancy Command" -command "myFancyCommand";

Now, let’s bring the pain. You’ve written a Python script and you want to call that script from a menuItem (as in the last line in the above code). A couple of points.

If you write foo.py and put it in MAYA_SCRIPT_PATH it isn’t loaded automagically like a .mel. (You’ll recall that if you name a .mel with the same name as a global function, it’s automatically callable by Maya at run-time. For instance if you have a file ‘myNoise.mel’ in a directory in the MAYA_SCRIPT_PATH environment variable and it contains a function in the form of ‘global proc myNoise(…){…’ you can type ‘myNoise’ at the MEL prompt or script editor and Maya will ‘find’ it without having to source it first.

This means if you have a Python function ‘myPyFunk’ in foo.py (and it resides in your MAYA_SCRIPT_PATH) – you still have to ‘import foo’ before you can call foo.myPyFunk(). Trouble is, this is two steps, the ‘-command’ argument to menuItem won’t evaluate a newline, even if you try and escape the hell out of it. So instead of foolishly trying this:

*BAD CODE FOLLOWS*

menuItem -label "My Py Funk"
-c "python(\"import foo\nfoo.MyPyFunk()\")";

To work around this you can structure your commands like so:
*GOOD CODE*

menuItem -label "My Py Funk"
-c "python(\"import foo\");python(\"foo.MyPyFunk()\")";

One last method of calling Python scripts before I wrap this up. If you’re like me, you tend to write code in and external editor. In Maya, for ease of use you want something analogous to `source mySheet.mel’, which reloads the file and runs the main task. You can get away one-liner simple execution of python scripts like so from the Python prompt or script editor tab:


execfile("/home/pink/maya/script/foo.py")

This trick is achieved by adding the 2 lines below to the end of your .py. This assumes you wrap the guts of your script in a function named ‘doit()’. The Python interpreter will automatically call the function ‘doit()’ when it parses this file during the execfile(). Note in this case, anything you type in the foo.py will be evaiuated with exec, so I tend to wrap everything in a function and don’t leave any `raw’ python lying about.


def doit():
sel=ls(sl=1)
for s in sel:
...

if __name__ == '__main__':
doit()

Unfortunately this process is less clean than MEL in terms of ease of integration, but not so bad once you get over the ‘gotchyas’. Personally, I’m digging PyMEL.

Easy right?