mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Validation for required namespace.
This commit is contained in:
parent
bc50139ec8
commit
3995416028
2 changed files with 17 additions and 0 deletions
|
|
@ -57,3 +57,16 @@ class ValidateXgen(pyblish.api.InstancePlugin):
|
|||
json.dumps(inactive_modifiers, indent=4, sort_keys=True)
|
||||
)
|
||||
)
|
||||
|
||||
# We need a namespace else there will be a naming conflict when
|
||||
# extracting because of stripping namespaces and parenting to world.
|
||||
node_names = [instance.data["xgmPalette"]]
|
||||
for _, connections in instance.data["xgenConnections"].items():
|
||||
node_names.append(connections["transform"].split(".")[0])
|
||||
|
||||
non_namespaced_nodes = [n for n in node_names if ":" not in n]
|
||||
if non_namespaced_nodes:
|
||||
raise PublishValidationError(
|
||||
"Could not find namespace on {}. Namespace is required for"
|
||||
" xgen publishing.".format(non_namespaced_nodes)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -43,6 +43,10 @@ Create an Xgen instance to publish. This needs to contain only **one Xgen collec
|
|||
|
||||
You can create multiple Xgen instances if you have multiple collections to publish.
|
||||
|
||||
:::note
|
||||
The Xgen publishing requires a namespace on the Xgen collection (palette) and the geometry used.
|
||||
:::
|
||||
|
||||
### Publish
|
||||
|
||||
The publishing process will grab geometry used for Xgen along with any external files used in the collection's descriptions. This creates an isolated Maya file with just the Xgen collection's dependencies, so you can use any nested geometry when creating the Xgen description. An Xgen version will consist of:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue