Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maya: Workfile Increment in one go #545

Merged
merged 25 commits into from
Jun 5, 2024

Conversation

moonyuet
Copy link
Member

@moonyuet moonyuet commented May 23, 2024

Changelog Description

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

Additional info

  • Not working for untitled scene:)/new scene
  • We need to think about the implementation of increment and save in other hosts
  • Please make sure you updated the latest version of ayon core addon.

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
Copy link
Contributor

ynbot commented May 23, 2024

Task linked: AY-5538 workfile increment in one go

@ynbot ynbot added size/XS type: enhancement Improvement of existing functionality or minor addition host: Maya labels May 23, 2024
@moonyuet moonyuet requested review from iLLiCiTiT and LiborBatek May 23, 2024 14:49
@moonyuet moonyuet marked this pull request as ready for review May 23, 2024 14:51
Copy link
Member

@LiborBatek LiborBatek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tool does what it should also tested with custom _suffix present in the filename and all working fine.

There might be few questions still.

First if the tool should be named as it is atm

image

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

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 )

Again something to consider imho.

@BigRoy
Copy link
Collaborator

BigRoy commented May 28, 2024

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 :)

@moonyuet moonyuet requested review from LiborBatek and BigRoy May 28, 2024 13:33
Copy link
Member

@LiborBatek LiborBatek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected and now the tool sits in Custom Menu.

image

Still would like to hear opinions on that... @antirotor @m-u-r-p-h-y

But can be merged as is imho.

@BigRoy
Copy link
Collaborator

BigRoy commented May 28, 2024

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
Copy link
Member

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.

@moonyuet moonyuet requested review from LiborBatek and antirotor May 29, 2024 09:20
Copy link
Member

@LiborBatek LiborBatek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works nicely...

image

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

@BigRoy
Copy link
Collaborator

BigRoy commented May 29, 2024

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.

server/settings/tools.py Outdated Show resolved Hide resolved
server/settings/tools.py Outdated Show resolved Hide resolved
server/settings/tools.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@BigRoy BigRoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With maya client code separated I believe this PR should also bump the maya addon version.

client/ayon_core/pipeline/context_tools.py Show resolved Hide resolved
client/ayon_core/pipeline/context_tools.py Outdated Show resolved Hide resolved
client/ayon_core/pipeline/context_tools.py Outdated Show resolved Hide resolved
client/ayon_core/pipeline/context_tools.py Show resolved Hide resolved
Copy link
Collaborator

@BigRoy BigRoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't test - code overall looks good to me.

I did have one comment on title in settings - there's also still an open comment by @iLLiCiTiT to revert ayon core version change.

Also, this comment should still be considered but for a separate issue.

server/settings/tools.py Outdated Show resolved Hide resolved
Copy link
Member

@antirotor antirotor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, it works nice. Thanks

@BigRoy
Copy link
Collaborator

BigRoy commented Jun 5, 2024

@antirotor could you test this edge case?

client/ayon_core/pipeline/context_tools.py Outdated Show resolved Hide resolved
@moonyuet moonyuet merged commit a0cb4a2 into develop Jun 5, 2024
1 check passed
@moonyuet moonyuet deleted the enhancement/AY-5538_workfile-increment-in-one-go branch June 5, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
host: Maya size/XS type: enhancement Improvement of existing functionality or minor addition
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants