Monday, 8 September 2014

Quick Tip : P4Python Tickets and Motionbuilder 2013

Motionbuilder 2013 uses Python 2.6 and unfortunately P4Python 2.6 does not support tickets (or not in an obvious way that I could find). Trying to access tickets through the module will result in the following error.
However simply adding the run_tickets function from P4Python 2.7 into P4Python 2.6, will give you access to tickets through 2.6, and thus Motionbuilder.

Simply add the following function into your P4Python 2.6 module, within class P4().


Sunday, 9 March 2014

Motionbuilder : Creating a 3rd Person Game Camera System

If your game engine stores camera settings in a Python parsable language, for example JSON or xml, you may be able to port your engines camera system into Motionbuilder. 

The idea is to give animators the exact same cameras from game, in Mobu and with the same control (XBox pad). Gabriel Ware did a very nice tutorial on creating a 1st person camera system a few years ago, and I thought it would be nice to share my findings on creating a 3rd person camera setup

Although I wont go directly into the math behind our camera system at work, I will show a simplified version, with all the relevant systems in place, and it should be obvious by the end of this tutorial how to extend the system, or adapt it for your own needs.

Thursday, 13 February 2014

Python Importing : Import Correct Module Based on Caller

EDIT:
Please view comments below for suggestions doing this in a more elegant fashion. Cheers for the comments and tips guys :)


Sometimes you might need to find out where a module is being called from. For example if you have multiple different versions of a module and want to import the correct one, depending on what is calling that module. A quick Google turned up a really nice solution I have been using quite a bit recently.

Tuesday, 25 June 2013

Quick Script: Smart Joint Duplicating

A quick script to make duplicating joints a little quicker. Select either a single joint in a chain, or a start and end joint and run the script. The script will then duplicate the range from start to end, or a single joint in a hierarchy, without all the extra unwanted child joints that usually get duplicated.

Wednesday, 29 May 2013

Quicktip: Connecting and Disconnecting attributes with pymel

Pymel has a much nicer way of connecting and disconnecting attributes than the cmds.connectAttr/disconnectAttr standard.