I haven’t much time lately for playing around with pencil2d. Work as well as other life commitments haven’t left much gas in the tank for me to pursue fun stuff like this. Currently I’m having a rare quiet Sunday morning moment more or less where I can take a 50k foot view to see what I’m trying to do and hopefully break things down into some manageable bites that I can squeeze in between the chaotic moments of life. This is going to a train of thought post that probably won’t be of any interest to anyone but me, so read at your own risk.
So far I managed to separate the bezier from the polyline in the code. There was a desire by the pencil2d developers to have the polyline function in both the bitmap and vector modes. This dual functionality requirement is giving me some headache at the moment. In bitmap mode lines are stored as a bitmap. Trying to maintain this dual functionality at the moment is just slowing me down.
But.. Some of the design requirements are…
Polyline saved as a bitmap can never be edited as a polyline.
As new polyline can be either a bitmap or vector.
Another requirement, that will need to be implemented at some point.
Need to know in the mouse movements we’re dragging a point to move a line(s) or if we’re creating a new line from an existing point.
Rather than stripping bitmap out of the polyline code completely I think I should treat it as a non-implemented feature. I think once I get the main functionality implemented for vector mode shouldn’t be that hard to implement for bitmap.
In addition, the way the polyline data structure is going to change as well. If memory serves me it appears the app assumes that a line will be drawn point to point… In essence there is no line object… A line object needs to be implemented. This also means that container objects will also need to be designed etc… etc.. blah blah blah…
Also, I noticed(working from memory) that when qt renders lines it is using a 3 dimensional data to project on a 2d plane. The pencil2d polyline points should be 3 dimensional as opposed to planar. (This doesn’t mean we’re going to use the z at this point, but I think since qt can handle it, why not lay the foundation to have a 3d polyline so it can eventually be implemented…) Ultimately I could see some type vector tool of a a constrained stick figure that could be manipulated frame to frame in 3d space but proect on a 2d plan., This would give the animator a stick figure to place and could draw around it. Seems like that would be pretty cool to do.
As with anything all great journeys being with a single step…
Hopefully I can map out some small additional steps as well that I can knock off on something other that a quiet Sunday.
Anyway….. Next steps(more or less)
Research how best practise for handling non-implemented features so I get a break when debugging through the IDE, but doesn’t throw an exception when the IDE is running.
Refactor Code to polyline.cpp (et all?) that bitmap mode is a non implemented feature.
(?Need to add code that editing an existing object is a non implemented feature?)
(?Need to add code that saving an existing object is a non implemented feature?)
Create a line object.
modify the container objects to accommodate both lines and points.
(When I get this point, I need to break down a bunch of small digestible steps)
Sub goal. Draw the polyline out with a point to point line using the line object.
Get the polyline object to save.
(More sub steps to detail)
Get object to retrieve
(More sub steps to detail)
Get this working with bitmap mode.
(Need to break down additional steps)
When I get this point, the new polyline should mimic the currently existing polyline both in bitmap and vector mode. I would say that would be the point where we’re saying we’re done with that phase of the project.
That’s not to say we’re done, done… but at least it gives me a hard edge to strive for..
The next project after that would be do be able to drag a point and have the lines follow it.