I was doing this recently with pymel. Maya says that you can now remove ref edits while the reference is loaded, but I've noticed this isn't always the case, so I still unload it first for safety
for ref in pm.listReferences(): ref.unload() for edit in ref.getReferenceEdits(): # this way you can selectively remove edits pm.ReferenceEdit(edit, fileReference=ref).remove(force=True) ref.load() But if you want to remove ALL edits it might be faster to do a clean(), which removes failed edits. If the ref is unloaded then all edits are failed :) for ref in pm.listReferences(): ref.unload() ref.clean() ref.load() On Thursday, October 30, 2014 11:51:12 AM UTC, Fredrik Averpil wrote: > > And if it makes it easier to somehow solve this ... I'm looking to remove > *all* reference edits. > > > >> > > -- 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 python_inside_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/2ee0b079-d794-4d84-956e-d465ae245e22%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.