Skip to content

A little tool used with Maya to replace the default renaming tool.

License

Notifications You must be signed in to change notification settings

Jordandionduval/OutlinerBuddy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OutlinerBuddy

A little tool used with Maya to replace the default renaming tool.

image

Table of content
Other Pages

Overview

I made this tool over the summer as a way to learn and practice python. The goal when creating this tool was to replace Maya's old renaming tool for something a little more versatile and powerful.

The tool currently is currently separated in 5 parts to allow users the following renaming options:

  • Replace - Querries a string in selected objects' names and replaces it with target name.
  • Rename - Replace selected objects' names with a new one, or add a prefix/suffix to the current name.
  • Quick Prefix/Suffix - Quickly add common prefixes/suffixes to current name.
  • Quick Remove - Quickly remove characters or target string from current name.
  • Quick Selection - Quickly select hierarchy and filter selection by common object types.

General Functions

Here are some other functions that help the code run smoothly and enable other quality of life features:

Bottom-Top Sorting

image

Because of the selection order, normally the code could rename objects higher in a hierarchy first. This isn't ideal as this changes the path of other stored object names. To circumvent this issue, I opted to rename objects in my list by path length, starting with the longest path. The original selection order is then stored for selection order dependent variables like incrementation number.

Dynamic Ui

image

UI is dynamically updated to accurately represent the final result of quick add buttons when enabling the Uppercase or Prefix bool.

Command feedback & Error Raising

image

To better understand what the tool is doing (or why it isn't operating as intended), commands have tailored feedback and errors provided in the console.

Function Sorting

image

A simple function to quickly access a list, and items within the list if necessary.

List types (Selection, Hierarchy, All)

image

A simple set of functions to quickly access all selected items, selected items and their hierarchy or all objects in the current scene.


Installation

  1. Copy the "jdd_outlinerBuddy.py" to your Maya scripts directory:

MyDocuments\Maya\scripts\

  1. Then, within maya, use the following text as a python script to run the tool:
import jdd_outlinerBuddy as OB
OB.UI()
  1. (Optional) Alternatively, the text can be saved in the custom shelf using maya's script editor. This makes the script a small button in your current shelf so it can easily be accessed later.

Known Issues

  • Attempting to remove the last character on a duplicate name is impossible, since Maya will keep adding a number at the end. Try removing 2 or more characters in those instances to avoid creating a duplicate name.
  • Object names in Maya can only start with letters or underscores. If an operation creates an illegal name, that operation will either add text in front of the new name ("char__") or raise an error message instead.
  • When using incrementation in the 'rename' section of the tool, the first number happens to be wrong on occasions. Pressing the rename button again after that solves the issue

About

A little tool used with Maya to replace the default renaming tool.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages