Adverti horiz upsell

jhSetMultiAttr 1.1.1 for Maya (maya script)

record changes to one node and apply to many nodes

Button download


  • 7.x, 6.x

Operating Systems

  • Linux
  • Mac
  • Windows


Last Modified:02/19/2007
File Size: 34.2 KB
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.



copy jhSetMultiAttr.mel to your scripts directory,
source jhSetMultiAttr.mel;

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
-Creating Constaints
-Edit Render Layer Adjustment
-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


Please use the Bug System to report any bugs.
Please use the Feature Requests to give me ideas.
Please use the Support Forum if you have any questions or problems.
Please rate and review in the Review section.

People who favorited this item:

  • elviocb
  • DangerWeenie
  • tonybiggar
  • Narann
  • karmakat
  • mathcom
  • plasticarm