Open for business

…thanks to today’s press releaseSledgehammer Games is official.  But we still don’t have a web site 😛

I started work here a couple months ago after departing EA (after 7.5 years, wow!), and it’s been a great experience.  Making that change was one of the hardest things I’ve ever had to do: leaving great friends, years of tech, and job stability.  But onwards and upwards!

Here’s what Kotaku has to say on it <link>

I’m on the wave

Google Wave that is:
https://wave.google.com

I have no idea what I’m doing… but… I’m doing it!
No, I don’t have any invites, sorry :(

Mel command argument passing in Python

From over on my mel wiki

Python has some shortcuts you can implement when passing arguments to mel commands (or other Python functions).
Take for example a sphere (named pSphere1) that you want to scale. Here is the basic mel to do so:

float $scaleVals[] = {1.0, 2.0, .5};
// optionA:
setAttr pSphere1.scale -type double3 $scaleVals[0] $scaleVals[1] $scaleVals[2];
// optionB also works:
setAttr pSphere1.scale $scaleVals[0] $scaleVals[1] $scaleVals[2];

Likewise in Python, you can do something very similar:

import maya.cmds as mc

scaleVals = [1, 2, .5]
# optionA:
mc.setAttr("pSphere1.scale", scaleVals[0], scaleVals[1], scaleVals[2], type="double3")
# optionB also works:
mc.setAttr("pSphere1.scale", scaleVals[0], scaleVals[1], scaleVals[2])

However, in Python you can pass all the args in as a list\tuple variable by prefixing the variable name with an asterisk ‘*’. The function (mel command) will unpack the variable as individual positional arguments. It’s important that the variable have the same number of items as the command expects argument values, or a Python RuntimeError exception will be raised:

# option C, much cleaner!:
mc.setAttr("pSphere1.scale", *scaleVals)

You can see more about how this argument system works over on my Python Wiki.

Just ran into HYPE

HYPE appears to be to ActionScript 3 as Procesing is to Java.  I like seeing these higher-level wrappers of the languages available to the user community:  I was really excited when I first started using Processing, it opened a lot of doors for me creatively.  Looking forward to seeing what the HYPE user-community produces.

Updated Pygame Tablet Pressure

This blog post has its own page:  Check there for latest info.

Updated to version 1.3:  Realized that I didn’t need to track mouse position and button-presses in the Tablet class:  Pygame does all this for you.  Solves a lot of problems.  Tablet object now only returns back pressure info, which is all we really want from it anyway.  The example ‘Pressure Test’ app has been updated as well to reflect this as well.