diff options
author | Joshua Leung <aligorith@gmail.com> | 2013-11-05 05:20:30 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2013-11-05 05:20:30 +0400 |
commit | d504cee1208dc8d78e4ac2a69ef1919b7ef4127c (patch) | |
tree | f17f8ea5f4c2c425301f4bf771868e484c954e86 | |
parent | 1241f868e92409898fcac8f9798d630c52f7c15a (diff) |
Remove soft limits from lower-end of ranges for last two commits - This turned
out to be too restrictive/confusing again.
-rw-r--r-- | source/blender/makesrna/intern/rna_fcurve.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index 212c1ff118c..4809291e35e 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -463,7 +463,7 @@ static void rna_FModifier_start_frame_set(PointerRNA *ptr, float value) { FModifier *fcm = (FModifier *)ptr->data; - CLAMP(value, MINAFRAME, MAXFRAME); + CLAMP(value, MINAFRAMEF, MAXFRAMEF); fcm->sfra = value; /* XXX: maintain old offset? */ @@ -476,7 +476,7 @@ static void rna_FModifer_end_frame_set(PointerRNA *ptr, float value) { FModifier *fcm = (FModifier *)ptr->data; - CLAMP(value, MINAFRAME, MAXFRAME); + CLAMP(value, MINAFRAMEF, MAXFRAMEF); fcm->efra = value; /* XXX: maintain old offset? */ @@ -492,11 +492,11 @@ static void rna_FModifier_start_frame_range(PointerRNA *ptr, float *min, float * /* Technically, "sfra <= efra" must hold; however, we can't strictly enforce that, * or else it becomes tricky to adjust the range... [#36844] + * + * NOTE: we do not set soft-limits on lower bounds, as it's too confusing when you + * can't easily use the slider to set things here */ *min = MINAFRAMEF; - *softmin = MINAFRAMEF; - - *softmax = (fcm->flag & FMODIFIER_FLAG_RANGERESTRICT) ? fcm->efra : MAXFRAMEF; *max = MAXFRAMEF; } @@ -615,15 +615,13 @@ static void rna_FModifierLimits_maxy_set(PointerRNA *ptr, float value) } static void rna_FModifierLimits_minx_range(PointerRNA *ptr, float *min, float *max, - float *softmin, float *softmax) + float *UNUSED(softmin), float *UNUSED(softmax)) { FModifier *fcm = (FModifier *)ptr->data; FMod_Limits *data = fcm->data; + /* no soft-limits on lower bound - it's too confusing when you can't easily use the slider to set things here */ *min = MINAFRAMEF; - *softmin = MINAFRAMEF; - - *softmax = (data->flag & FCM_LIMIT_XMAX) ? data->rect.xmax : MAXFRAMEF; *max = MAXFRAMEF; } @@ -646,10 +644,8 @@ static void rna_FModifierLimits_miny_range(PointerRNA *ptr, float *min, float *m FModifier *fcm = (FModifier *)ptr->data; FMod_Limits *data = fcm->data; + /* no soft-limits on lower bound - it's too confusing when you can't easily use the slider to set things here */ *min = -FLT_MAX; - *softmin = -FLT_MAX; - - *softmax = (data->flag & FCM_LIMIT_YMAX) ? data->rect.ymax : FLT_MAX; *max = FLT_MAX; } |