summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 67f6f38)
raw | patch | inline | side by side (parent: 67f6f38)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Fri, 17 Nov 2006 08:10:27 +0000 (08:10 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Fri, 17 Nov 2006 08:10:27 +0000 (08:10 +0000) |
share/extensions/coloreffect.py | patch | blob | history |
index 2144955023a1c13bd727ba1cbf89df0cfff8ab29..c1ed150659f5345a97c4c8782b4e317474fb27f0 100644 (file)
class ColorEffect(inkex.Effect):\r
def __init__(self):\r
inkex.Effect.__init__(self,use_minidom=True)\r
+ self.visited = []\r
\r
def effect(self):\r
if len(self.selected)==0:\r
return col\r
\r
def process_gradient(self, node):\r
+ if node.hasAttributes(): \r
+ this_id=node.getAttribute('id')\r
+ if this_id in self.visited:\r
+ # prevent multiple processing of the same gradient if it is used by more than one selected object\r
+ #inkex.debug("already had: " + this_id)\r
+ return\r
+ self.visited.append(this_id)\r
+ #inkex.debug("visited: " + str(self.visited))\r
self.changeStyle(node)\r
if node.hasChildNodes():\r
for child in node.childNodes:\r