mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 08:54:53 +01:00
OP-2766 - skip non active instances
This commit is contained in:
parent
755a6dabfd
commit
85b49da44e
1 changed files with 10 additions and 7 deletions
|
|
@ -35,27 +35,30 @@ class CollectInstances(pyblish.api.ContextPlugin):
|
|||
layers_meta = stub.get_layers_metadata()
|
||||
instance_names = []
|
||||
for layer_item in layer_items:
|
||||
layer_instance_data = stub.read(layer_item, layers_meta)
|
||||
layer_meta_data = stub.read(layer_item, layers_meta)
|
||||
|
||||
# Skip layers without metadata.
|
||||
if layer_instance_data is None:
|
||||
if layer_meta_data is None:
|
||||
continue
|
||||
|
||||
# Skip containers.
|
||||
if "container" in layer_instance_data["id"]:
|
||||
if "container" in layer_meta_data["id"]:
|
||||
continue
|
||||
|
||||
if not layer_meta_data.get("active", True): # active might not be in legacy meta
|
||||
continue
|
||||
|
||||
instance = instance_by_layer_id.get(str(layer_item.id))
|
||||
if instance is None:
|
||||
instance = context.create_instance(layer_instance_data["subset"])
|
||||
instance = context.create_instance(layer_meta_data["subset"])
|
||||
|
||||
instance.data["layer"] = layer_item
|
||||
instance.data.update(layer_instance_data)
|
||||
instance.data.update(layer_meta_data)
|
||||
instance.data["families"] = self.families_mapping[
|
||||
layer_instance_data["family"]
|
||||
layer_meta_data["family"]
|
||||
]
|
||||
instance.data["publish"] = layer_item.visible
|
||||
instance_names.append(layer_instance_data["subset"])
|
||||
instance_names.append(layer_meta_data["subset"])
|
||||
|
||||
# Produce diagnostic message for any graphical
|
||||
# user interface interested in visualising it.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue