Having a namespace issue and I'm a little stuck as how to solve it because I'm not sure why Maya renames objects the way it does in this case. I'm building a geometry caching module in our character pipeline. It takes all the assets it finds in an animators' shot and caches them, then lets lighters reference all the assets with caches applied. The problem I'm having is that the procedure that applies the cache isn't naming the meshes the way I'd like...it's leaving the namespace off of the new shapeDeformed node.
so assuming that the character mesh is referenced in as:
model_joe:body
|__ model_joe:bodyShape
I'd expect that Maya would rename the new shape with the same namespace, but instead I get:
model_joe:body
|__ bodyShapeDeformed
Not a big problem really, but because all of the characters use the same naming conventions, it does raise issues with other procs because there are now several objects in the scene called "bodyShapeDeformed."
global proc applyCache(string $obj, string $actorCacheDir, string $cacheFile){
string $switch = createHistorySwitch($obj,false);
string $cacheNode = cacheFile -attachFile -dir $actorCacheDir -f $cacheFile -ia ($switch+".inp[0]");
setAttr ($switch+".playFromCache") true;
}
I could write a procedure that adds the namespace back in after, but that seems a little sloppy so I'd like to do it the right way.