From 338bb1560a33582364f3a45724cf2ff19f89a2da Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Tue, 26 Apr 2022 09:43:16 +0200 Subject: [PATCH] Fix bug in `iter_parents` Previously an empty string could be yielded for e.g. `"|cube"` splitting to `["", "cube"]` --- openpype/hosts/maya/api/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 82de105d16..901b8c4a4c 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -1876,7 +1876,7 @@ def iter_parents(node): """ while True: split = node.rsplit("|", 1) - if len(split) == 1: + if len(split) == 1 or not split[0]: return node = split[0]