Understanding 'with' in Python

November 30, 2014
I've found a link to giving a very detailed and simple to understand explanation using the statement 'with' in python, and to summarise...Well if we use 'with', python will close the function that is called within the body of with. Say for an example using the in built function of open in Python, usually you will need to close that function. With 'with', Python does that for you. Simple.
with open("x.txt") as f:
  data = f.read()
  do something with data

Multithreading your plugins

September 23, 2014
Ok, since I started compiling a plugin, let's talk about multi-threading. 

Autodesk has a good description of multi-threading and 

Continue reading...

Compiling a C++ plugin for Maya

September 22, 2014
Recently I had a hand in finally trying out compiling a plugin for Maya. Here's a bit of information regarding the setup. I am using Maya 2014, Windows 7 and Visual Studio Express 2013. 

So Visual Express 2013 is a free version of Studio Express and for a lone developer, it is free from Microsoft. Kudos to Microsoft because I have to say that they are changing for the better and the userbase is starting to benefit. 

You can get Studio Express here:
Studio Express 2013

And here is another interest...
Continue reading...

Create joints between startJoint and endJoint

May 23, 2014
Hey guys, here is another simple script that I have found invaluable. Basically whilst rigging, I find that numerous times I need to create 'midJoints' between a startJoint and an endJoint. 

Here it is, feel free to use it around where you see fit in your everyday toolsets.

import maya.cmds as cmds
import maya.OpenMaya as OpenMaya

def createMidJoints(startJoint, endJoint, steps= 2):
  sPos= cmds.xform(startJoint, q=1, ws=1, t=1)
  ePos= cmds.xform(endJoint, q=1, ws=1, t=1)

  vecA= OpenMaya...

Continue reading...

PEP8: Style Guide for Python

May 10, 2014
I thought I might mention PEP8 which is basically a style guide for writing your code in Python. Here\s the link:
PEP 8 -- Style Guide for Python Cod

Continue reading...

PyCharm and VCS

April 26, 2014
So this might be old news to you folk out there, but I use an IDE (Integrated Development Environment) to edit my code. And Eclipse is too much of a behemoth to behold, and thus enter pyCharm Community Edition. I have been using this awesome software for about 6 months now as recommended by a colleague of mine. 

Working as a freelancer, I use different platforms to update my own personal code, so versioning would be a very handy tool, which pyCharm has its own version control system (VCS) in p...
Continue reading...

Maya's Python API 2.0.

April 17, 2014
This is by now a bit of old news. But I am going to spend more time on this blog updating and releasing more of my code onto the interwebs. So here it is. Autodesk Maya has released a new python friendly API since their Maya 2013 release where you can easily access by importing their module 

import maya.api.OpenMaya as api
To this effect, they claim that using their python api is virtually 2 to 3 times faster than using their old api version. Remember that the original API is a python wr...
Continue reading...

Setting your Maya Shelf for Multiple Users

April 9, 2014
Instead of explicitly coding all your , lets say your icon paths, you can query Maya to return the location of your preferences pathname during startup. This way you can set your own custom path that can be picked up from multiple users during maya startup.

global proc shelf_soup(){
  string $appver= `about -preferences`; 
  string $soupIcon= ($appver + "/prefs/icons/soup/");
	//Or wherever the shelf location might be
	//Other useful commands are `getenv "MAYA_APP_DIR"`

Continue reading...

Autodesk's Tutorials - Creating Python plugins in Maya

October 9, 2012
Here is a basic how-to create python plugins in Maya. I find this tutorial very informative and covers very concisely on creating plugins.
Continue reading...

Pipeline Abbreviations

April 14, 2012
For my own personal use....

The following abbreviations is an index list of abbreviations used for the jykTools pipe.

SDM - subdiv divisable mesh
GRP - group (prefix descriptor)
NUL - null
BLN - blinn
SDR - shader
DEF - deformer 


Continue reading...

About Me

Character TD and Creature TD with some generalist skills