GithubHelp home page GithubHelp logo

rassouledji / batch-renamer Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 4.0 84 KB

A Python based batch renaming tool for Maya.

License: GNU General Public License v3.0

Python 100.00%
maya-python maya maya-script

batch-renamer's Introduction

Batch Renamer

Header Image This is a Batch Renaming tool created to help with the renaming of large scenes and characters.

Its features are:

  • Suffix and Prefix
  • Auto-Suffix based on object type (object types can be added along with custom suffixes)
  • Padding for numbering
  • In line search and replace

Installation

To install the Batch Renamer tool you must copy the downloaded "batchRenamer.py" file to your Maya scripts directory.

It is usually found here:

C:\Users\<USER>\Documents\maya\<MAYA VERSION>\scripts

Now, in Maya, open the script editor and paste in this code into a Python executer:

from batchRenamer import batchRenamerUi

batchRenamerUi.display()

You can save that code to a shelf button for ease of use by going to "File" in the Script Editor and then selecting "Save Script to Shelf..." You can use then use the Shelf Editor to make changes to the button like assigning the custom icon.

Custom suffixes

With the feature to Auto Suffix based on the object type you can also easily change the type of object and what it's relative suffix should be by editing the dictionairy in the "batchRenamer.py" file. Below is the default suffix dictionairy found with the Batch Renamer.

# Suffix dictionairy
SUFFIXES = {
    "mesh": "GEO",
    "joint": "JNT",
    "camera": None,
    "ambientLight": "LGT",
    "directionalLight": "LGT",
    "pointLight": "LGT",
    "spotLight": "LGT",
}

DEFAULT_SUFFIX = "GRP"

Simply open the file in an editor of your choice and modify the dictionairy at the top of the file with the object type and the associated suffix in the same format as the existing entries above. Note that Maya will need to be restarted for the new additions to the dictionairy to take effect.

batch-renamer's People

Contributors

rassouledji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.