importing geometry caches issue

215 views
Skip to first unread message

river bell

unread,
Sep 13, 2017, 11:59:04 AM9/13/17
to Python Programming for Autodesk Maya
Hi all,

I am trying to import geometry caches on a list of objects.I am exporting these as a single file.
I am not able to use ths command :

    pm.mel.doImportCacheFile(myCache, "", [objs], list())

I get the following error :  Channel names did not match selected objects.

Tried searching the web and have not been able to find a solution.

PS : the cache file loads if i do so manually

thanks 

Warm Regards to all
 

Luke Harris

unread,
Sep 13, 2017, 3:20:15 PM9/13/17
to Python Programming for Autodesk Maya
Take a look at findChannelForObject() in doImportCacheFile.mel. It has a fairly common failure case when matching a channel name from the xml to a mesh in the scene - if the mesh has "..Deformed" on it it can fail. You could try match without the "Deformed" in those cases...
if ($foundMatch == -1) {
    $obj = substituteAllString($obj, "Deformed", "");
    $foundMatch = matchChannelWithoutPreString($channels, $obj, ":");
}


river bell

unread,
Sep 13, 2017, 10:28:58 PM9/13/17
to python_in...@googlegroups.com
Hi Luke, 
Thanks for chipping in !!
I've already handled the Deformed suffix. 
My char is referenced, will try to import and retry when I reach work.
Has it worked for you ?

Will update here soon. 
Thanks again
Warm Regards
River


river bell

unread,
Sep 14, 2017, 10:21:48 PM9/14/17
to python_in...@googlegroups.com
Hi, Luke

Embarrassing as it may be, it turned out to be a double and a single backslash problem.

My path had double backslash, in the peice of code I was trying inside Maya. In my batch it was handled by os.path.normpath and join  functions.

Thanks 
Warm regards
Riverbell
Reply all
Reply to author
Forward
0 new messages