From: Aurélio A. Heckert (a) Date: Fri, 5 Mar 2010 23:37:41 +0000 (-0300) Subject: Added getParentNode() to Effect class in inkex.py X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=987cff1ac4da12712c1cbac856b6fb615d4a189d;p=inkscape.git Added getParentNode() to Effect class in inkex.py --- 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: