Lines Matching defs:inkex
26 # We will use the inkex module with the predefined Effect base class.
27 import inkex
29 inkex.localize()
31 class JessyInk_Transitions(inkex.Effect):
34 inkex.Effect.__init__(self)
43 inkex.NSS[u"jessyink"] = u"https://launchpad.net/jessyink"
47 scriptNodes = self.document.xpath("//svg:script[@jessyink:version='1.5.5']", namespaces=inkex.NSS)
50 inkex.errormsg(_("The JessyInk script is not installed in this SVG file or has a different version than the JessyInk extensions. Please select \"install/update...\" from the \"JessyInk\" sub-menu of the \"Extensions\" menu to install or update the JessyInk script.\n\n"))
53 nodes = self.document.xpath(unicode("//*[@inkscape:groupmode='layer' and @inkscape:label='" + self.options.layerName + "']", 'utf-8'), namespaces=inkex.NSS)
55 inkex.errormsg(_("Layer not found.\n"))
57 inkex.errormsg(_("More than one layer with this name found.\n"))
60 if nodes[0].get("{" + inkex.NSS["jessyink"] + "}transitionIn"):
61 del nodes[0].attrib["{" + inkex.NSS["jessyink"] + "}transitionIn"]
63 nodes[0].set("{" + inkex.NSS["jessyink"] + "}transitionIn","name:" + self.options.effectIn + ";length:" + str(int(self.options.effectInDuration * 1000)))
65 if nodes[0].get("{" + inkex.NSS["jessyink"] + "}transitionOut"):
66 del nodes[0].attrib["{" + inkex.NSS["jessyink"] + "}transitionOut"]
68 nodes[0].set("{" + inkex.NSS["jessyink"] + "}transitionOut","name:" + self.options.effectOut + ";length:" + str(int(self.options.effectOutDuration * 1000)))
70 inkex.errormsg(_("Please enter a layer name.\n"))