Lot's of really old maya code (before 2009 or so) use at your own risk...
I have deleted all Maya mel scripts downloads, they were old and unsupported for a while. Some are still on creativecrash.com
Copy, move and set paths for textures in a scene. Handles files, .psd files, mental ray textures and ibl textures.
Hit the "check files" button. In the result section select the checkboxes of the texture groups you want to edit.
Choose your destination folder/new texure path below which can be the op standard textures folder (below the project folder) or any folder if you uncheck "Use OP-standard texture folder" and type a path into the text field. You can also use the "Set..." button to browse your directories. You can create a subdirectory in the path by checking the "Create sub folder" check box and add a name to the text field.
Hit any of the "copy", "move" or "set path" buttons to perform the desired activity. Detailed results are displayed in the script editor. Hit the "check files" button again before continuing to ensure you have updated results in the texture groups.
Places maya hair follicles where ground objects texture is white or grey (treshold)
and none where it is black. Constraints instaces of poly objects to follicles.
Works with Maya Unlimed only. Ground surface can still be changed (i.e. smoothed) after spreading.
Spreads und constrains instances of a poly objects on a poly ground object. Ground object UVs must be non-overlapping and in 0-1 range.
1) Place follicles:
Select ground object. Assign a texture to the color channel of a maya shader (no mentalray shaders supported yet). The black and white values of your texture determinated object desnsity. Choose UV-range and grid density and hit "Place follicles on selected". Repeat until you like the density. "Treshold" and "Falloff" control the placement of objects in grey aereas. If "Randomize Placement" is off follicles are set in a regular grid. The best way to get random placement is to add several different grid densities with high random values.
2) Place spread objects:
Select object to spread. Make sure pivot is set correctly. Choose to use all follicles (pick object to spread only) or selected only (pick object to spread last). Hit "place geometry". This will place an instance of the object at follicles in the scene. Set the up-axis and random scale and rotation for the spread objects.
To do: still a lot (object intersection, better random placement, handle UVs outside 0 to 1, more rotation options, amimation)
Remove all or empty namespaces and select objects in namespace options. Rename and keep in hierarchy or move namespace to root namespace. Rename and remove is only possible with unreferenced objects. Apply "Rename to unique names" after removing namespaces to ensure unique object names.
Put ks_nameSpaceManager.mel in you script directory. Start the GUI by typing "ks_nameSpaceManager" in the script editor.
Choose "remove empty" or "remove all".
Choose "list namespaces" choose a name space in menue and type a new name to rename.
Re-textures objects in an animation snapshot on a path identical to the original object by using object sets. Usually shader info is lost in animation snapshots. Handles open and closed curves. Combines object groups before spreading and set the pivots. UI for updating object number, spread objects by distance along a path. Min and max path range change start and end point of the animation snapshot on the path. Transform the BaseObject (located in the BaseObjectGroup) to scale, rotate and translate all snapshot objects.
Put ks_betterAnimSnapshot.mel in you script directory. Start the GUI by typing "ks_betterAnimSnapshot" in the script editor.
Select curve and then the object/top group node of objects to spread. Set the object number or distance in the textfield and hit "create" button. To change the animation snap shot type a new object number in the textfield or distance and hit "update" button.
12/2: corrected menu update
When using FinalGather in animation (especiallly on a render farm) it's common to pre-render a Fg map only (or low antialiased images first) and FG Freeze when rendering the camera flight. There is a description here http:forums.cgsociety.org/showthread.php?t=356092. This workflow reduces for flickering in the final rendering as render time FG points cause flicker. This script retimes a copied camera to speed up the pre-rendering and lets you set some prescale on the camera so you get additional fg points at the edges of the camera. Works with keyframes only. Bake other animation types before using script.
Install: Put ks_finalGatherCamera.mel in you script directory. Start the GUI by typing "ks_finalGatherCamera" in the script editor.
Select render camera to copy from Option menu. Set your settings, hit copy button. Use this retimed camera for fg map rendering only.
Removes surplus light linkers (common problem when referencing and importing scenes). Keeps Light linkers required to continue ligthing the scene without lightlinking every light source (slow). No GUI.
Install: Put ks_SaveLightLinkRemover.mel in you script directory.
Start by typing "ks_SaveLightLinkRemover" in the script editor.
Tool that lets you store your shading information (button "Re/write shading information")
for a scene by creating object sets (on a per face base) and adding tags to shaders.
This lets you restore your stored beauty shading in 1 click (button "Re-apply beauty shading").
Useful if you you want to temporarily apply (i.e. for ligthing or diangnostic purpose ) different shaders to the scene or define a "default shading" for the scene. "Assign grey lambert" does just assign a new grey lambert shader.
If you select the checkbox it works on selected objects only.
Note that you have to rebuild sets to save changes in shader assignment.
Updated to handle namespaces:
This is useful if you use the script to reference already shaded files so you can apply lambert1 in the referenced scenes and dont get referenced shader. This way you dont have to re-apply shaders again manually in the master file.
Create sets in file to reference apply lambert1 to all geometry, export shaders and delete them from the scene. Import shaders to master scene reference scene file. Use script with "ignore namespaces" checked to reaply shaders in master scene to referenced geometry. Hit "export used shaders" to export used shaders in 1 click.
Put ks_rememberShading.mel in you script directory. Start the GUI by typing "ks_rememberShading" in the script editor.
A no GUI script that simply puts objects in each selected grouo on displaylayers. Displaylayers are named after the group.
Put ks_groupsToDisplaylayer.mel in you script directory. Start the GUI by typing "ks_groupsToDisplaylayer" in the script editor.
my public scripts.