inkex.py: build dict with selected nodes per sub-path per path

Bug #1545095 reported by su_v
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Wishlist
Unassigned

Bug Description

Follow-up report to:
Bug #171640: Pass list of selected nodes to script when in "Node edition"
https://bugs.launchpad.net/inkscape/+bug/171640

Add new method to Effect() in inkex.py to parse the new command line arguments passed from inkscape listing each selected node and build a dictionary of selected nodes per sub-path per path for ease of use in extensions (similar to getselected() and the dict self.selected).

Proposed diff attached (please do not commit without code review - feedback would be an appreciated bonus).

TODO:
- verify order of selected nodes per sub-path as passed from inkscape
  (IIRC currently, the order is not related to selection)
- if nodes are passed in selection order, either use lists for sub-paths,
  or track selection order separately (dicts in python are not ordered).

Revision history for this message
su_v (suv-lp) wrote : Re: [Bug 1545095] [NEW] inkex.py: build dict with selected nodes per sub-path per path

Debug extension to test the new feature attached.

Revision history for this message
jazzynico (jazzynico) wrote :

Patch tested successfully on Windows XP, Inkscape trunk rev. 14648.

We have only a few extensions that could use that new feature, and I didn't find a easy way to convert them for now. But I'm sure it's going to be very useful for new extensions.

Changed in inkscape:
assignee: nobody → ~suv (suv-lp)
status: New → In Progress
su_v (suv-lp)
Changed in inkscape:
assignee: su_v (suv-lp) → nobody
status: In Progress → Confirmed
Revision history for this message
jazzynico (jazzynico) wrote :

Assigning to myself to be sure not to forget the report...

Changed in inkscape:
assignee: nobody → jazzynico (jazzynico)
status: Confirmed → Triaged
jazzynico (jazzynico)
Changed in inkscape:
status: Triaged → In Progress
jazzynico (jazzynico)
Changed in inkscape:
milestone: 0.92 → 0.93
su_v (suv-lp)
description: updated
su_v (suv-lp)
description: updated
Revision history for this message
su_v (suv-lp) wrote :

Deleting the attached diffs and sample extension - I am revoking my pending patches provided in this bug tracker for issues with python-based extensions distributed with Inkscape.

Changed in inkscape:
assignee: jazzynico (jazzynico) → nobody
status: In Progress → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.