Bugfix #3781
authorTon Roosendaal <ton@blender.org>
Sun, 9 Apr 2006 18:31:20 +0000 (18:31 +0000)
committerTon Roosendaal <ton@blender.org>
Sun, 9 Apr 2006 18:31:20 +0000 (18:31 +0000)
Using the new "Add constraint" hotkey (CTRL+ALT+C) or the option in the
pulldown menu, didn't set a proper flag in Curve object when a "Follow
Path" constraint was choosen.

source/blender/src/editconstraint.c

index b3f2ac07c0be24485434849145ed821a29afcf57..be35acfde69c2fc0ebbd93ccd991f72cc7841bd6 100644 (file)
@@ -711,7 +711,11 @@ void add_constraint(int only_IK)
                else if(nr==3) con = add_new_constraint(CONSTRAINT_TYPE_TRACKTO);
                else if(nr==4) con = add_new_constraint(CONSTRAINT_TYPE_MINMAX);
                else if(nr==5) con = add_new_constraint(CONSTRAINT_TYPE_LOCKTRACK);
-               else if(nr==6) con = add_new_constraint(CONSTRAINT_TYPE_FOLLOWPATH);
+               else if(nr==6) {
+                       Curve *cu= obsel->data;
+                       cu->flag |= CU_PATH;
+                       con = add_new_constraint(CONSTRAINT_TYPE_FOLLOWPATH);
+               }
                else if(nr==7) con = add_new_constraint(CONSTRAINT_TYPE_STRETCHTO);
                else if(nr==8) con = add_new_constraint(CONSTRAINT_TYPE_SIZELIKE);