Repository: ynput/OpenPype
Issue: General: Collect Resources Path

 Collect Resources Path in Assembly instance is failing with the error:

```
Instance: 
assemblyMain
Message: 
Anatomy template "{root[work]}/{project[name]}/{hierarchy}/{asset}/publish/{family}/{subset}/v{version:0>3}" is unsolved. Keys with invalid DataType: `"hierarchy" <class 'list'>`.
Line: 
369
Traceback: 
Traceback (most recent call last):
  File "D:\\REPO\\OpenPype\\.venv\\lib\\site-packages\\pyblish\\plugin.py", line 522, in __explicit_process
    runner(*args)
  File "D:\\REPO\\OpenPype\\openpype\\plugins\\publish\\collect_resources_path.py", line 82, in process
  File "D:\\REPO\\OpenPype\\openpype\\lib\\path_templates.py", line 462, in __getitem__
    value.validate()
  File "D:\\REPO\\OpenPype\\openpype\\pipeline\\anatomy.py", line 369, in validate
    self.invalid_types
openpype.pipeline.anatomy.AnatomyTemplateUnsolved: Anatomy template "{root[work]}/{project[name]}/{hierarchy}/{asset}/publish/{family}/{subset}/v{version:0>3}" is unsolved. Keys with invalid DataType: `"hierarchy" <class 'list'>`.
```



[cuID:OP-3935]

Changed files:
openpype/hosts/maya/plugins/publish/validate_assembly_transforms.py, openpype/hosts/maya/plugins/publish/extract_assembly.py, openpype/hosts/maya/plugins/publish/collect_assembly.py

diff --git a/openpype/hosts/maya/plugins/publish/collect_assembly.py b/openpype/hosts/maya/plugins/publish/collect_assembly.py
index 1a65bf1fde..2aef9ab908 100644
--- a/openpype/hosts/maya/plugins/publish/collect_assembly.py
+++ b/openpype/hosts/maya/plugins/publish/collect_assembly.py
@@ -70,7 +70,7 @@ class CollectAssembly(pyblish.api.InstancePlugin):
             data[representation_id].append(instance_data)
 
         instance.data["scenedata"] = dict(data)
-        instance.data["hierarchy"] = list(set(hierarchy_nodes))
+        instance.data["nodesHierarchy"] = list(set(hierarchy_nodes))
 
     def get_file_rule(self, rule):
         return mel.eval('workspace -query -fileRuleEntry "{}"'.format(rule))
diff --git a/openpype/hosts/maya/plugins/publish/extract_assembly.py b/openpype/hosts/maya/plugins/publish/extract_assembly.py
index 482930b76e..120805894e 100644
--- a/openpype/hosts/maya/plugins/publish/extract_assembly.py
+++ b/openpype/hosts/maya/plugins/publish/extract_assembly.py
@@ -33,7 +33,7 @@ class ExtractAssembly(openpype.api.Extractor):
             json.dump(instance.data["scenedata"], filepath, ensure_ascii=False)
 
         self.log.info("Extracting point cache ..")
-        cmds.select(instance.data["hierarchy"])
+        cmds.select(instance.data["nodesHierarchy"])
 
         # Run basic alembic exporter
         extract_alembic(file=hierarchy_path,
diff --git a/openpype/hosts/maya/plugins/publish/validate_assembly_transforms.py b/openpype/hosts/maya/plugins/publish/validate_assembly_transforms.py
index f793846555..fb25b617be 100644
--- a/openpype/hosts/maya/plugins/publish/validate_assembly_transforms.py
+++ b/openpype/hosts/maya/plugins/publish/validate_assembly_transforms.py
@@ -48,7 +48,7 @@ class ValidateAssemblyModelTransforms(pyblish.api.InstancePlugin):
         from openpype.hosts.maya.api import lib
 
         # Get all transforms in the loaded containers
-        container_roots = cmds.listRelatives(instance.data["hierarchy"],
+        container_roots = cmds.listRelatives(instance.data["nodesHierarchy"],
                                              children=True,
                                              type="transform",
                                              fullPath=True)