Posts

Showing posts from March, 2013

Tooling around- Maya Photoshop Bridge

Image
My current little pet project to bridge Photoshop and Maya, from within the Maya environment. The tool is in very early development stage, but currently supports project configuration and opening a selected model's source PSD from within the Maya environment. Other neat time savers: Exporting a selected model's UV map and using it to create a new PSD. Calling Photoshop to export all of a model's maps from their source PSD.  Renaming shaders based on their diffuse texture name. linking associated known map types (eg- specular, gloss and normal)  The tool is written entirely in Python/Pymel and uses the win32com module as a bridge.  Various options to clean up scenes.  The current texture tools. More to come! Project options.

Sliced Py- Cheat sheet for Python Slicing

I'm constantly using slicing in my Python scripts, but I am also constantly scratching my head about exactly where to put the little colon to get the slice that I'm after. After consulting the stackoverflow gurus I wrote a little cheat sheet using a string as an example.   foo = "Monty Python's Flying Circus" #Print the middle of foo- slice from the 7th-1 character end at the 15th-1 character print foo[6:14] #Use a slice to get the first six characters print foo[:6] #>>> Monty #Slice after the first six characters of foo print foo[6:] #>>> Python's Flying Circus #Print everthing in foo print foo[:] #>>> Monty Python's Flying Circus #Every second character print foo[0:27:2] #>>> MnyPto' ligCru #The last character of foo print foo[-1] #>>> s #The last two characters of foo print foo[-2:] #>>> us #Everything but the last seven charachers of foo print foo[:-7] #>>> Monty Python's Flying