First off: I just started looking into Blender development, did my first build yesterday, wrote my first lines of blender code today, and this is my first post here - hi everyone! :)
For my first challenge I picked one of the beginner dev tasks from the [[ http://wiki.blender.org/index.php/Dev:Doc/Quick_Hacks
| Quick Hacks ]] listing in the wiki: |
Curve, Recalculate handles In Mesh editmode you can recalculate face flipping, however a similar functionality would be nice to have in curve editmode, to recalculate handles (without changing handle types). This can use the same calculation thats used for setting auto handles.
I already have an implementation ready, but before going into code review I would like to open a quick round for discussing my approach as to how it works and where it is appears in the UI. (And to be totally frank, I still need to figure out a bug that occurs only on the second consecutive run :D ...)
Here's where I placed the button (3D View Toolshelf in Editmode below the handle type settting buttons):
My implementation is:
- Store the currently set handle types of all points
- Set all selected handles to type HD_AUTO
- Recalculate all handles (with BKE_nurb_handles_calc(...))
- Reset all handle types back to their original type
- Recalculate handles once again
Thus the use-case for this functionality would be to reset the curvature on a curve that contains sharp (Vector) and soft (Free/Aligned/Auto) turns, but retaining the sharp turns.
Ok so that's it from my side, I'm looking forward to your comments! Feel free to also abandon the idea altogether, it really is a bit exotic, and i won't be disappointed if it turns out this idea was "approved" (see wiki) too long ago, and the needs have changed now.
P.s.: I'll see if i can get the code changes uploaded here tomorrow, it's all a bit much at the moment in terms of learning all the procedures and I'm too tired now anyway to tackle this as well. ;)
