ID Collisions?

General discussions about Inkscape.
tuomo
Posts: 18
Joined: Tue Oct 02, 2007 3:34 am

ID Collisions?

Postby tuomo » Sat Oct 13, 2007 5:46 am

Sometimes when I import one SVG document into another, the imported image looks like Bad Computer Things have happened to it. I have to wonder whether there's an ID collision between the import and the existing document. Does Inkscape check for this automatically, or is just one of those things that needs to be watched for and fixed in a text editor if necessary?

Tom

Simarilius
Posts: 626
Joined: Wed Jun 06, 2007 2:37 am

Re: ID Collisions?

Postby Simarilius » Sat Oct 13, 2007 5:50 am

you can get issues if theres 2 gradients in the 2 files that both have the same name. the imported file will refernce the existing gradient and it will screw stuff up. tis a very old known bug that theres been discussion on how to fix properly just htis week on the dev list.

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

Re: ID Collisions?

Postby capnhud » Sun Jan 06, 2008 7:26 am

How exactly are you supposed to rename a gradient to avoid this problem?

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: ID Collisions?

Postby microUgly » Sun Jan 06, 2008 8:08 am

capnhud wrote:How exactly are you supposed to rename a gradient to avoid this problem?

I think the XML editor is the only way. I believe the ID's Inkscape generate are always the same so you could change them to something a little more random and never have to worry about conflicts if you are frequently re-using gradients.

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

Re: ID Collisions?

Postby capnhud » Sun Jan 06, 2008 10:49 pm

Must I use a number or can i use a word because I am not sure of the correct syntax to use on a gradient. When I relabel the id and then open the file the gradient is gone. I know this possible, but I am assuming that I am using some type of combination wrong.

Edit: Nvermind you just have to make sure you find all instances of the id in question and the id it may be linking to. Sure wish there was an easier way.

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: ID Collisions?

Postby microUgly » Tue Jan 15, 2008 9:06 am

capnhud wrote:Edit: Nvermind you just have to make sure you find all instances of the id in question and the id it may be linking to. Sure wish there was an easier way.

If you rename a gradient without renaming all instances, you should be able to reapply the gradient to the object by selecting it from the list of pre-defined gradients, I think.

User avatar
aho
Posts: 180
Joined: Sun Nov 04, 2007 9:51 am
Contact:

Re: ID Collisions?

Postby aho » Tue Jan 15, 2008 9:11 am

Gradients can be "fixed" easily. Effects->Color->Custom...

R function:r
G function:g
B function:b

This means no change whatsoever. The ids get changed due to side-effects tho.


Return to “General Discussions”