ynput / ayon-core

Apache License 2.0
22 stars 30 forks source link

Maya: Workfile Increment in one go #545

Closed moonyuet closed 1 month ago

moonyuet commented 1 month ago

Changelog Description

This PR is to add the option to increment and save workfile in Maya.

Additional info

Testing notes:

  1. Enable the plugin in ayon+settings://core/tools/Workfiles/ayon_menu/version_up_workfile image

  2. Launch Maya

  3. Go to AYON

  4. Click Version up Workfile image

ynbot commented 1 month ago

Task linked: AY-5538 workfile increment in one go

BigRoy commented 1 month ago

or changed to someting like Workfile Increment Version or similar @antirotor @BigRoy opinions on that?

I agree that it looks odd in the list where it is. Note that we've had this in Maya all this time already but in our custom scripts menu.

For sake of reference, here is a screenshot:

image

What is nice about that one is that it's very close to the top since it's such a frequently clicked button - and preferably also NOT misclicked with "Set frame range" in the list where it is now.

As such I'm wondering whether it's worth thinking about moving it directly below the greyed out current context entry as just "Version up" or "Version up workfile".

And second if it should be somehow treated in relation to native maya CTRL+ALT+S Incremental save action...as now it is not working with conjunction with it and produce odd results on the active workfile version.... (by appending another version like myworkfilename_v0010.001 )

It would be nice to have it be able to pick that up - yet at the same time we do want to keep it abstractly working also with other DCCs or with custom comments in the names like _v001_my_comment_01. Anyway, easiest maybe to make it 'version up' exactly like what the workfiles tool would propose as new filename, which I believe would just strip off the .001 and go for _v011

Another benefit is that with that logic it would also be capable of generating the first version name :)

BigRoy commented 1 month ago

If we're going for custom menu - can we move it to the top by default? If we're not, then I'd still want to argue for moving it to the top of the AYON menu (which is what I initially meant).

antirotor commented 1 month ago

My opinion is not to have it in custom menu - where we shouldn't add core ayon behavior and leave it for studio customizations and maybe some optional or very specialized scripts. And that would mean having it as high as possible in the main menu.

BigRoy commented 1 month ago

If something then Im not 100 percemt sure about the settings and its location in the Core addon...its the very last setting and I would expect it more up aka closer to Workfile settings

image

Agreed - with that label on the setting I also wouldn't expect that to influence the menu entry. We should really label it something like "Add 'Version Up Workfile' to AYON menu" or something alike, and of course place it in a sensible place.

moonyuet commented 1 month ago

Add 'Version Up Workfile' to AYON menu

I have added the description to explain what it is doing. image

BigRoy commented 1 month ago

Add 'Version Up Workfile' to AYON menu

I have added the description to explain what it is doing. image

I'd argue that this is one of those instances that I personally wouldn't even hover it since I'd expect the toggle to be something completely different. In this case the label itself is just plain non-informative unless it would be under a "AYON menu" header.

moonyuet commented 1 month ago

@BigRoy I have put the version up to workfile inside AYON menu.

BigRoy commented 1 month ago

I have put the version up to workfile inside AYON menu.

image

I quite like that actually.

BigRoy commented 1 month ago

Also be aware that this version up logic seems to version up to the next available free version?

Say there are files:

v001
v003
v004

When opening v001 and versioning up I suspect it may save to v002 even though workfiles tool would default to v005. I might be mistaken reading the code - but that may be an edge case we'd also want to check?

BigRoy commented 1 month ago

@antirotor could you test this edge case?