jhSetMultiAttr 1.1.1 (maya script)

record changes to one node and apply to many nodes

Multiattrdemo1

License Type:

Freeware

File ID:

4297

File Size:

34.2 KB

Created / Updated:

Nov 02, 2006 / Feb 19, 2007

Owner:

Jason Howey   More free downloads from this user See users marketplace items See this users portfolio Send a Private Message

Platforms:

linux, mac, windows

Downloaded:

1,853

Maya:

6.x, 7.x

Tags:



Description:
jhSetMultiAttr records the changes you make to a node, and then applies those changes to every node you later have selected.  For example, if you have a 100 lights you can easily connect their color to a ramp, turn ray tracing on, and aim constraint them to a locator on all 100 of them with just a couple clicks.  
This script is also great for creating custom render passes.  Say you want to create a specular pass for your scene, just set the diffuse, ambientColor, and incandescence to zero on one shader, then run the script to have it affect all shaders in your scene.

undefined

undefined

Install:
copy jhSetMultiAttr.mel to your scripts directory,
hotkey:
source jhSetMultiAttr.mel;
jhSetMultiAttr;

How to use:
-Run the script, (this puts it in record mode).  
-Make changes to one nodes attributes.
-Select all the other nodes you want to similarly change.
-Run the script again, (this takes it out of record mode and applies changes to the selected nodes).

Current Capabilities:
Right now the script can handle these types of changes:
-Setting Attributes
-Connecting Attributes
-Disconnecting Attributes
-Mute
-Lock
-Creating Constaints
-Edit Render Layer Adjustment
-Expressions
-Modifying Sets.

Known Limitations:
Using Undo/Redo while it's in record mode freaks it out.
I've seen it not work currectly with complex scenes or complex operations.
Making changes in the Channel Box doesn't work properly. (use Attribute Editor instead).
It is recording directly from the history of the Script Editor, so if a command doesn't show up there, it won't be applied.

Tips and Tricks:
One thing thats helpful is to keep the Script Editor open so you can see if it's recording the right commands. Make sure you see a command that starts with one of these: setAttr, mute, editRenderLayerAdjustment, connectAttr, disconnectAttr, expression, aimConstraint, cpConstraint, geometryConstraint, normalConstraint, orientConstraint, parentConstraint, pointConstraint, poleVectorConstraint, scaleConstraint, tangentConstraint, sets.
If you mess up while recording, deselect everything, click the script again to get it out of record mode, and then try again, remember, the scirpt will ignore any undo commands while in record mode.

If you have programing experience and you have an action that you perform alot, you can just make a shelf item that'll perform predetermined actions to all selected items. For example say you love making things slanted in your scene, you can save this as a self button: 
jhSetMultiAttrEngine({"setAttr io.shearXY 1;","setAttr io.shearXZ .4;"}, `ls -sl`, 0);
this will bypass the main toggling procedure of recording actions, and just takes the two shear commands and applies them to everything you have selected. Another example would be:
jhSetMultiAttrEngine({"setAttr io.dmapResolution 1024;"}, `ls -sl`, 0);
This makes any lights you have select have a shadow map resolution of 1024.


email me if you have any comments at jphowey@hotmail.com

Jason



Please use the Bug System to report any bugs.
Please use the Feature Requests to give me ideas.
Please use the Support Forum to ask any questions.
Please rate my product in the Review section.

More from this artist