Re: [Inkscape-devel] Adding additional raster effects...
On Sat, 2008-07-26 at 08:52 -0400, heathenx wrote:
Ok. I think I have my new ImageMagick effect written by saving out a copy of a present effect, and modifying the code. Immediately I'm not sure where to add the extra menu item though. I scanned various menu*.cpp related files but I am not discovering which file is the storing the Effects/Raster menu picks. Any clues?
Actually, you don't need to add the menu item at all, if it's defined in the INX file it'll get added automatically. In the case of C plugins, the INX file is the XML that is at the bottom of the file.
Probably the reason that you're not seeing it is that your plugin isn't getting initialized. To do that you'll have to put it in the list of plugin inits. Look at:
/src/extension/init.cpp
http://inkscape.svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/src/exten...
Also, it's my understanding that in order to see if my new effect works I have to compile. Not a problem. But say I make a stupid typo like I do often...are there any shortcuts so that I don't have to recompile the whole thing again every time I want to fine tune the code?
In general, you'll only have rebuild when a major header file or the build system is changed. So if you change one of the Makefiles (probably when you added your file) it'll change. But when you change init.cpp it'll only build init.o, libextension.a and the inkscape binary.
--Ted
participants (1)
-
Ted Gould