From 56035a1dbbf7a91953ed85e685e188c2fc068b85 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Wed, 12 Jan 2022 14:43:05 +0100 Subject: [PATCH] Allow space in filenames when converting with `maketx` --- openpype/hosts/maya/plugins/publish/extract_look.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_look.py b/openpype/hosts/maya/plugins/publish/extract_look.py index 953539f65c..a101a627cf 100644 --- a/openpype/hosts/maya/plugins/publish/extract_look.py +++ b/openpype/hosts/maya/plugins/publish/extract_look.py @@ -75,8 +75,12 @@ def maketx(source, destination, *args): "--filter lanczos3", ] + def _escape(path): + # Ensure path is enclosed by quotes to allow paths with spaces + return '"{}"'.format(path) + cmd.extend(args) - cmd.extend(["-o", destination, source]) + cmd.extend(["-o", _escape(destination), _escape(source)]) cmd = " ".join(cmd)