From 95655d005693f37cd0590803751c54c830f557a0 Mon Sep 17 00:00:00 2001 From: Ondrej Samohel Date: Mon, 4 Nov 2019 16:04:54 +0100 Subject: [PATCH] added texture extraction to yeti rig extractor --- pype/plugins/maya/publish/extract_yeti_rig.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pype/plugins/maya/publish/extract_yeti_rig.py b/pype/plugins/maya/publish/extract_yeti_rig.py index b575c07cf4..892bc0bea6 100644 --- a/pype/plugins/maya/publish/extract_yeti_rig.py +++ b/pype/plugins/maya/publish/extract_yeti_rig.py @@ -126,6 +126,18 @@ class ExtractYetiRig(pype.api.Extractor): with open(settings_path, "w") as fp: json.dump(settings, fp, ensure_ascii=False) + # add textures to transfers + if 'transfers' not in instance.data: + instance.data['transfers'] = [] + + for resource in instance.data.get('resources', []): + for file in resource['files']: + src = file + dst = os.path.join(image_search_path, os.path.basename(file)) + instance.data['transfers'].append([src, dst]) + + self.log.info("adding transfer {} -> {}". format(src, dst)) + # Ensure the imageSearchPath is being remapped to the publish folder attr_value = {"%s.imageSearchPath" % n: str(image_search_path) for n in yeti_nodes}