Inkscape.org
Beyond the Basics Disable transformation/'simplifying' weirdness
  1. #1
    N247S N247S @N247S

    Goodday all,

    I noticed that Inkscape loves to transform every single element if possible. This is mainly true for imports, but also when playing around with the non-xml editor stuff.
    As I am comming from a programming background, I like to mess around with the xml attributes themselves quit a bit (including paths).
    Unfortunatlly this is impossible if inkscape includes all kinds of transformation attributes on the elements.

    Secondly the path's 'd' variable also gets updated on submitting (mostly to non-global/relative paths) which visually does the same, but is hard to work with if you are thinking in/working on an absolute coordinate path.
    The alternative I use now is to have an text-editor open as well, and edit>copy>paste the 'd' text, which aint working well if you are 'tweaking' the coordinates.

    So the question is: Is there a way to turn off both the 'transformation weirdness' and the 'path de-globalising' as described above?

    Thanks for your time!

    Regards N247S

     

  2. #2
    brynn brynn @brynn
    *

    Welcome to the forum!

    I didn't answer this the other day, because I don't really know the answer.  I think there might be an extension that will remove all the transforms.  But I'm not sure.  But at least until someone else answers, you could try searching for such an extension.

    I don't suppose using a text editor would work, to remove transform attributes?

    Edit

    There IS an extension that does something to transforms.  As far as I can understand, it removes them transform matrix and applies to individual objects.  It doesn't sound like what you need.  But again, it's over my head.  https://github.com/Klowner/inkscape-applytransforms

  3. #3
    N247S N247S @N247S

    Sorry for the late response,

     

    Thanks for the input, unfortunately it doesnt solve the transformation problem (as you suspected). Hopefully there will be a way to solve these problems in the near future

  4. #4
    inklinea inklinea @inklinea⛰️

    There is a javascript script called flatten.js, (https://gist.github.com/timo22345/9413158) it is capable of removing nested transforms, however it does seems to have an effect on some of the stroke widths and changes the node type of some of the shapes. If you are happy to look at the SVG and verify visually that it looks okay then its not a problem. 

    If you are interested I will see if I can put up a simple page somewhere that demonstrates it.

  5. #5
    Pacer Pacer @pacer🏁

    @inklinea I would be interested!

    I use Inkscape as part of my SVG animation workflow and transforms make it tricky to read. If you don''t mind doing that, I would appreciate it.

     

    @N247S If that doesn't work, but I can somehow come up with a solution, I will post on here to let others know.

  6. #6
    inklinea inklinea @inklinea⛰️

    I put this together.

    https://www.raincloud.co.uk/svg/flatten/flatten.html

    In Firefox / Chrome F12 brings up the developer console, you can see the code changing when the 'flatten' button is pressed.

    I don't use Internet Explorer or Edge - so can't comment on them.

    Please note I have nothing to do with the original flatten github project.

  7. #7
    inklinea inklinea @inklinea⛰️

    Standalone single html file uploaded here :

    https://inkscape.org/~bipper/%E2%98%85flatten

Inkscape Inkscape.org Inkscape Forum Beyond the Basics Disable transformation/'simplifying' weirdness