[solved] Keep path's custom informations after a boolean

Post questions on how to use or achieve an effect in Inkscape.
the_only_dude
Posts: 4
Joined: Tue Jan 29, 2008 11:12 pm

[solved] Keep path's custom informations after a boolean

Postby the_only_dude » Tue Jan 29, 2008 11:22 pm

hye,

i'm the inksmoto main developper (xmoto level editor which is an inkscape extension)

some times ago, Ted told me that:

"What I would recommend for this is add a custom X-moto namespace on the XML file.
Inkscape will honor this, and keep it in the file. So something like this:

<path d="M 1 1 M 2 2 M 3 3 z" xmoto:vertex-settings="rrg" />

Where 'r' and 'g' mean something about the vertexes of the path."


So i add some path information in my own xmoto namespace:

Code: Select all

   <path
       ns0:xmoto_label="edge:downtexture=street|edge:texture=street"
       id="rect2388"
       d="M 314.29911,415.20982 L 314.29911,98.084821 L 128.58036,98.084821 L 128.58036,415.20982 L 314.29911,415.20982 z"
       style="stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1;stroke:lime;stroke-linecap:butt;stroke-width:1px;fill:#66ddaa" />

with the namespace definition:

Code: Select all

<svg
   xmlns:ns0="http://xmoto.tuxfamily.org/"


(the name ns0 is automatically choosen by lxml)

But, when i do a boolean operation on this path, my ns0:xmoto_label disapeared in the new paths created after the boolean operation...

Code: Select all

    <path
       style="fill:#66ddaa;fill-opacity:1;stroke:#00ff00;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
       d="M 575.875 242.375 L 390.125 242.375 L 390.125 423.9375 L 575.875 423.9375 L 575.875 242.375 z "
       id="path3184" />
    <path
       style="fill:#66ddaa;fill-opacity:1;stroke:#00ff00;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
       d="M 390.125 106.8125 L 390.125 242.375 L 575.875 242.375 L 575.875 106.8125 L 390.125 106.8125 z "
       id="path3179" />


i've tried with both inkscape 0.45.1 and 0.46 svn from yesterday and the behaviour is the same...

is there a way to keep my informations after a boolean operation ??

User avatar
capnhud
Posts: 435
Joined: Mon Jun 04, 2007 8:30 pm
Location: U.S.A

Re: Keep path's custom informations after a boolean operation

Postby capnhud » Tue Jan 29, 2008 11:49 pm

What does this extension do?

the_only_dude
Posts: 4
Joined: Tue Jan 29, 2008 11:12 pm

Re: Keep path's custom informations after a boolean operation

Postby the_only_dude » Wed Jan 30, 2008 12:02 am

it's the Xmoto level editor.

look at that to see the different possibilities:
http://wiki.xmoto.tuxfamily.org/index.php?title=Inkscape-0.4.0

Xmoto is a gpl game:
http://xmoto.tuxfamily.org/

bbyak
Posts: 64
Joined: Sun Oct 07, 2007 4:53 am

Re: Keep path's custom informations after a boolean operation

Postby bbyak » Thu Jan 31, 2008 4:45 am

It's better to ask such questions on the devel mailing list, this forum is mostly for users.

You can file a bug on this. The reason is that boolops create new paths and don't know that they need to copy over all the attributes of the old paths. It should not be too difficult to fix, if you want to look into it try src/splivarot.cpp where all boolops are. Note however that if your attr refers to nodes, it will be invalid after a boolop because a boolop in general changes the number of nodes.

the_only_dude
Posts: 4
Joined: Tue Jan 29, 2008 11:12 pm

Re: Keep path's custom informations after a boolean operation

Postby the_only_dude » Thu Jan 31, 2008 9:05 am

thank you for the answer, i've posted it in the mailing list.
ted gould told me to fill a bug report too.
i'm doing it right now.

thanks again.

the_only_dude
Posts: 4
Joined: Tue Jan 29, 2008 11:12 pm

Re: Keep path's custom informations after a boolean operation

Postby the_only_dude » Thu Jan 31, 2008 9:12 am

here's the bug report: https://bugs.launchpad.net/inkscape/+bug/187449

you can close the topic.


Return to “Help with using Inkscape”