+Example plugin
+
+
```python
import pyblish.api
from openpype.pipeline import (
@@ -496,16 +501,13 @@ class MyExtendedPlugin(
if not self.optional:
return True
+ # Attribute values are stored by class names
+ # - for those purposes was implemented 'get_attr_values_from_data'
+ # to help with accessing it
+ attribute_values = self.get_attr_values_from_data(context.data)
# Get 'process' key
- process_value = (
- context.data
- .get("publish_attributes", {})
- # Attribute values are stored by class names
- .get(self.__class__.__name__, {})
- # Access the key
- .get("process")
- )
- if process_value or process_value is None:
+ process_value = attribute_values.get("process")
+ if process_value is None or process_value:
return True
return False
@@ -515,3 +517,32 @@ class MyExtendedPlugin(
# Do plugin logic
...
```
+
+
+
+## **UI examples**
+### Main publish window
+Main window of publisher shows instances and their values, collected by creators.
+
+**Card view**
+
+**List view**
+
+
+#### *Instances views*
+List of instances always contains an `Options` item which is used to show attributes of context plugins. Values from the item are saved and loaded using [host implementation](#required-functions-in-host-implementation) **get_context_data** and **update_context_data**. Instances are grouped by family and can be shown in card view (single selection) or list view (multi selection).
+
+Instance view has at the bottom 3 buttons. Plus sign opens [create dialog](#create-dialog), bin removes selected instances and stripes swap card and list view.
+
+#### *Context options*
+It is possible to change variant or asset and task context of instances at the top part but all changes there must be confirmed. Confirmation will trigger recalculation of subset names and all new data are stored to instances.
+
+#### *Create attributes*
+Instance attributes display all created attributes of all selected instances. All attributes that have the same definition are grouped into one input and are visually indicated if values are not the same for selected instances. In most cases have **< Multiselection >** placeholder.
+
+#### *Publish attributes*
+Publish attributes work the same way as create attributes but the source of attribute definitions are pyblish plugins. Attributes are filtered based on families of selected instances and families defined in the pyblish plugin.
+
+### Create dialog
+
+Create dialog is used by artist to create new instances in a context. The context selection can be enabled/disabled by changing `create_allow_context_change` on [creator plugin](#creator). In the middle part the artist selects what will be created and what variant it is. On the right side is information about the selected creator and its pre-create attributes. There is also a question mark button which extends the window and displays more detailed information about the creator.
\ No newline at end of file
diff --git a/website/yarn.lock b/website/yarn.lock
index 7f677aaed7..e01f0c4ef2 100644
--- a/website/yarn.lock
+++ b/website/yarn.lock
@@ -5125,9 +5125,9 @@ minimatch@^3.0.4:
brace-expansion "^1.1.7"
minimist@^1.2.0, minimist@^1.2.5:
- version "1.2.5"
- resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
- integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
+ version "1.2.6"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44"
+ integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==
mkdirp@^0.5.5:
version "0.5.5"
@@ -5207,9 +5207,9 @@ node-fetch@2.6.7:
whatwg-url "^5.0.0"
node-forge@^1.2.0:
- version "1.2.1"
- resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.2.1.tgz#82794919071ef2eb5c509293325cec8afd0fd53c"
- integrity sha512-Fcvtbb+zBcZXbTTVwqGA5W+MKBj56UjVRevvchv5XrcyXbmNdesfZL37nlcWOfpgHhgmxApw3tQbTr4CqNmX4w==
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.0.tgz#37a874ea723855f37db091e6c186e5b67a01d4b2"
+ integrity sha512-08ARB91bUi6zNKzVmaj3QO7cr397uiDT2nJ63cHjyNtCTWIgvS47j3eT0WfzUwS9+6Z5YshRaoasFkXCKrIYbA==
node-releases@^2.0.1:
version "2.0.2"