Feature: transform manipulator (align normal option) aligns with bezier
authorTon Roosendaal <ton@blender.org>
Fri, 9 Nov 2007 16:02:31 +0000 (16:02 +0000)
committerTon Roosendaal <ton@blender.org>
Fri, 9 Nov 2007 16:02:31 +0000 (16:02 +0000)
handles now. Needed & useful for modeling trees here...

source/blender/src/transform_manipulator.c

index 8035cbb7d76c09e234fc39bbfa005538db449f94..f1d4833d0ff07f97275a9f1ca1520ce446e1ec55 100644 (file)
@@ -311,18 +311,22 @@ int calc_manipulator_stats(ScrArea *sa)
                                                if( (bezt->f1 & SELECT) + (bezt->f2 & SELECT) + (bezt->f3 & SELECT) > SELECT ) {
                                                        calc_tw_center(bezt->vec[1]);
                                                        totsel++;
+                                                       VecSubf(normal, bezt->vec[0], bezt->vec[2]);
                                                }
                                                else {
                                                        if(bezt->f1) {
                                                                calc_tw_center(bezt->vec[0]);
+                                                               VecSubf(normal, bezt->vec[0], bezt->vec[1]);
                                                                totsel++;
                                                        }
                                                        if(bezt->f2) {
                                                                calc_tw_center(bezt->vec[1]);
+                                                               VecSubf(normal, bezt->vec[0], bezt->vec[2]);
                                                                totsel++;
                                                        }
                                                        if(bezt->f3) {
                                                                calc_tw_center(bezt->vec[2]);
+                                                               VecSubf(normal, bezt->vec[1], bezt->vec[2]);
                                                                totsel++;
                                                        }
                                                }