tokejepsen Posted November 29, 2016 Report Share Posted November 29, 2016 Hey, I'm getting duplicate components on a version, which I thought shouldn't be possible? Link to comment Share on other sites More sharing options...
tokejepsen Posted November 29, 2016 Author Report Share Posted November 29, 2016 This code does complain when the files exists on disk, but if you manually delete the file on disk, you can run this several times. # Retrieve location by name. location = session.query( 'Location where name is "toke.laptop"' ).one() # Assign a disk accessor with *temporary* storage location.accessor = ftrack_api.accessor.disk.DiskAccessor( prefix=r"C:\Users\admin\Documents\test" ) # Assign using ID structure. location.structure = ftrack_api.structure.standard.StandardStructure() version.create_component(path=r"C:\Users\admin\Documents\test\test.txt", location=location) session.commit() Link to comment Share on other sites More sharing options...
Mattias Lagergren Posted November 29, 2016 Report Share Posted November 29, 2016 Yes, the components names are not unique per version. This is something that we've considered changing, but we haven't had time to look into it yet. Link to comment Share on other sites More sharing options...
tokejepsen Posted November 29, 2016 Author Report Share Posted November 29, 2016 8 minutes ago, Mattias Lagergren said: Yes, the components names are not unique per version. This is something that we've considered changing, but we haven't had time to look into it yet. Fair enough, I was just used to the fail safe from the old API Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.