Re: [Inkscape-devel] [Fwd: Animation LPE In Inkscape]
Hi Josh, welcome to inkscape development! Try to reply inline: (Not english)
On Wed, 2016-12-07 at 20:10 +0100, Jabier Arraiza wrote:
-------- Forwarded Message --------
Date: Tue, 06 Dec 2016 19:02:20 -0600 Subject: [Inkscape-devel] Animation LPE In Inkscape To: inkscape-devel@lists.sourceforge.net From: sup_dude00 <sup_dude00@...36...>
Hi all,
My name is Josh (bobsicle0 elsewhere on the internet), and I've been using inkscape for nearly 3 years now. Some time ago I was thinking about SVG animation with SMIL, and what tools were available to work with SVG animation. I remembered that inkscape didn't have animation capabilities.
Recently I had a bit of an inspiration that animation capabilities (even crudely) might be somewhat straightforward to add as an LPE in inkscape. I realize that it will probably take more than a LPE to actually display SVG animations in inkscape, but for now, that's not my intent. My intent is to allow the user access to the SVG/SMIL animation tags through a LPE.
For a visual indication of what the animation will look like, the element being animated could draw a path to show the motion of the node/object's motion rather than actually showing the animation (showing the actual animation would presumably require modification of inkscape's SVG rendering). The drawn motion path would be similar to what you see in the Bend and Envelope Deform LPEs, but instead drawn to show the path of motion.
I'm brand new to inkscapes code structure, and what is/isn't possible with LPEs. I've dug around as much as I could on the wiki and elsewhere and read the stuff about inkscape development. So far, I've done the following:
bazaar checkout of inkscape's trunk,
sucessfully built inkscape in the inkup VM enviroment,
renamed a copy of lpe-skeleton.cpp/.h to lpe-animation.cpp/.h,
renamed the appropriate things inside lpe-animation.cpp/.h,
modified the necessary files (as per the wiki) to register the new LPE in inkscape,
added a few new test parameters to lpe-animation.cpp to make sure they would show up as expected in the LPE dialog,
and finally sucessfully recompiled.
Everything is working just fine. From this point on though, I'm pretty stuck, and I have a few questions.
Is it possible to modify SVG element tags from within a LPE, such as adding "animate" or "animateTransform"?
Yes but maybe need to modify inkscape to allow this attributes
What's the next step to take? Really what I mean is, is there a list of things that can be modified about the path that is passed in to the LPE and how can those things can be modified in code
You cam modify the element, also you also can modyfy or add other svg tags as in meassure line LPE and the not merged branch mirror_improvements (in dev)
Is there any other advice you'd like to give? I'm a very open person when it comes to criticism and recommendations.
I think we need a low level way than a LPE to handle animation. Also need a SMIL/CSS parser, we currently use one for CSS but dont know his state on animation. Anyway if you want to try, think for the same price of show a direction you can move the element inside inkscape.
I appreciate any help you guys can offer.
I do a lot of LPE works and I can help you in the process. Ping me when you want! IRC #inkscape-devel -> jabiertxof
Jabiertxo.
Welcome Josh,
Thanks for having a look at animation.
On Thu, 2016-12-08 at 01:11 +0100, Jabier Arraiza wrote:
What's the next step to take? Really what I mean is, is there a list of things that can be modified about the path that is passed in
to
the LPE and how can those things can be modified in code
You cam modify the element, also you also can modyfy or add other svg tags as in meassure line LPE and the not merged branch mirror_improvements (in dev)
My best advice is to think carefully about what the smallest possible usable feature is. And add that.
It might not be an LPE, it might need some extra support such as parsing and making sure inkscape doesn't throw away the animation tags, but once you have the smallest feature, you can build form there and get others interested in developing.
I can lend you a hand in the user interface (ui) department as well as some c++ code depending on what you need help with.
Best Regards, Martin Owens
On Wed, 2016-12-07 at 19:47 -0500, Martin Owens wrote:
Welcome Josh,
Thanks for having a look at animation.
On Thu, 2016-12-08 at 01:11 +0100, Jabier Arraiza wrote:
What's the next step to take? Really what I mean is, is there a list of things that can be modified about the path that is passed in
to
the LPE and how can those things can be modified in code
You cam modify the element, also you also can modyfy or add other svg tags as in meassure line LPE and the not merged branch mirror_improvements (in dev)
My best advice is to think carefully about what the smallest possible usable feature is. And add that.
It might not be an LPE, it might need some extra support such as parsing and making sure inkscape doesn't throw away the animation tags, but once you have the smallest feature, you can build form there and get others interested in developing.
I can lend you a hand in the user interface (ui) department as well as some c++ code depending on what you need help with.
Best Regards, Martin Owens
Thanks for the suggestions guys. It seems from what you're suggesting, getting inkscape to even recognize the animation related tags is the place to start. Where would one need to begin to even get started on that? I did some riffling through the doxygen docs, and an educated guess as for where to start would be in the Inkscape::XML::SimpleNode class, since that seems where inkscape handles creating new XML nodes. Where does the SVG parsing for reading the file take place though?
On Thu, 2016-12-08 at 01:11 +0100, Jabier Arraiza wrote:
Try to reply inline: (Not english)
Hopefully this is correct. I'm still getting acquainted with a new email client.
Regards, Josh (bobsicle0)
participants (3)
-
bobsicle0
-
Jabier Arraiza
-
Martin Owens