Remove namespace of imported objects using simple mel commands
2 Comments
Page 1 of 1
Ever find it annoying when you're using Maya, you import some objects and it adds the name of the file you're importing to the name of every object? The names of the objects in your scene can very quickly get a bit unwieldy if you're working with lots of files. Use the following to clean things up a bit -
After your objects are imported paste the following line into the script editor -
namespace -mv "insert_namespace_here" ":" -force;
Replace insert_namespace_here with the namespace of your imported objects. ie for an object that is named part1:Cylinder02 use the following -
namespace -mv "part1″ ":" -force;
Next you need to execute the MEL code and all objects with that namespace will have it removed. So part1:Cylinder02 will become Cylinder02.
[Hint - In order to keep the MEL in your script editor for another time, instead of it disappearing once the code is executed. Highlight the code and hit enter on the enter key beside the number keys on you keyboard.]Page 1 of 1
Author: Stephen Kershaw
Submitted: 2010-11-10 11:46:59 UTC
Tags: mel, maya, namespace, remove, and script
Software: Maya
Views: 24,049
Related Items
-
Animated Olympic Fire 2014 (Maya) 3D Model
$69.00 (USD) -
Elephant 3d textured model 3ds max and maya scene files 3D Model
$30.00 (USD) -
The Alchemy Tools for Maya for Maya 1.0.0 (maya script)
$20.00 (USD) -
"Rapid Rig: Poser" for Maya for Maya 2.0.9 (maya script)
$20.00 (USD) -
Nick-Maya Rig With Advance Facial Setup for Maya 0.1.0
$20.00 (USD) -
Pamela Maya (2013) Rig for Maya 0.0.1
$20.00 (USD) -
Arab Rig for Maya with Ncloth simulation for Maya 0.0.1
$99.00 (USD) -
Poly Tools for Maya for Maya 0.4.2 (maya script)
$20.00 (USD) -
Gradient Data Manager script for Maya for Maya 1.1.1 (maya script)
$20.00 (USD)