Maya

automated path substitution in maya.

I'm trying to build a system right now that can automatically substitute environment variables for paths on a per-scene basis. When a user opens a Maya file, I want to parse that file and set temporary environment variables called $SHOW, $SEQ and $SHOT that point to the show's root folder, the sequence's folder in that show, or the shot in that sequence. The variable names and paths I'm trying to get are pretty specific to the current pipeline I'm working on, but this essentially lets me use relative paths in Maya but WITHOUT using Maya's outdated and inflexible workspace system. I don't want an individual Maya project for every single shot and asset in the entire show, and I don't want all of my Maya scenes to be forced to live within a single workspace, either. I've solved this problem before by using symbolic links to basically force all of the Maya projects generated for every single shot and asset to link to the same place. This makes for a pretty busy-looking file system, though, and symlinks only work on Unix-based servers (i.e. not Windows). This system I'm building now looks a lot more like Houdini's global variables... as long as I define $SHOW or $SHOT or whatever, I can path a reference or a texture to $SHOT/assets/whatever.xyz and it doesn't necessarily have to be within a Maya workspace, and it's also not an absolute path. Read more below... (more…)

By toadstorm, ago
Maya

blanking the viewport in maya

A while ago I posted about how to manage viewports in Maya in order to prevent the screen from redrawing while doing a bake or Alembic export, which slows things down considerably. It turns out there’s a way easier way to handle this, thanks to a hidden (of course) MEL Read more…

By toadstorm, ago
Python

converting nuke gizmos into groups

A quick script here to convert Gizmos in Nuke into Groups. Gizmos are nice in theory in that they provide reusable groups of nodes for users to interact with, but they’re often more trouble than they’re worth, especially if you need to send your Nuke scripts to someone else. Here’s Read more…

By toadstorm, ago
Maya

More pipeline stuff.

I’ve implemented most of my planned pipeline, finally. Just want to do a brief walkthrough to brag about features to show what this set of tools is capable of doing. The pipeline uses symlinks to allow each asset or shot to exist inside its own self-contained Maya project workspace, while Read more…

By toadstorm, ago
Maya

dealing with layouts in maya

Many operations in Maya will run faster if Maya doesn't have to refresh the viewport while running them. For example, if you switch the viewport to only show the Graph Editor before baking animation, or caching particles or Alembic geometry, the operation will happen much faster than if Maya had to actually display the geometry for each frame that it's being baked. There is probably a way via the API to tell Maya's viewport not to refresh, but since I don't know shit about the API, here's a workaround using a few of Maya's less-documented MEL commands and some Python. I wrote this method assuming that artists would want to cache out information frequently without it disrupting their workflow. That means that I needed to first store the user's current panel layout, then switch it to something that doesn't require a refresh on every frame (like the Graph Editor), and then restore the previously restored layout. I prefer coding in Python, but some of the procedures I'm running are MEL functions that are found in scripts/startup and so they're not documented and they don't have Python equivalents. A hybrid approach is the best way to handle it, since MEL is terrible. Click for some Python code... (more…)

By toadstorm, ago
Maya

baking maya scene time warp

I just ran into a hideous problem when I was trying to bake out cameras and animation from one scene, and get the animation into another. I always keep my lighting scenes separate from the animators' scenes so they can't mess up my shots. Unfortunately, the animator had used a Scene Time Warp, and then baked out the animation, which of course never quite lined up correctly and we couldn't figure out what was going on. Turns out that keys baked under a Time Warp will not actually bake the Time Warp itself. Here's a script, then, to bake the effects of the time warp on all selected objects. It then (optional, but recommended) deletes the time warp from the scene entirely: (more…)

By toadstorm, ago
Maya

python in maya standalone

I’ve been working on some tools recently that open groups of Maya scenes in batch mode, running Python or MEL operations on each file (for example, to quickly add a render layer and apply materials to a large group of objects at once, or to get the names of all Read more…

By toadstorm, ago
Python

problem downloading scripts?

It was brought to my attention that my Python scripts weren’t uploaded correctly, so I just re-uploaded them as .ZIP files and updated the links. Hopefully now my server isn’t going to try to compile them…

By toadstorm, ago
Maya

Renaming duplicate nodes

I’ve been working on a project that incorporates a lot of models that were made by duplicating or importing things into a scene over and over again. When this happens, you have lots of nodes that will have the same name, and Maya will differentiate between them by tacking the Read more…

By toadstorm, ago
Maya

controlling textures with a rig

There are plenty of situations in motion graphics where you have tons of repeating elements. Designers love that kind of thing. You'll also often be expected to make slight variations of these repeating elements... like a bunch of dots or squares or something that have slightly different textures to them, but are essentially the same thing. You could make a unique shader or a separate referenced asset for each one of these variations, if, say, you really hated yourself. Instead you could build the texture swap right into a rig, so the animator or designer or whoever could just pick a color or a texture for each object while animating the scene. This makes it way easier to direct, and you can just reference the same object over and over again instead of making multiple assets. I was just showing somebody how to do this the other day and figured it'd be a good thing to post about. Here's how the setup works... (more…)

By toadstorm, ago