#!/usr/bin/env python """ style.py Example of accessing and altering a style attribute of an element """ import inkex def alterStyle(params): for id,node in params['selected'].iteritems(): style = node.attributes.getNamedItem('style') s = inkex.parseStyle(style.value) s['fill-opacity']='0.5' style.value = inkex.formatStyle(s) inkex.affect(alterStyle)