* OP-4258 - Settings for transient template * OP-4258 - added collector for transient staging dir Allows setting profiles to create persistent stagingDir. * OP-4258 - implemented persistent stagingDir in cleanup * OP-4258 - updated logging * OP-4258 - updated settings * OP-4258 - Hound * OP-4258 - renamed class to better name * OP-4258 - changed location of Settings Should be used in create and collecting phase also. * OP-4258 - remove version placeholder from transient template It was discussed that it shouldn't be used for now. * OP-4258 - extracted transient dir query logic This should be used in collection and creation phase for DCCs which are storing staging dir path directly into nodes. * OP-4258 - added use of scene_name placeholder in collector DCC dependent, way how to implement versioning, might not be used. * OP-4258 - fix scene_name * OP-4258 - remove wrong defaults * OP-4258 - added possibility of different template name Studio might want to put renders to different place from caches. * OP-4258 - renamed according to GH comments * OP-4258 - use is active filter * OP-4258 - use is active filter * OP-4793 - added project_settings to signature * OP-4793 - updated logging message * OP-4793 - added documentation * OP-4258 - fix function arguments * OP-4258 - updates to documentation * OP-4258 - added known issues to documentation --------- Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| abstract_collect_render.py | ||
| abstract_expected_files.py | ||
| constants.py | ||
| contants.py | ||
| lib.py | ||
| publish_plugins.py | ||
| README.md | ||
Publish
OpenPype is using pyblish for publishing process which is a little bit extented and modified mainly for UI purposes. OpenPype's (new) publish UI does not allow to enable/disable instances or plugins that can be done during creation part. Also does support actions only for validators after validation exception.
Exceptions
OpenPype define few specific exceptions that should be used in publish plugins.
Validation exception
Validation plugins should raise PublishValidationError to show to an artist what's wrong and give him actions to fix it. The exception says that error happened in plugin can be fixed by artist himself (with or without action on plugin). Any other errors will stop publishing immediately. Exception PublishValidationError raised after validation order has same effect as any other exception.
Exception PublishValidationError 3 arguments:
- message Which is not used in UI but for headless publishing.
- title Short description of error (2-5 words). Title is used for grouping of exceptions per plugin.
- description Detailed description of happened issue where markdown and html can be used.
Known errors
When there is a known error that can't be fixed by user (e.g. can't connect to deadline service, etc.) KnownPublishError should be raise. The only difference is that it's message is shown in UI to artist otherwise a neutral message without context is shown.
Plugin extension
Publish plugins can be extended by additional logic when inherits from OpenPypePyblishPluginMixin which can be used as mixin (additional inheritance of class).
import pyblish.api
from openpype.pipeline import OpenPypePyblishPluginMixin
# Example context plugin
class MyExtendedPlugin(
pyblish.api.ContextPlugin, OpenPypePyblishPluginMixin
):
pass
Extensions
Currently only extension is ability to define attributes for instances during creation. Method get_attribute_defs returns attribute definitions for families defined in plugin's families attribute if it's instance plugin or for whole context if it's context plugin. To convert existing values (or to remove legacy values) can be implemented convert_attribute_values. Values of publish attributes from created instance are never removed automatically so implementing of this method is best way to remove legacy data or convert them to new data structure.
Possible attribute definitions can be found in openpype/pipeline/lib/attribute_definitions.py.