However this has no effect on ( does not change ) the gui selected objects when the extension returns.
The is a list stored by the gui when the extension is launched and it cannot be edited by the extension system.
Apart from using not very useful id swapping hacks, which break the svg, then only option is to use dbus
Using dbus is more complicated in regards to selections. If an error msg or a msg of any kind is returned by the extension to the gui, the msg window breaks the selection passback.
Giving a scenario, there are 2 objects inside Inkscape. I call out an extension to change its attribute. Is it possible not closing the extension tab, change from one selected object to another by clicking the object on inkscape?
Hey guys, I want to ask is there a way to change the selected object while executing the extension?
Depends what you mean.
If you simply want to change the selection list that the extension for processing, then yes.
For example if you have code that uses
self.svg.selected
and you just want to reuse that code for a new selection list.https://inkscape.gitlab.io/extensions/documentation/source/inkex.elements._selected.html
However this has no effect on ( does not change ) the gui selected objects when the extension returns.
The is a list stored by the gui when the extension is launched and it cannot be edited by the extension system.
Apart from using not very useful id swapping hacks, which break the svg, then only option is to use
dbus
Using dbus is more complicated in regards to selections. If an error msg or a msg of any kind is returned by the extension to the gui, the msg window breaks the selection passback.
So yes it can be done, but it's a lot of work.
Giving a scenario, there are 2 objects inside Inkscape. I call out an extension to change its attribute. Is it possible not closing the extension tab, change from one selected object to another by clicking the object on inkscape?
The tab is just the gui generated from the .inx file.
Provided 'live preview' is not checked, you can click on and select whatever you want.
What you cannot do, is change selection by clicking on the gui whilst the extension loop is running, or return a new selection to the gui