Showing posts with label Ritalin. Show all posts
Showing posts with label Ritalin. Show all posts

Saturday, 20 November 2010

Ritalin 1.7 bugfix

I just realised there was still an old function call in 1.6 that was throwing error messages. I just updated the downloadable archives, everything else stayed the same.
Find them here as usual: http://code.google.com/p/keyvis-dev/downloads/list

Thursday, 28 October 2010

Ritalin 1.6 - New features

What is the single most time consuming part when doing polygon modeling? Selecting the components you actually want to edit! Selections are precious, you don't want to loose them once made, unless you deliberately choose to.  For this reason, most 3D packages remember the selected components on an object when changing selection filters, for example from edges to vertices. If some vertices were selected upon changing to the edge selection filter, they will be reselected for the user automatically when switching back to selecting vertices. Very intuitive to use, easy to understand, non-intrusive, and a real time saver for people who want to (or have to) work non-linearly on many things more or less at the same time. Fortunately, almost all programs have adopted that paradigm, except Maya. 10 years of waiting for that feature to finally get implemented by the developers, countless hours lost in production creating Quick Selection Sets manually or even more time lost because I simply forgot to do that, forcing me to painstakingly reselect something I already had selected at some point in the past, I finally ended up implementing that feature myself.

Here's a short video on how it works:


Ritalin preferences are also now saved with you Maya user preferences, so if you want to enable or disable some functionality permanently you don't need to set the corresponding flag in the menu each time you start Maya anymore.

Downloads:
RitalinForMaya_2011_1.6.zip
RitalinForMaya_2008-2010_1.6.zip (Untested. Volunteers?)

Known problems and limitations:

When changing topology of a polygonal primitive object (e.g. a Sphere, Cylinder,...) without having deleted its history first, selections of components are stored but not properly restored when changing component selection filters. That's a bit annoying but not a show stopper.
I haven't found an easy way of working around the problem in code, the best you can do is to make sure you delete the objects history.

If you find anything else that does not work please let me know.

For TDs: 
There are two scripts replacing one of Maya's default script functions, namely doMenuComponentSelection in ..\scripts\others\dagMenuProc.mel. These scripts, Ritalin_doMenuComponentSelection.mel and Ritalin_doMenuComponentSelection_default.mel get sourced automatically at the right time depending on whether the "Remember Component Selection" feature is enabled or not. If you are using a modified version of that function in your location/pipeline you will have to merge the changes of these customized functions back into your version or not use this update altogether. Simply deleting the scripts might prevent Ritalin from initializing properly. In that case it's probably better to not use this update in the first place.

Tuesday, 17 August 2010

Ritalin hotfix for Maya 2011

Apparently there is yet another bug in Maya 2011.
This one causes "contextInfo" to fail in certain situations (it throws a Maya Command Error, to be more precise).
The bug has been logged with Autodesk as #365264.
Until Autodesk finds time and will to fix this on their end I found a way to work around it and updated Ritalin to version 1.5. No new features have been added, this is really just a "bug fix".

Get it here: http://keyvis-dev.googlecode.com/files/RitalinForMaya_2011_1.5.zip


It seems to work well for me now, please give it a try and let me know if you still get errors and/or flushed undo stacks.

Stefan

Monday, 19 April 2010

Ritalin updated for Maya 2011

Due to the changes to skin weight painting tools in Maya 2011 minimal changes to the paint weights tool panel integration code were required. (only artAttrSkinCallback.mel needed to be slightly altered compared to the version for Maya 2008 - 2010). The updated archive is available here:

http://keyvis-dev.googlecode.com/files/RitalinForMaya_2011_1.4.zip

Tuesday, 16 March 2010

Ritalin - simpler camera navigation in Maya's viewports

When you come from a Max or Softimage background, you might miss that "automatic center camera interest on current selection" feature that allows you to tumble the camera around the center of the current selection without having to press the f key (or z in 3dsMax) and then dolly in and out again to fit whatever you've been working on propperly on screen.  Autodesk seems to have planned such a feature for Maya too, but never actually got around to implementing it in a truly usable way. In any view click View->Camera Tools->Tumble Tool (the little config box to the right of it actually). And there it is: A check box labelled "Tumble on object". That sounds nice, but unfortunately it only works for those objects directly under the mouse (which makes it hard to control when objects overlap), and fails on many common object types, like joints or lights.

Enter Ritalin, a Python script that will automatically set your camera's tumble pivots when the selection changes in the scene, and even when your selection is moved. Special case handling has been added for convenience that centers the tumble pivots on the currently active deformer (e.g. joint) when painting skin weights on a mesh, which is a huge time saver when painting hard to see or detailed areas like a character's fingers, where a considerable amount of time is usually spent on adjusting the camera in such a way that it tumbles without constantly loosing the paintable area out of sight, and where pressing f on your keyboard usually doesn't help because it will center on the selected mesh, not the active deformer.

Lots of text to describe such a simple thing right? A short video shows a lot better  how it looks and feels like.
If that video looks cut off on the right you might want to watch it on youtube directly:
http://www.youtube.com/watch?v=RmFiOkboAR0




Result:
You will find yourself not having to press "f" so often anymore, camera pivots are centered completely automaticlally, and your viewport "calms down" a lot. Your eyes and poor little f key will be eternally grateful, let alone the time you can save and concentrate on more important things, like creating art for a change.


Installation:
1.) Download http://keyvis-dev.googlecode.com/files/RitalinForMaya_2008-2010_1.4.zip
2.) Unpack and copy the files to your user scripts directory.

In WindowsXP this folder is normally normally located at
C:\Documents and Settings\-YourUserName-\My Documents\maya\2009-x64\scripts

In Win7 (and I think Vista too) the path usually is 
C:\Users\-YourUserName-\Documents\maya\2011-x64\scripts


For Mac finding this path can be found using a different procedure, please see Damien Hess' comments below.

For Linux: Maybe someone can help out with information here, I don't have access to a Linux workstation.

Your actual path depends on your user name and Maya version you want to install this for, so it will most likely look slightly different compared to above examples. If this folder already contains a userSetup.py, just copy the contents from the userSetup.py that comes with Ritalin and paste it at the end of your already existent useSetup.py file. Change the file path according to your user name, user scripts folder location and Maya version. Save it.
The mechanism is that Maya always runs any script code in the userSetup.py file automatically when it starts. We're simply using this mechanism to load Ritalin on startup. 

3.) (Re)start Maya.

A Ritalin menu should appear in the main menu bar. You can disable or re-enable Ritalin there.
There's also an option to disable skin weight painting integration separately.


For TD's:

The archive contains a modified version of a mel file that ships with Maya - artAttrSkinCallback.mel.
It is important that the Ritalin'ed version of it gets sourced after Maya has sourced the original file from its native ...\scripts\others folder for the code change to take effect.
 

Note: The modified file only enables paint skin weights tool panel integration, and only some lines were added at the end of the global artSkinSelectInfluence procedure.
 If you are using a modified version of this file in your own pipeline you might want to add the extra lines to the same function in your version of the file instead of replacing the whole file. In case this is not practical, simply not copy the file at all, you will simply have to live without paint skin weights tool panel integration (clicking on a deformer in the paint tool panel will not center the camera's tumble pivot on it automatically). However, you will still be able to use Ritalin when right-clicking over a deformer in th viewport and choosing "Paint Weights" from the context menu to set the tumble pivots. Anything else will work normally.

Uninstall: 

Just delete the files from your user scripts folder.
In case you have modified your userSetup.py file, comment out, or remove, the line you copied into it too.

Disclaimer: 

This tool has been used successfully in production of several commercial game titles. Yet, it is provided "as is" and free of charge. I'm not liable for any damages incurred, use and modify at your own risk.
 

Should you encounter any problems or limitations, or should you simply like it or use it successfully in production, I'd love to hear about it. In any case, just leave me a comment below.

Stefan