Results 1 to 5 of 5

Thread: New Inkscape Extension - restack z-order

  1. #1
      RobA is offline
    Administrator RobA's Avatar
    Join Date
    Apr 2007
    Location
    Niagara, Canada
    Posts
    5,530

    Info New Inkscape Extension - restack z-order

    I'm not sure whether to post this as a tutorial or reference, but I think is the most fitting forum.

    Someone here posted that CC provides a way to "restack" the z-order of drawn objects, so you could (for example) draw a forest then plunk a tower in the middle, and have it set the tower in among the trees automatically based on the base point of the symbols. Well, I couldn't find a way to do this in Inkscape, but did discover that you can write extensions for Inkscape in python (which I had never used).

    I posted to the friendly inkscape-users mailing list, and thanks to Kurt I was able to cobble together an extension. It is really slow but it does work. It provides an option of restacking the selected objects in a direction (left to right, right to left, top to bottom, or bottom to top) as well as the point of each object to compare (top left, bottom middle, etc).

    Install it by putting the two files from the zip into the Inkscape extension folder and restarting Inkscape. It registers as "Effects->Modify Path->Restack"

    I am running on Inkscape 0.46dev+devel, built Apr 28 2007, so ymmv if
    running .45 (I think it uses some features that only came in with .46)

    Here is a before sample:
    New Inkscape Extension - restack z-order-restack_before.png
    and the after:
    New Inkscape Extension - restack z-order-restack_after.png

    EDIT: See the last post for the latest version

    -Rob A>

  2. #2
      Arcana is offline
    Administrator Facebook Connected Arcana's Avatar
    Join Date
    Mar 2006
    Location
    Fairborn, OH
    Posts
    2,772
    Blog Entries
    5

    Post

    Thats extremely useful! Nice! Have some rep!
    Robbie Powell - Site Admin

  3. #3

  4. #4
      RPMiller is offline
    Community Leader RPMiller's Avatar
    Join Date
    Apr 2006
    Location
    Watching you from in here
    Posts
    3,207

    Default

    Very nice and very useful. I wonder if such a thing could be produced for PhotoShop as well?
    Bill Stickers is innocent! It isn't Bill's fault that he was hanging out in the wrong place.

    Please make an effort to tag all threads. This will greatly enhance the usability of the forums.



  5. #5
      RobA is offline
    Administrator RobA's Avatar
    Join Date
    Apr 2007
    Location
    Niagara, Canada
    Posts
    5,530

    Default

    While this is major thread necromancy, I wanted to post up a patched version I've submitted to the inkscape bug tracker.

    This one keeps objects in the original layer (oops). If they span layers all the objects will end up in the layer of the first selected object.

    It also fixes a bug where the extension would hang for large filesizes.

    -Rob A>
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •