Distributing Python script(s) as zip file

A recent discussion on 3DPRO sparked me to scribble down some ideas on how to somewhat painlessly distribute a Python package to be run in DCC applications such as Maya or Nuke as simply as possible. So this is an alternative to building a wheel and mucking around with virtual environments. You can make Python import your modules or packages even when zipped. Example, where b is our package and c....

June 7, 2018 · 2 min

Querying the FPS preference in Maya

This tickles the funny bone. >>> import maya.mel as mel >>> fps = mel.eval('float $fps = `currentTimeUnitToFPS`') >>> print(fps) 24.0 Let me know in the comments below if this can be improved…

November 17, 2017 · 1 min

Maya 2018 file size bug

A very annoying bug came to light in mid-October which makes Maya 2018 binary scene files (*.mb) unreadable if they are larger than ~2 GB in size. To be exact, the bug is hit when the file size is larger than 2147483647 bytes, the maximum positive value for a 32-bit signed binary integer. A workaround is to instead save your scenes in Maya ASCII format (*.ma), since they are not affected by this bug....

November 16, 2017 · 2 min

Querying Render Setup in Maya 2017

It seems Autodesk did not create a Render Setup documentation. This is me collecting code snippets and exploring Python functions. MEL code snippets # Return render layer names without the "rs_" prefix $renderLayerNames = `renderSetup -q -renderLayers`; Python code snippets Render layer names import maya.cmds as cmds # Return render layer names without the "rs_" prefix render_layer_names = cmds.renderSetup(q=True, renderLayers=True) Render layer names and their renderability import maya.app.renderSetup.model.renderSetup as renderSetup render_setup = renderSetup....

May 7, 2017 · 4 min
Maya showing an import error in the script editor

Dealing with Maya 2017 and PySide2

Maya 2017 was released today and with it comes a big change; PySide (and PyQt4) no longer works with Maya. This guide explains how to deal with that and make your Python and PySide/PyQt scripts compatible with Maya 2017 as well as older Maya versions. This guide is also applicable to e.g. Nuke or any other Python-enabled DCC app which uses Qt. Background (Qt4 vs Qt5) Starting with Maya 2011, Maya’s user interface is built using the Qt toolkit....

July 25, 2016 · 5 min

Developing with Qt.py

This post aims to give an introduction to the Qt.py project and how to get set up with it for PySide/PyQt4 and PySide2/PyQt5 development. Contents What is Qt.py How does it work? Installing Qt.py Caveats Contributing Closing comments What is Qt.py? Qt.py is a Minimal Python 2 & 3 shim around all Qt bindings - PySide, PySide2, PyQt4 and PyQt5 – which enables you to write software that dynamically chooses the most desireable bindings based on what’s available....

July 25, 2016 · 6 min

Installing Qt.py (advanced methods)

Qt.py can be installed in many ways, depending on your needs. This post aims to outline some common approaches: Install using pip Install into an application’s custom Python build Vendoring Make Qt.py available using sys.path and site.addsitedir Install using pip The probably most common way to install Qt.py (and as mentioned in the project’s README) is to install via pip: pip install Qt.py Please note that it’s not recommended to “pip install” into your operating system’s default site-packages....

July 25, 2016 · 3 min
Maya 2016 running in Ubuntu 14.04

Installing Maya 2016 on Ubuntu 14.04 (trusty)

It took some trial and error to successfully install and license Maya 2016 in Ubuntu 14.04, and here’s how I did it. First off, let’s install some libraries. It’s possible that not all these libraries are needed as the list of libraries stem from installation instructions from an earlier version of Maya. sudo apt-get install csh tcsh libaudiofile-dev libglw1-mesa elfutils gamin libglw1-mesa-dev mesa-utils xfstt ttf-liberation ttf-mscorefonts-installer xfonts-100dpi xfonts-75dpi alien Maya needs write access to a temp folder, which does not exist by default in Ubuntu 14....

September 10, 2015 · 3 min
Illustration

3D rendering in the Google Cloud

Guest blogging for Google! As a small design and visualization studio, we focus on creating beautiful 3D imagery – be it high-resolution product images or TV commercials. To successfully do this, we need to ensure we have access to enough rendering power, and at times, we find ourselves in a situation where our in-house render farm’s capacity isn’t cutting it. That’s where Google Compute Engine comes in. Read more over at the Google Cloud Platform blog....

May 1, 2015 · 1 min

Copying Maya to network share

If you would like to run a thin client installation of Maya, which means you run it off a network share rather from a local installation, you need to make sure to copy symlinks on Linux. If you just perform a simple copy, you’ll probably get something like this: error: unpacking of archive failed on file /my_mount/maya_installation/lib/libGLEW.so;544612b1: cpio: symlink failed - Operation not supported The solution is to copy the files which are symlinked:...

April 15, 2015 · 1 min