[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39067] branches/soc-2011-pepper/source/ blender: Assorted loose ends for auto-clamped handles work
Joshua Leung
aligorith at gmail.com
Fri Aug 5 13:23:29 CEST 2011
Revision: 39067
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39067
Author: aligorith
Date: 2011-08-05 11:23:28 +0000 (Fri, 05 Aug 2011)
Log Message:
-----------
Assorted loose ends for auto-clamped handles work
* Tweaked order of handle types to make it easier to find Auto/Auto-
clamped in the list
* Fixed a number of places which were still just checking for auto-
handles when they should have included auto-clamped too, including
handle rotation
Modified Paths:
--------------
branches/soc-2011-pepper/source/blender/blenkernel/intern/curve.c
branches/soc-2011-pepper/source/blender/editors/animation/keyframes_edit.c
branches/soc-2011-pepper/source/blender/editors/transform/transform_conversions.c
branches/soc-2011-pepper/source/blender/makesrna/intern/rna_curve.c
branches/soc-2011-pepper/source/blender/makesrna/intern/rna_fcurve.c
Modified: branches/soc-2011-pepper/source/blender/blenkernel/intern/curve.c
===================================================================
--- branches/soc-2011-pepper/source/blender/blenkernel/intern/curve.c 2011-08-05 10:45:32 UTC (rev 39066)
+++ branches/soc-2011-pepper/source/blender/blenkernel/intern/curve.c 2011-08-05 11:23:28 UTC (rev 39067)
@@ -2674,15 +2674,15 @@
if(bezt->f1 & SELECT) flag++;
if(bezt->f2 & SELECT) flag += 2;
if(bezt->f3 & SELECT) flag += 4;
-
+
if( !(flag==0 || flag==7) ) {
- if(bezt->h1==HD_AUTO) { /* auto */
+ if(ELEM(bezt->h1, HD_AUTO, HD_AUTO_ANIM)) { /* auto */
bezt->h1= HD_ALIGN;
}
- if(bezt->h2==HD_AUTO) { /* auto */
+ if(ELEM(bezt->h2, HD_AUTO, HD_AUTO_ANIM)) { /* auto */
bezt->h2= HD_ALIGN;
}
-
+
if(bezt->h1==HD_VECT) { /* vector */
if(flag < 4) bezt->h1= 0;
}
@@ -2692,7 +2692,7 @@
}
bezt++;
}
-
+
calchandlesNurb(nu);
}
Modified: branches/soc-2011-pepper/source/blender/editors/animation/keyframes_edit.c
===================================================================
--- branches/soc-2011-pepper/source/blender/editors/animation/keyframes_edit.c 2011-08-05 10:45:32 UTC (rev 39066)
+++ branches/soc-2011-pepper/source/blender/editors/animation/keyframes_edit.c 2011-08-05 11:23:28 UTC (rev 39067)
@@ -634,8 +634,8 @@
if (bezt->f2 & SELECT) {
bezt->vec[0][1]= bezt->vec[2][1]= bezt->vec[1][1];
- if ((bezt->h1==HD_AUTO) || (bezt->h1==HD_VECT)) bezt->h1= HD_ALIGN;
- if ((bezt->h2==HD_AUTO) || (bezt->h2==HD_VECT)) bezt->h2= HD_ALIGN;
+ if (ELEM3(bezt->h1, HD_AUTO, HD_AUTO_ANIM, HD_VECT)) bezt->h1= HD_ALIGN;
+ if (ELEM3(bezt->h2, HD_AUTO, HD_AUTO_ANIM, HD_VECT)) bezt->h2= HD_ALIGN;
}
return 0;
}
Modified: branches/soc-2011-pepper/source/blender/editors/transform/transform_conversions.c
===================================================================
--- branches/soc-2011-pepper/source/blender/editors/transform/transform_conversions.c 2011-08-05 10:45:32 UTC (rev 39066)
+++ branches/soc-2011-pepper/source/blender/editors/transform/transform_conversions.c 2011-08-05 11:23:28 UTC (rev 39067)
@@ -3452,7 +3452,7 @@
* then check if we're using auto-handles.
* - If so, change them auto-handles to aligned handles so that handles get affected too
*/
- if ((bezt->h1 == HD_AUTO) && (bezt->h2 == HD_AUTO) && ELEM(t->mode, TFM_ROTATION, TFM_RESIZE)) {
+ if (ELEM(bezt->h1, HD_AUTO, HD_AUTO_ANIM) && ELEM(bezt->h2, HD_AUTO, HD_AUTO_ANIM) && ELEM(t->mode, TFM_ROTATION, TFM_RESIZE)) {
if (hdata && (sel1) && (sel3)) {
bezt->h1= HD_ALIGN;
bezt->h2= HD_ALIGN;
Modified: branches/soc-2011-pepper/source/blender/makesrna/intern/rna_curve.c
===================================================================
--- branches/soc-2011-pepper/source/blender/makesrna/intern/rna_curve.c 2011-08-05 10:45:32 UTC (rev 39066)
+++ branches/soc-2011-pepper/source/blender/makesrna/intern/rna_curve.c 2011-08-05 11:23:28 UTC (rev 39067)
@@ -47,17 +47,17 @@
EnumPropertyItem beztriple_handle_type_items[] = {
{HD_FREE, "FREE", 0, "Free", ""},
- {HD_AUTO, "AUTO", 0, "Auto", ""},
{HD_VECT, "VECTOR", 0, "Vector", ""},
{HD_ALIGN, "ALIGNED", 0, "Aligned", ""},
+ {HD_AUTO, "AUTO", 0, "Auto", ""},
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem keyframe_handle_type_items[] = {
{HD_FREE, "FREE", 0, "Free", ""},
- {HD_AUTO, "AUTO", 0, "Auto", ""},
- {HD_AUTO_ANIM, "AUTO_CLAMPED", 0, "Auto Clamped", "Auto handles clamped to not overshoot"},
{HD_VECT, "VECTOR", 0, "Vector", ""},
{HD_ALIGN, "ALIGNED", 0, "Aligned", ""},
+ {HD_AUTO, "AUTO", 0, "Automatic", ""},
+ {HD_AUTO_ANIM, "AUTO_CLAMPED", 0, "Auto Clamped", "Auto handles clamped to not overshoot"},
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem beztriple_interpolation_mode_items[] = {
Modified: branches/soc-2011-pepper/source/blender/makesrna/intern/rna_fcurve.c
===================================================================
--- branches/soc-2011-pepper/source/blender/makesrna/intern/rna_fcurve.c 2011-08-05 10:45:32 UTC (rev 39066)
+++ branches/soc-2011-pepper/source/blender/makesrna/intern/rna_fcurve.c 2011-08-05 11:23:28 UTC (rev 39067)
@@ -596,15 +596,15 @@
else {
fcu->bezt= MEM_callocN(sizeof(BezTriple) * tot, "rna_FKeyframe_points_add");
}
-
+
bezt= fcu->bezt + fcu->totvert;
fcu->totvert += tot;
-
+
while(tot--) {
/* defaults, no userprefs gives pradictable results for API */
bezt->f1= bezt->f2= bezt->f3= SELECT;
bezt->ipo= BEZT_IPO_BEZ;
- bezt->h1= bezt->h2= HD_AUTO;
+ bezt->h1= bezt->h2= HD_AUTO_ANIM;
bezt++;
}
}
More information about the Bf-blender-cvs
mailing list