This one liner seems to work
unloaded_reference_files = [file for file in cmds.file(reference=True, 
q=True) if not cmds.referenceQuery(file, isLoaded=True)]


On Tuesday, July 18, 2017 at 7:25:41 AM UTC-4, Neil Roche wrote:
>
> Off the top of my head I think the referenceQuery command will only return 
> a boolean for the isLoaded flag.
>
>
>
> On Monday, 17 July 2017 13:46:32 UTC+1, gnn wrote:
>>
>> Hi!
>> Did someone know why this little script isn't print all the unloaded 
>> referenced files in my .ma file? 
>> i've got somes nested ones who are unchecked in the referenced editor, 
>> and even if it print them in : 'print eachnode', 
>> it doesn't tell me that they're unloaded...??
>>
>> references=[]
>> for ref_node in cmds.ls(type='reference'):
>>     references.append(ref_node)
>> for eachnode in references:
>>     print eachnode
>>     unLoaded_ref_files = cmds.referenceQuery(eachnode, filename=True, 
>> isLoaded=False) 
>> print unLoaded_ref_files      
>>
>> thanks a lot for any help
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/9a50fc69-b510-422b-8c0b-40eae65196fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to