Save on Publish?

Considering adding to the command that launches Pyblish QML, from…

  • Launch GUI

To…

  • Save Scene
  • Launch GUI

Basically ensuring that the scene is always saved prior to publishing. I’m thinking there is never any legitimate reason to not save the scene prior to publishing and it would eliminate a class of problems to simply save automatically before publishing.

First and potentially most important problem is being able to ensure that the scene referenced in whatever metadata is outputted alongside the Instance actually refers to the right scene file, another problem solved is that the scene you copy (if you copy) is the exact same as the one you publish.

And finally, most plainly, it will ensure that a scene that simply hasn’t been saved ever gets published.

Can anyone think of any reason to why saving shouldn’t be mandatory when publishing?

Guessing this would happen in each integration?

No, and got a fair bit of plugins for handling that.
One problem for me though is that we are using the validators/repairing for saving the scene into the right path. This means that people can have unsaved scene, and let Pyblish save into the correct place without saving to the desktop first.

Mm, that’s my guess as well.

I see. I’ll have to think about this one…

Would it be possible for you to have this happen when hitting the “Publish” button? Like I’m suggesting we do here, but in this case it runs your save script, as opposed to Maya’s cmds.file(save=True).

Guessing that I would maintain a custom userSetup for Pyblish?

You’ll need to copy and modify the setup() function that is in charge of adding to the menu.

Where add_to_filemenu() is what you need to replace with your own.

This could just as well mean someone opens the GUI, makes changes with it open and the content still being invalid? Whatever way we proceed it should be done exactly at the moment of publishing.

Also I think saving as the GUI opens isn’t intuitive enough.

Some extra questions:;

  • Could Validations run without save?
  • Why or why not?
  • What happens if an Artist requires to do “some sort of cleanup” to his scene before he extracts the contents. Does he want to save his scene over his current scene? (How does he stay aware of the fact that it’s happening?)
  • I know this “cleanup” is supposedly best done by Pyblish where possible. But as we’ve seen with Maya ascii exports getting the exact output you want without ‘messing’ with the scene’s contents isn’t always as easily as you might think.
  • What happens if the scene wasn’t saved yet? Does it give a popup?

Yeah you’re probably right, this isn’t the place to save.

Thanks for the input!

How about a default scene save extractor, that runs just before the extraction stage?

That’s what I have for most of the hosts.

It doesn’t quite mesh I think, too many question marks. For example, if it’s an Extractor, it won’t stop if saving fails. If it’s a Validator, it will modify the scene when just validating. :S

That’s exactly why I think this should be left to the studio. We for instance run just a validator. There is a repair on it that saves the scene, however it’s so automatic to just press ctrl+s that we rarely click it. As simple as that. If your scene is not saved, you can’t publish, but this is purely a preference I’d say.

I can easily imagine lifting this restriction for some kind of project where we’re bashing out tons of tiny models really quickly. I might just keep a scene open and keep publishing these simple things from it without even caring for the source scene where I’m working. When I’m done I’ll just end up with 50 simple models exported from the same scene. Of course that’s and extreme, just for illustration, but you get the jist.

2 Likes