This repository contains a collection of Python scripts for automating and optimizing various tasks in Autodesk Maya. These scripts are designed to enhance workflow efficiency, especially in scenes involving multiple objects, groups, materials, and transformations.
- Functionality: Selects child objects under a specified parent object based on a partial name match.
- Usage: Replace
_Outlinewith the parent object name and the desired partial name.
- Functionality: Parents objects ending with
_Outlineto their corresponding base objects. - Example:
object_Outlinebecomes a child ofobject.
- Functionality: Ungroups all objects, unparents them, and deletes their construction history.
- Functionality: Deletes all empty groups in the scene.
- Functionality: Creates individual groups for each top-level object in the scene.
- Functionality: Separates geometry within groups using Maya's
Separateoperation.
- Functionality: Removes a specified prefix (e.g.,
pasted__) from selected object names.
- Functionality: Automatically parents objects with names ending in
_childto their corresponding parent objects.
- Functionality: Groups objects based on shared naming conventions or patterns (e.g., same prefix or middle name).
- Functionality: Creates and assigns materials to objects based on their names.
- Functionality: Generates and assigns materials with random colors to objects with specific naming patterns.
- Functionality: Renames objects based on their assigned materials (supports Lambert and Phong).
- Functionality: Adds a specified suffix (e.g.,
_1) to all object names in the scene.
- Functionality: Deletes all objects, groups, and materials while retaining active camera settings.
- Functionality: Cleans up material names by removing redundant prefixes like
pasted__pasted__.
- Copy the desired script(s) into Maya's Script Editor.
- Execute the script using the
Runbutton or assign it to a shelf button for quick access. - Modify the parameters (e.g., object names, prefixes, suffixes) as needed.
parent_name = "ParentObjectName"
partial_name = "_ChildPartialName"
select_children_with_partial_name(parent_name, partial_name)group_name = "GroupName"
group_solid_concrete_objects()Feel free to contribute additional scripts or improvements by creating a pull request.
This repository is licensed under the MIT License. See the LICENSE file for details.