diff --git a/simpinkscr/simple_inkscape_scripting.py b/simpinkscr/simple_inkscape_scripting.py index f1b68ef..2791d46 100644 --- a/simpinkscr/simple_inkscape_scripting.py +++ b/simpinkscr/simple_inkscape_scripting.py @@ -3634,12 +3634,14 @@ def to_list(e): class SimpleInkscapeScripting(inkex.EffectExtension): 'Help the user create Inkscape objects with a simple API.' - def __init__(self): + def __init__(self, obj=None): super().__init__() self.options.user_args = [] self.options.encoding = '' self.options.py_source = None self.options.program = None + if obj is not None: + self.svg = obj.svg def filename_arg(self, name): """Existing file to read or option used in script arguments"""