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

Continue processing after Validate-only #195

Open
larsbijl opened this issue May 9, 2016 · 11 comments
Open

Continue processing after Validate-only #195

larsbijl opened this issue May 9, 2016 · 11 comments

Comments

@larsbijl
Copy link
Member

larsbijl commented May 9, 2016

personal geviance here.

when i open the QML in a scene and it creates some entries, I want to validate them before i go through and extract. I make some changes to instances selected.

when i verify it does what is expected. now to start publishing i have to go all the way back with a hard reset that loose all the selections changes i made in the instances and plugins.

@tokejepsen
Copy link
Member

tokejepsen commented May 9, 2016

You can save the state of the instances in the scene by using callbacks.
Here is an example of saving the state of a write node in Nuke:

import pyblish.api


# Pyblish callbacks for presisting instance states to the scene
def custom_toggle_instance(instance, new_value, old_value):

    if instance.data['family'] == 'deadline.render':
        instance[0]['disable'].setValue(not bool(new_value))

pyblish.api.register_callback("instanceToggled", custom_toggle_instance)

This would need to happen on application startup, so for Nuke you'll need to place it in a menu.py file.

When it comes to plugins there aren't any support for saving the state. I have been thinking about doing this with callbacks as well.

@mottosso
Copy link
Member

mottosso commented May 9, 2016

Toke suggests and interesting workaround, but I agree, the play-button should still be visible after validating and it should indicate a continuation of publishing.

@tokejepsen
Copy link
Member

I thought the problem with doing that, would be that you can modify the scene file after validation?

@larsbijl
Copy link
Member Author

larsbijl commented May 9, 2016

i think it's oke to reset to after then collectors stage.
running the validators again should be manitory.

but loosing the instance and plugin selection is anoying

@tokejepsen
Copy link
Member

tokejepsen commented May 9, 2016

Sorry, I'm getting a bit confused. @larsbijl are you asking about a method for storing the state of the instances/plugins between resets?

@larsbijl
Copy link
Member Author

larsbijl commented May 9, 2016

both. i think that storing the state between resets is a workaround, but only if we can't resolve having to do a full reset after a validations in the first place.

I'd prefer to still have the play button after validation and have to reset to validation and the publishing. this would make it easier to follow and makes it less of a hassle to run validations before publishing.

@mottosso
Copy link
Member

mottosso commented May 9, 2016

I think he's just looking to maintain the checked state when resetting.

Opened up a separate issue for this here.

@larsbijl, do you think you could state issues as something actionable and solvable, rather than as an observation or statement of fact? It makes it easier to get an overview of what needs to happen when looking at it amongst other issues.

The general outline is:

  1. Goal - State clearly what you intend to get out of an issue
  2. Motivation - Optional, where needed, why you personally think this is necessary
  3. Implementation - Any thoughts you may have towards resolving an issue; does not need to be exact or accurate, consider it psuedo code to communicate intent

@larsbijl
Copy link
Member Author

larsbijl commented May 9, 2016

ok will do. closing ticket.

@larsbijl larsbijl closed this as completed May 9, 2016
@mottosso
Copy link
Member

mottosso commented May 9, 2016

Added an issue template. When you hit "New Issue" from now on, there will be a short guide towards writing the perfect issue. :)

@larsbijl
Copy link
Member Author

larsbijl commented May 9, 2016

looks good :) nice and easy to follow 👍

@mottosso mottosso reopened this May 16, 2016
@mottosso
Copy link
Member

Reopening until new issue pops up.

@mottosso mottosso changed the title validate to publish requires a reset Continue processing after Validate-only May 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants