I am doing the ASCII parsing with a template file setup and it works great...

/Christian
- Sent from my iPhone -

On Dec 16, 2010, at 8:50, Pierre A <[email protected]> wrote:

> Hi list,
> 
> I'm facing an issue regarding references which are deleted on load
> when their path does not correspond to an existing file.
> 
> The user have a browse option to remap to an existing file, I'm
> looking for a way to reproduce the behavior in a python script. I've
> found no help in Echo All nor missingReferenceDialog.mel...
> 
> Otherwise, perhaps these workflows could work:
> - parse the maya file ( if it's in ascii ), find the lines
> corresponding to the creation of the references and test for the file
> path. They should be like:
> file -r -ns "NS" -dr 1 -rfn "REF_NAME" "PATH";
> and
> file -rdi 1 -ns "NS" -rfn "REF_NAME" "PATH";
> But I don't know if it's safe...
> 
> - add a call back ( MSceneMessage.Message.kBeforeCreateReferenceCheck
> or MSceneMessage.Message.kBeforeCreateReference ), but I don't know
> which enum to use nor the callback associated ( addCallback,
> addCheckCallback, addCheckFileCallback ) and the data accessible in
> the callback.
> 
> Of course I need to have access to the name of the reference node,
> associated to the file path. Best would be to be able to instantiate
> it as a PyNode (or get its attrs with maya.cmds)
> 
> Thanks!
> 
> -- 
> http://groups.google.com/group/python_inside_maya

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to