From 987cff1ac4da12712c1cbac856b6fb615d4a189d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aur=C3=A9lio=20A=2E=20Heckert=20=28a=29?= Date: Fri, 5 Mar 2010 20:37:41 -0300 Subject: [PATCH] Added getParentNode() to Effect class in inkex.py --- share/extensions/inkex.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/share/extensions/inkex.py b/share/extensions/inkex.py index 1a70c25d6..49de51ef3 100755 --- a/share/extensions/inkex.py +++ b/share/extensions/inkex.py @@ -175,6 +175,13 @@ class Effect: else: return None + def getParentNode(self, node): + for parent in self.document.getiterator(): + if node in parent.getchildren(): + return parent + break + + def getdocids(self): docIdNodes = self.document.xpath('//@id', namespaces=NSS) for m in docIdNodes: -- 2.30.2