ynput / OpenPype

OpenPype has been surpassed by AYON and is now read only.
https://ayon.ynput.io
MIT License
286 stars 129 forks source link

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

Closed Sponge96 closed 7 months ago

Sponge96 commented 8 months ago

Changelog Description

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).
moonyuet commented 8 months ago

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)

moonyuet commented 8 months ago

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 commented 8 months ago

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