Luigi Posted October 9, 2017 Report Share Posted October 9, 2017 What is if a client needs to get the delivery versions starting with version 0? At the moment it is not possible in ftrack to have version 0. Currently all the delivery versions with version 0 are not showing up in ftrack. Is there a solution for this issue? Link to comment Share on other sites More sharing options...
Mattias Lagergren Posted October 10, 2017 Report Share Posted October 10, 2017 Hi Luigi, An ftrack asset version should be able to have version 0 if created manually. Link to comment Share on other sites More sharing options...
Luigi Posted October 11, 2017 Author Report Share Posted October 11, 2017 Quote if created manually. What do you mean exactly? Link to comment Share on other sites More sharing options...
Mattias Lagergren Posted October 12, 2017 Report Share Posted October 12, 2017 16 hours ago, Luigi said: What do you mean exactly? Manually as using the ftrack-python-api Link to comment Share on other sites More sharing options...
Remus Avram Posted November 8, 2017 Report Share Posted November 8, 2017 Hi @Mattias Lagergren can you please give us an example? I tried like this: session.create('AssetVersion', {'asset': asset, 'task': task, 'version': 0, 'status': status } ) self._session.commit() Using version 0 will just create a new version, not version 0. Link to comment Share on other sites More sharing options...
Lucas Correia Posted November 9, 2017 Report Share Posted November 9, 2017 Hi Remus, When creating a new version, it seems like `0` is treated as None and the resulting AssetVersion will have the version number set to the next available version number or 1. After the version has been created it is possible to update the version number to set it explicitly as 0. asset_version = session.create('AssetVersion', {...}) session.commit() asset_version['version'] = 0 session.commit() Regards, Lucas Link to comment Share on other sites More sharing options...
Remus Avram Posted November 11, 2017 Report Share Posted November 11, 2017 Thanks @Lucas Correia! In this way it works. I didn't think in this way Link to comment Share on other sites More sharing options...
Remus Avram Posted November 28, 2017 Report Share Posted November 28, 2017 Hi @Lucas Correia, is it possible to change the behaviour too allow creating version 0 without changing it after the version was created? We need to patch it everywhere we create a new versions. Link to comment Share on other sites More sharing options...
Mattias Lagergren Posted November 29, 2017 Report Share Posted November 29, 2017 Hi @Remus Avram I will report this as a bug, but might take some time to get fixed. Link to comment Share on other sites More sharing options...
Remus Avram Posted November 29, 2017 Report Share Posted November 29, 2017 Thanks @Mattias Lagergren! For the moment the work around works. It's just that would be cool to have it fixed. Link to comment Share on other sites More sharing options...
tokejepsen Posted December 12, 2017 Report Share Posted December 12, 2017 On 11/29/2017 at 10:05 AM, Mattias Lagergren said: I will report this as a bug, but might take some time to get fixed. I thought this was the intention, so we are using it as a feature. If we want to create the next available version, we set the version to 0 when creating the asset version. It would be nice to still retain this feature somehow. Maybe -1 would make more sense for this? Or a dedicated method or argument for getting the next available version number. Link to comment Share on other sites More sharing options...
Remus Avram Posted December 12, 2017 Report Share Posted December 12, 2017 21 minutes ago, tokejepsen said: I thought this was the intention, so we are using it as a feature. If we want to create the next available version, we set the version to 0 when creating the asset version. It would be nice to still retain this feature somehow. Maybe -1 would make more sense for this? Or a dedicated method or argument for getting the next available version number. I think not specifying the version number when you create the assetVersion it's the best way. In this way it's automatically creating the next version. Link to comment Share on other sites More sharing options...
tokejepsen Posted December 12, 2017 Report Share Posted December 12, 2017 4 minutes ago, Remus Avram said: I think not specifying the version number when you create the assetVersion it's the best way. In this way it's automatically creating the next version. Good point! We'll probably use that then instead. Specifically we are using https://github.com/pyblish/pyblish-ftrack, where we allow the users to specify the version number, but we can just -1 internally as a way to let the plugin know to create the next available version. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.