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

Max: updated implementation of save_scene + small QOL improvements to host #6186

Merged
merged 8 commits into from Feb 14, 2024

Conversation

Sponge96
Copy link
Contributor

@Sponge96 Sponge96 commented Feb 1, 2024

Changelog Description

  • Removed has_unsaved_changes from Max host as it looks to have been unused and unimplemented.
  • Added and implemented workfile_has_unsaved_changes to Max host.
  • Mirrored the Houdini host to implement the above into save_scene publish for Max.
  • Added a line to startup.ms which opens the usual 'default' menu inside of Max (see screenshots).

Current (Likely opens this menu due to one or more of the startup scripts used to insert OP menu):
image

New:
image

Additional info

It's my understanding that the has_unsaved_changes is now legacy so I have replaced and implemented it using workfile_has_unsaved_changes.

The change to the startup.ms is really just QOL for artists as the view it currently defaults to is not useful nor is it the usual default.

Testing notes:

  1. Start 3dsmax
  2. Check that on the right hand side it has defaulted to the 'create' view/menu/mode
  3. Open the 'Publish/Create' OpenPype Menu
  4. Create new 'workfile' publish
  5. Publish
  6. Check the log of save_scene is NOT saving if no changes to scene were made; or is saving when changes have been made (it should display INFO or DEBUG information in either case).

has_unsaved_changes seems to be legacy as indicated by the base class. It was already unused/implemented. Replaced with working version workfiles_has_unsaved_changes
@ynbot ynbot added size/XS Denotes a PR changes 0-99 lines, ignoring general files host: 3dsmax Autodesk 3dsmax labels Feb 1, 2024
@Sponge96 Sponge96 changed the title Max: QOL host tweaks Max: updated implementation of save_scene + small QOL improvements to host Feb 1, 2024
@moonyuet
Copy link
Member

moonyuet commented Feb 2, 2024

Thank you!
I have tested in my side and the workfile dialog can get the unsaved change when I adjust the scene without saving.
I publish the scene with workfileAsset and it publishes successfully without bug.
Only thing I encounter an error is when I launch 3dsmax with startup.ms, I already make comment on the maxscript(It is mainly because the comment isn't commented correctly)

Co-authored-by: Kayla Man <64118225+moonyuet@users.noreply.github.com>
Copy link
Member

@moonyuet moonyuet left a comment

Choose a reason for hiding this comment

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

Looks good for me, Thank you!

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.

Seems working fine...

The UI switched correctly to the Create tab and publishing working fine too.

My only concern being, it always says "No unsaved changes, skipping file save..."

I simply couldnt force to perform Save action if any changes made to the active work file...

image

@moonyuet anything to add to it? maybe my expectations being wrong.

@moonyuet
Copy link
Member

moonyuet commented Feb 5, 2024

Seems working fine...

The UI switched correctly to the Create tab and publishing working fine too.

My only concern being, it always says "No unsaved changes, skipping file save..."

I simply couldnt force to perform Save action if any changes made to the active work file...

image @moonyuet anything to add to it? maybe my expectations being wrong.

maybe we can error out the collector if there is unsaved change (similar to what we did in maya). Otherwise no debug message.

@Sponge96
Copy link
Contributor Author

Sponge96 commented Feb 5, 2024

Seems working fine...
The UI switched correctly to the Create tab and publishing working fine too.
My only concern being, it always says "No unsaved changes, skipping file save..."
I simply couldnt force to perform Save action if any changes made to the active work file...
image
@moonyuet anything to add to it? maybe my expectations being wrong.

maybe we can error out the collector if there is unsaved change (similar to what we did in maya). Otherwise no debug message.

It should be printing INFO already, just tested again to be sure it's working as intended and all good on my end? I mirrored the logic that Houdini implementation currently uses, so if we do decide to tweak probably good to also do that.
image

@mkolar mkolar added the sponsored Client endorsed or requested label Feb 9, 2024
@moonyuet moonyuet merged commit e020ca7 into ynput:develop Feb 14, 2024
1 check passed
@ynbot ynbot added this to the next-patch milestone Feb 14, 2024
@Sponge96 Sponge96 deleted the max_tweaks branch February 14, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community contribution host: 3dsmax Autodesk 3dsmax port to AYON size/XS Denotes a PR changes 0-99 lines, ignoring general files sponsored Client endorsed or requested target: AYON target: OpenPype
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

8 participants