On Tue, 26 Mar 2019 13:38:58 -0500
Frank Martínez <mnesarco@...155...> wrote:
Hi Andrew,
I am afraid it is not possible to select objects inside inkscape from
external python extensions without using dbus or something like that.
Please don't use dbus. Architecturally it's a mess, and from time to
time I see real world practical problems caused by that architecture.
Plus, when tracking a problem, I like to easily discern who gave wrong
info to whom, rather than tracing every message through a single
switchtrack (fan in, fan out).
My scripting extension knows nothing about inkscape itself, only
have
access to the svg document.
Nice: Uber modularity. Everyone should do this.
It is possible to add some metadata with
ids of selected objects to be used later for other extensions, but
Inkscape will ignore them.
If it's *that* important (which I don't think it is), then Inkscape
could be changed slightly to read your special metadata.
If I am wrong about this, please show me the light ;)
An earlier poster asked "Have you found a way of selecting an
object after your script runs?" That's ambiguous. Select a random
object(s)? Select the object(s) your script changed? Re-select the
objects that were selected when Inkscape closed? Enable someone running
Inkscape after your script ran to select something? Those are very
different questions with very different answers.
If the request is to highlight the objects your script changed, for the
purpose of letting the human Inkscape operator check and modify, I
think it would suffice for your script to create a run log that
identifies changes made.
SteveT