ynput / ayon-core

Apache License 2.0
27 stars 33 forks source link

Substance Painter: Add support for sync workfile version #590

Closed moonyuet closed 3 months ago

moonyuet commented 4 months ago

Changelog Description

This PR is to add sync workfile version option into substance painter host.

Additional info

Build the latest version of core addon and substance painter addon

Testing notes:

  1. Enable Follow workfile version in either ayon+settings://core/publish/CollectAnatomyInstanceData/follow_workfile_version
  2. Publish
  3. TextureSet and Workfile version should be aligned
ynbot commented 4 months ago

Task linked: AY-5648 Substance work / publish version sync

LiborBatek commented 4 months ago

One small comment:

@moonyuet would it be possible to keep visible that option Follow workfile version on the Publish Instance so user could potentially switch the behaviour?? not sure if possible and also if good to have it exposed for ever...

BigRoy commented 4 months ago

@moonyuet would it be possible to keep visible that option Follow workfile version on the Publish Instance so user could potentially switch the behaviour?? not sure if possible and also if good to have it exposed for ever...

I wouldn't actually make that an artist's choice - that's a studio choice usually. Can you think of a use case where an artist really wants to take that control?

Actually - I also wouldn't expose it on the Create tab. Maya, Houdini and others have similar functionality but I've never seen that toggle in any of the integrations on any Creators? What am I missing? :)

LiborBatek commented 4 months ago

@BigRoy I get your point, makes sense

@moonyuet But now we can control it only globally within Ayon Core Addon with this setting ?

Screenshot 2024-06-04 181806

I think we need to allow user to set it within Substance Painter addon imho....kind of local override so it doesnt follow global settings only imho?

@BigRoy opinion on this?

moonyuet commented 4 months ago

@moonyuet But now we can control it only globally within Ayon Core Addon with this setting ?

Yes, it is

I think we need to allow user to set it within Substance Painter addon imho....kind of local override so it doesnt follow global settings only imho?

@BigRoy I think we can do this too by using instance.data["followWorkfileVersion"]

BigRoy commented 4 months ago

But now we can control it only globally within Ayon Core Addon with this setting ?

Screenshot 2024-06-04 181806

I think we need to allow user to set it within Substance Painter addon imho....kind of local override so it doesnt follow global settings only imho?

Currently this is global to all I believe, and yes - that's how we use it. If we want to make that "profile" based so that we can go more complex there I'd make that a separate issue and separate PR but it's a valid request I suppose.

I think we can do this too by using instance.data["followWorkfileVersion"]

I think profiles filtering logic can be used for this - but I'd not merge that into this PR.

BigRoy commented 4 months ago

But now we can control it only globally within Ayon Core Addon with this setting ?

Screenshot 2024-06-04 181806

Looking at the logic now it's still in the creator - and not "globally" like in other hosts. Is it correct that you still need to implement it so that it matches e.g. the maya/houdini, etc. logic?

moonyuet commented 4 months ago

But now we can control it only globally within Ayon Core Addon with this setting ?

Screenshot 2024-06-04 181806

I think we need to allow user to set it within Substance Painter addon imho....kind of local override so it doesnt follow global settings only imho?

Currently this is global to all I believe, and yes - that's how we use it. If we want to make that "profile" based so that we can go more complex there I'd make that a separate issue and separate PR but it's a valid request I suppose.

I think we can do this too by using instance.data["followWorkfileVersion"]

I think profiles filtering logic can be used for this - but I'd not merge that into this PR.

I actually implement the logic here for temporary use. And once the profile setting has been finished we can make changes on that.

BigRoy commented 4 months ago

I actually implement the logic here for temporary use. And once the profile setting has been finished we can make changes on that.

I'd make the logic here match the other integrations - so it's aligned and once we move things over it works for all. Best not to deviate here, especially if it's "temporary".

moonyuet commented 4 months ago

I actually implement the logic here for temporary use. And once the profile setting has been finished we can make changes on that.

I'd make the logic here match the other integrations - so it's aligned and once we move things over it works for all. Best not to deviate here, especially if it's "temporary".

I already restored the creator logic and the sync workfile version can only sync through the global settings and we can integrate profile setting later.