27.02.2017 21:50, Maren Hachmann пишет:
Hi Dmitry,
thank you :)
So, it seems this is available in Inkscape trunk, currently, and the compile flag for xverbs is on by default.
Would you like to add your documentation into the Wiki? That way, we could link to it more easily from the release notes.
It would be greate!
The python option you're hinting at, would that mean allowing python extensions access to filling in arbitrary dialog parameters, which would allow to automate just about anything in Inkscape, as long as you're able to look up the parameter name in the code? Would that be possible at all, without rewriting every single dialog?
Python can be embedded in a different ways. For example it is already using to write filter extensions in the Inkscape. And another way of embedding is useful for me.
"verbs" is created to build menu system for Inkscape thats why they don't have arguments. Inkscape on startup create table of verbs Verb::_base_verbs[]. This verbs is binded to different *Verb::perform fragments of low level Inkscape code.
Dialogs in the Inkscape usually is created to run some low level code in the onOk() handlers. e.g. dialog SaveAs do Inkscape::Extension::save().
xverbs feature is reads .yaml on start and then using verbs table calls binded low level fragments. Also I add several new fragments which is use parameters from .yaml instead of dialogs.
verbs cant be used to filling arbitrary dialog parameters, but it is possible to add new xverbs low level fragments which can use args from .yaml data. This fragments also can create dialogs with filled arbitrary parameters. But every such fragment should use gtk to do it.
It would be nice if Inkscape can run python scripts, which can call binded to verbs fragments and also fragments with arguments which can do Inkscape::Extension::save() or sp_export_png_file().
P.S. sorry for my bad English, Im not a native.
Best Regards, Dmitry Zhulanov
Regards, Maren
Am 25.02.2017 um 22:11 schrieb Dmitry Zhulanov:
Hi, Maren
I put short manual to main-linexact.cpp file, but the command line option was changed to --xverbs=
- Format of xverbs.yaml
- using: $ inkscape --xverbs=xverbs.yaml
- verbose: yes # only "verbose: yes" enable logging
- run:
- # open document to process
- xverb-id: XFileOpen, gfx_sources/loading_screen/sandclock_atlas.svg
- xverb-id: XUndoLabel, fresh_document # set label for UndoToLabel
xverb works
- # note: if something wrong with undo labels use verb EditUndo
instead of XUndoLabel and UndoToLabel at all
- # select element to handle
- xverb-id: XSelectElement, top_sand
- # verbs
- verb-id: EditInvertInAllLayers
- verb-id: EditDelete
- verb-id: FitCanvasToDrawing
- # save element to separated svg document
- xverb-id: XFileSaveAs,
output/thegame/linux/data/gfx/loading_screen/top_sand.svg
- # also save png preview
- xverb-id: XFileExportPNG,
output/thegame/linux/data/gfx_preview/loading_screen/top_sand.png
- # return to the fresh_state of document
- xverb-id: UndoToLabel, fresh_document
- # do any other handling
- # inkscape have a lot of useful verbs
- verb-id: FileQuit
Best regards, Dmitry Zhulanov
27.01.2017 01:01, Maren Hachmann пишет:
Am 26.01.2017 um 18:35 schrieb alvinpenner:
thanks for the fast response! I'll check out both of these options. I try to sort of keep up with what is happening, but both of these slipped by me unnoticed.
- If you find out how the XVerbs work (maybe it's really simple?), can
you post a step-by-step? It would be good to have some documentation for it for users.
Regards, Maren
Alvin
-- View this message in context: http://inkscape.13.x6.nabble.com/Is-it-possible-to-specify-the-filetype-or-f... Sent from the Inkscape - Dev mailing list archive at Nabble.com.
Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel