spakin / SimpInkScr

Simple Inkscape Scripting
https://inkscape.org/~pakin/%E2%98%85simple-inkscape-scripting
GNU General Public License v3.0
320 stars 31 forks source link

Ability to access svg_path in a simple inkscape script #68

Closed szunami closed 1 year ago

szunami commented 1 year ago

I'm working on a project and wanted the ability to export each root layer to its own file, in the same directory as the current SVG. To do this, I want access to the svg path. I was able to hack this together locally by adding this data to sis_globals. I'd be happy to contribute this patch upstream, if it's welcome!

spakin commented 1 year ago

Can you tell me more? What exactly did you add to sis_globals, and is this something that's not already available via svg_root?

szunami commented 1 year ago

https://github.com/szunami/SimpInkScr/pull/1/files

You can see the patch here. I believe that this data is not already available.

Docs on svg_path here: https://inkscape-extensions-guide.readthedocs.io/en/latest/inkex-modules.html#inkex.base.InkscapeExtension.svg_path

spakin commented 1 year ago

Sure. Go ahead and submit a pull request. That change seems pretty innocuous at first glance.