Create version 0 in Ftrack
4 4

13 posts in this topic

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
4 4