seamless_pattern.py revision f7f58eba3f5a23b98457071a209452171478b5bc
# Written by Jabiertxof
# V.04
import inkex
import re
import os
self.OptionParser.add_option("-w", "--width", action="store", type="int", dest="desktop_width", default="100", help="Custom width")
self.OptionParser.add_option("-z", "--height", action="store", type="int", dest="desktop_height", default="100", help="Custom height")
xpathStr = '//svg:rect[@id="clipPathRect"]'
if clipPathRect != []:
xpathStr = '//svg:g[@id="designTop"] | //svg:g[@id="designBottom"]'
if designZone != []:
xpathStr = '//svg:use[@id="top1"] | //svg:use[@id="bottom1"]'
if pattern1 != []:
xpathStr = '//svg:use[@id="top2"] | //svg:use[@id="bottom2"]'
if pattern2 != []:
xpathStr = '//svg:use[@id="top3"] | //svg:use[@id="bottom3"]'
if pattern3 != []:
xpathStr = '//svg:use[@id="top4"] | //svg:use[@id="bottom4"]'
if pattern4 != []:
xpathStr = '//svg:use[@id="top5"] | //svg:use[@id="bottom5"]'
if pattern5 != []:
xpathStr = '//svg:use[@id="top6"] | //svg:use[@id="bottom6"]'
if pattern6 != []:
xpathStr = '//svg:use[@id="top7"] | //svg:use[@id="bottom7"]'
if pattern7 != []:
xpathStr = '//svg:use[@id="top8"] | //svg:use[@id="bottom8"]'
if pattern8 != []:
xpathStr = '//svg:use[@id="top9"] | //svg:use[@id="bottom9"]'
if pattern9 != []:
xpathStr = '//svg:use[@id="clonePreview1"]'
if clonePreview1 != []:
xpathStr = '//svg:use[@id="clonePreview2"]'
if clonePreview2 != []:
xpathStr = '//svg:use[@id="clonePreview3"]'
if clonePreview3 != []:
xpathStr = '//svg:use[@id="clonePreview4"]'
if clonePreview4 != []:
xpathStr = '//svg:use[@id="clonePreview5"]'
if clonePreview5 != []:
xpathStr = '//svg:use[@id="clonePreview6"]'
if clonePreview6 != []:
xpathStr = '//svg:use[@id="clonePreview7"]'
if clonePreview7 != []:
xpathStr = '//svg:use[@id="clonePreview8"]'
if clonePreview8 != []:
xpathStr = '//svg:use[@id="fullPatternClone"]'
if patternGenerator != []:
if namedview is None:
c = C()
c.affect()