def list_reference_file():
list_dir = pm.filePathEditor(query=True, listDirectories="", unresolved=True)
list_files = list()
for directory in list_dir:
list_file_elem = pm.filePathEditor(query=True, listFiles=directory, withAttribute=True)
it = iter(list_file_elem)
list_tuple_file = zip(it, it)
for (x, y) in list_tuple_file:
list_files.append((os.path.normpath(
os.path.join(directory, x)).replace(os.sep, "/"), y))
return list_files
返回一个列表,列表里的每一个元素为元组 ({资源的绝对路径}, 引用资源的属性名)