Inkscape.org
Creating New Extensions Adjusting render_order within a script
  1. #1
    DrQt DrQt @DrQt

    Is it possible to adjust the object render order (z-order stacking) withing a script?

    I found one function but it doesn't look like it's used in the code it's featured in. 
     

    def zSort(inNode,idList):
        sortedList=[]
        theid = inNode.get("id")
        if theid in idList:
            sortedList.append(theid)
        for child in inNode:
            if len(sortedList)==len(idList):
                break
            sortedList+=zSort(child,idList)
        return sortedList

    https://github.com/Orion7/Inkscape/blob/b6130d280cd98cfa85a1570381609907f204a5cd/extensions/pathmodifier.py

  2. #2
    inklinea inklinea @inklinea⛰️

    There is an extension included in Inkscape which does this:

    Extensions>Arrange>Restack

  3. #3
    inklinea inklinea @inklinea⛰️

    There is an extension included in Inkscape which does this:

    Extensions>Arrange>Restack

Inkscape Inkscape.org Inkscape Forum Creating New Extensions Adjusting render_order within a script