
On 2007-September-27 , at 14:02 , Aaron Spike wrote:
jiho wrote:
Maybe this is where the problems comes from: in the temporary, unsaved, document, the docbase is the default location and not the docbase of the actual document.
More likely that it doesn't check docbase at all, but I would have to check to be sure.
I'll be happy to bug-report the second issue if needed but maybe that's just a quick fix. Who did the Embed Images extension?
I wrote the original script but it has since been modified and inproved by at least one other person. It seems that if we are to fix the problem we need to duplicate the logic that lives inside of Inkscape in this script. You could file a bug for that.
It would be a shame to have to recode in Python something that is already done in Inkscape core, wouldn't it. An other approach would be: - inkscape checks wether xlink works: looks for the absolute path as docbase+xlink, filepath+xlink, xlink as absolute path (code quote by bulia in previous email) - xlink works? yes -> write the the absolute path found this way to absref (this is the new part: currently the path is only written when the image is imported initially, as far as i can see) no -> fallback on existing absref (and warn?) and then embed bitmap would only use absref to find the bitmaps. This way the extension benefits from the hard work done by the core, which is how they were designed to function I think. Embed bitmaps would only work if sodipodi:absref exists but since both are internal to inkscape, I don't think this is a problem. What do you think?
JiHO --- http://jo.irisson.free.fr/