Hello I am a newbie to Inkscape and scripting in general. I am trying to build an animation extension with Inkscape for doing simple animations as a project in my multimedia course. For that I need to add a timeline in Inkscape and write the timing data for a particular object manipulated by the user into my animation file. Is this possible with Inkscape extensions? Could anyone guide me in finding a resource who could help me with this?
Regards Sanat
Sanat Ganu wrote the following on 12/30/2009 2:28 AM:
Hello I am a newbie to Inkscape and scripting in general. I am trying to build an animation extension with Inkscape for doing simple animations as a project in my multimedia course. For that I need to add a timeline in Inkscape and write the timing data for a particular object manipulated by the user into my animation file. Is this possible with Inkscape extensions? Could anyone guide me in finding a resource who could help me with this?
Regards Sanat
I haven't a clue about the programming side of things but I have seen several extensions in the past for handling animation and it seems if they all take use of layers and/or object ID's. Perhaps they will help you in your research.
http://mccormick.cx/news/entries/inkscape-animation
http://sourceforge.net/projects/animeasy
heathenx
On Dec 29, 2009, at 11:28 PM, Sanat Ganu wrote:
Hello I am a newbie to Inkscape and scripting in general. I am trying to build an animation extension with Inkscape for doing simple animations as a project in my multimedia course. For that I need to add a timeline in Inkscape and write the timing data for a particular object manipulated by the user into my animation file. Is this possible with Inkscape extensions? Could anyone guide me in finding a resource who could help me with this?
Well... the first thing it look at is probably the anmation elements in SVG for actually storing things. http://www.w3.org/TR/SVG11/animate.html
With the current mechanism Inkscape invokes an extension script and feeds it the current SVG on stdin. Then it reads a replacing result from the extension's stdout.
Actually adding new code into Inkscape itself is probably the easier way to get an interactive UI, including playback preview, going. That, however, takes C++.
If you want to use Inkscape as an "IDE" to develop graphics that can be animated by Python then have a look at my "Things!" project. http://otherwise.relics.co.za/wiki/Software/Things/
(It uses GTK and Cairo and libRSVG)
Features
1. Keyframe and tweening by using simple strings. 2. Containment — place things within other things to get complex animations. 3. Path following — this works, but the code needs some love. Please help me. 4. Clipping — You can clip things into any path. 5. Hit detection — A basic “is the mouse on me” test. There is also a button Thing based on this. 6. Manage your artwork and fonts — Use the Bag Of Stuff to contain all your raw materials. 7. Quick shapes and other functions — Use the Box Of Tricks to do all kinds of things. 8. It all works from Python via a simple API. 9. Export each frame to alpha PNG files or SVG files! This will let you make: 1. Quick AJAX throbbers. 2. Animated gifs. 3. import frames into other software (Blender for example.)
\d
@heathenx Thanks buddy... They don't render SVG animations though, but would be a good starting point anyway
@Don Thanks a lot Don. You are right....I want to use Inkscape to develop graphix and python and GTK to render a GUI for timeline etc. The inputs from these two will be used directly to write an SVG file with animations using SMIL. Does Things! do the same? Anyway....I'll check out....thanks again...
@Jon You are right....C++ is the real problem and also finding the right part of the Inkscape code to add UI elements. Do you think it is straightforward? Does the Extension mechanism not allow the extension to draw a timeline for example and allow the user to manipulate it?
Regards Sanat.
On Wed, Dec 30, 2009 at 11:57 PM, Donn <donn.ingle@...155...> wrote:
If you want to use Inkscape as an "IDE" to develop graphics that can be animated by Python then have a look at my "Things!" project. http://otherwise.relics.co.za/wiki/Software/Things/
(It uses GTK and Cairo and libRSVG)
Features
- Keyframe and tweening by using simple strings.
- Containment — place things within other things to get complex
animations. 3. Path following — this works, but the code needs some love. Please help me. 4. Clipping — You can clip things into any path. 5. Hit detection — A basic “is the mouse on me” test. There is also a button Thing based on this. 6. Manage your artwork and fonts — Use the Bag Of Stuff to contain all your raw materials. 7. Quick shapes and other functions — Use the Box Of Tricks to do all kinds of things. 8. It all works from Python via a simple API. 9. Export each frame to alpha PNG files or SVG files! This will let you make: 1. Quick AJAX throbbers. 2. Animated gifs. 3. import frames into other software (Blender for example.)
\d
//ave: donn.ingle@...2691... home: http://otherwise.relics.co.za/ 2D http://otherwise.relics.co.za/%0A2D vector animation : https://savannah.nongnu.org/projects/things/ Font manager : https://savannah.nongnu.org/projects/fontypython/
This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
On Thursday 31 December 2009 09:50:28 Sanat Ganu wrote:
Thanks a lot Don. You are right....I want to use Inkscape to develop graphix and python and GTK to render a GUI for timeline etc. The inputs from these two will be used directly to write an SVG file with animations using SMIL. Does Things! do the same? Anyway....I'll check out....thanks again...
Things! is a Python API for animating SVG based on timelines. It is *not* a GUI. I want to write a GUI for it, but that's a huge task that I am only poking with a stick now and then. Things! let's you express the keyframes in a simple string language -- go see the website.
@Jon You are right....C++ is the real problem and also finding the right part of the Inkscape code to add UI elements. Do you think it is straightforward? Does the Extension mechanism not allow the extension to draw a timeline for example and allow the user to manipulate it?
I *wish* Inkscape could allow Python to hook-into the UI so that we could write our own tools (like those along the left) and control things like node handles and events and keyboard shortcuts etc. AFAIK the only interface between Python and Inkscape is vis 'extensions' (or whatever they call them) where you get to open a dialogue (you can design) and act on elements (or make new ones). But it's a kind of one-to-one operation, not at all the same as a tool or widget or interactive dialogue (like fill/stroke) like a timeline widget would be.
\d
On Dec 31, 2009, at 12:25 AM, Donn wrote:
I *wish* Inkscape could allow Python to hook-into the UI so that we could write our own tools (like those along the left) and control things like node handles and events and keyboard shortcuts etc. AFAIK the only interface between Python and Inkscape is vis 'extensions' (or whatever they call them) where you get to open a dialogue (you can design) and act on elements (or make new ones). But it's a kind of one-to-one operation, not at all the same as a tool or widget or interactive dialogue (like fill/stroke) like a timeline widget would be.
FYI a long term desire has been to give extensions a live connection to the document being edited. For the technologies involved the base approach would be to expose a live DOM interface (including DOM events) that the language of the plugin/extension could poke at directly. We've gotten much internal work done to allow for that, and seem to be on track to address at least the basics sometime this year.
Since we're looking at that for the document, exposing a live DOM connection for the UI itself appears to be a simple way to give extension authors a consistent API to work with both the document *and* the main application GUI. It also can give an extension full GUI widgets without that extension needing to support any GUI code directly itself.
I've discussed this with several others in the SVG community, including people in the W3C SVG working group, and they've mentioned that not only does it seem like an approach that will be functional, but also as a very appropriate solution for SVG.
Oh, and to get an idea of the Inkscape-hosted UI widgets, just look at the existing parameters support via .inx files that Inkscape gives plugins. Simply have a declarative UI description of the parameters your extension needs and then Inkscape does the rest. That will most likely be hooked in and expanded.
On Dec 30, 2009, at 11:50 PM, Sanat Ganu wrote:
@Jon You are right....C++ is the real problem and also finding the right part of the Inkscape code to add UI elements. Do you think it is straightforward? Does the Extension mechanism not allow the extension to draw a timeline for example and allow the user to manipulate it?
Well... one way to do it might be to look at the code that runs the Icon preview window. It is very rough and really should be replaced. The reason to look at it is that it was some early code that was done in a very short timeframe.
A better approach (which that needs to be migrated to) is to create a dialog that is a subclass of our View, so that it can leverage the real-time updates, etc.
What I think of right off hand for animation is to have a preview/playback window with simple controls that gets a copy of the SVG tree and modifies it to display. Then there can also be a dialog with the control paths/timing ui, etc. that operates on the main document.
This all depend on how familiar you are with C++ and with how fancy you want to get with the interaction. If you might be comfortable with the language, then GtkMM makes it easy to call the widgets and such. And I or someone else in the chat room could probably get you through the process of doing a simple GTK+ UI fairly quickly (perhaps even over just a few days if all the rest is simple)
participants (4)
-
Donn
-
heathenx
-
Jon Cruz
-
Sanat Ganu