Ok, I think I've found the issue, and it's the fact that PyMel is passing in
the reference path to the cmds.referenceQuery command and not the refNode
itself.

 Looks like Maya cmds can't cope with copyNumbers {x} being passed in, I've
got multiple references pointing to a single file so the paths are given
with the copyNumber{x} and it looks like this isn't handled. The minute you
pass the refNode itself all is well:

In pm.core.system I just edited line 1222 so that the refNode is passed in
instead.

            edits = cmds.referenceQuery(fr.refNode,
                                        failedEdits = not mode,
                                        successfulEdits = mode,
                                        **kwargs)


In cmds try this, make a cube, add an attr 'foo', save it and then reference
multiple times to a new file, animate foo save the scene. Open the cube file
and delete foo to generate the failedEdits and reopen the file with the
multiple refs: try this:

edits = cmds.referenceQuery('cubeRN1', failedEdits=True,
successfulEdits=False, es=True)

edits = cmds.referenceQuery('C:/cube{1}', failedEdits=True,
successfulEdits=False, es=True)


First one finds the edits, second one finds nothing.


I've added that to our server copy of pymel but let me know if that's safe
and there's no other reason for you were passing in the path in the first
place


cheers


Mark




On 28 June 2010 13:19, Erkan Özgür Yılmaz <[email protected]> wrote:

> I have a similiar problem with references:
>
> - trying to get referenceEdits for a referenced node inside another
> referenced node gives nothing until I specify that I want to get the edits
> those has been done in a specific reference node by using onReferenceNode
> flag whereas both maya and pymel documentation says not using
> onReferenceNode causes you to get all the edits.
>
> - trying to change edit targets with referenceEdit.changeEditTarget is not
> working in above case with or without onReferenceNode flag
>
> I'm not saying that these are bugs, may be they are not very well
> documented or I don't understand the correct usage... But I must say that in
> other cases I use these commands successfully to change referenced files
> with new ones. I only have problem when the referenced file also has some
> references to other files...
>
> E.Ozgur Yilmaz
> Lead Technical Director
> eoyilmaz.blogspot.com
> www.ozgurfx.com
>
>
> On Fri, Jun 18, 2010 at 1:30 PM, MarkJ <[email protected]> wrote:
>
>> I've been deep in referencing hell for the last few weeks, trying to
>> debug some issues with the way Maya handles namespaces and references
>> in our pipeline. Part of this is to do a fast checker that will give
>> the guys a heads up as to the health status of the ref scenes they're
>> working on. I'm basically trying to get a printout of all failed
>> referenceEdits for all loaded referenceNodes.
>>
>> It looks like I've come across a possible bug in the way Pymel hadles
>> this. Code below is a simple test wrapper, in the scene I've got 3
>> references all pointing to the same file. I know that all 3 have
>> failed edits on them and if I run the below code using the
>> cmds.refQuery I get all 3 as fails + the count. But using either of
>> the Pymel blocks I only get the fails caught for the first ref, not
>> the other 3.
>>
>> refNodes=[ref for ref in pCore.listReferences() if ref.isLoaded()]
>> for ref in refNodes:
>>        print ref,
>>
>> len(pm.referenceQuery(ref.refNode,successfulEdits=False,failedEdits=True,es=True))
>>        print ref,
>>
>> len(cmds.referenceQuery(str(ref.refNode),successfulEdits=False,failedEdits=True,es=True))
>>        print ref, len(ref.getReferenceEdits(failedEdits=True))
>>
>> anybody else come across issues with this?
>>
>> thanks
>>
>> Mark
>>
>> --
>> http://groups.google.com/group/python_inside_maya
>
>
>  --
> http://groups.google.com/group/python_inside_maya
>

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

Reply via email to