Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/curve.c4
-rw-r--r--source/blender/makesdna/DNA_curve_types.h4
-rw-r--r--source/blender/makesrna/intern/rna_curve.c9
3 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 841bd635acf..358dd1914e7 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -1573,7 +1573,7 @@ static void alfa_bezpart(BezTriple *prevbezt, BezTriple *bezt, Nurb *nu, float *
for(a=0; a<resolu; a++, fac+= dfac) {
if (tilt_array) {
- if (nu->tilt_interp==3) { /* May as well support for tilt also 2.47 ease interp */
+ if (nu->tilt_interp==KEY_CU_EASE) { /* May as well support for tilt also 2.47 ease interp */
*tilt_array = prevbezt->alfa + (bezt->alfa - prevbezt->alfa)*(3.0f*fac*fac - 2.0f*fac*fac*fac);
} else {
key_curve_position_weights(fac, t, nu->tilt_interp);
@@ -1584,7 +1584,7 @@ static void alfa_bezpart(BezTriple *prevbezt, BezTriple *bezt, Nurb *nu, float *
}
if (radius_array) {
- if (nu->radius_interp==3) {
+ if (nu->radius_interp==KEY_CU_EASE) {
/* Support 2.47 ease interp
* Note! - this only takes the 2 points into account,
* giving much more localized results to changes in radius, sometimes you want that */
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index 973ba896100..8537b703c69 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -346,5 +346,9 @@ typedef enum eBezTriple_KeyframeType {
#define CU_CHINFO_SMALLCAPS (1<<4)
#define CU_CHINFO_SMALLCAPS_CHECK (1<<5) /* set at runtime, checks if case switching is needed */
+/* mixed with KEY_LINEAR but define here since only curve supports */
+#define KEY_CU_EASE 3
+
+
#endif
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 2cd7953d878..d513b13c923 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -29,6 +29,7 @@
#include "rna_internal.h"
#include "DNA_curve_types.h"
+#include "DNA_key_types.h"
#include "DNA_material_types.h"
#include "DNA_scene_types.h"
@@ -1252,10 +1253,10 @@ static void rna_def_curve(BlenderRNA *brna)
static void rna_def_curve_nurb(BlenderRNA *brna)
{
static EnumPropertyItem spline_interpolation_items[] = {
- {BEZT_IPO_CONST, "LINEAR", 0, "Linear", ""},
- {BEZT_IPO_LIN, "CARDINAL", 0, "Cardinal", ""},
- {BEZT_IPO_BEZ, "BSPLINE", 0, "BSpline", ""},
- {BEZT_IPO_BEZ, "EASE", 0, "Ease", ""},
+ {KEY_LINEAR, "LINEAR", 0, "Linear", ""},
+ {KEY_CARDINAL, "CARDINAL", 0, "Cardinal", ""},
+ {KEY_BSPLINE, "BSPLINE", 0, "BSpline", ""},
+ {KEY_CU_EASE, "EASE", 0, "Ease", ""}, /* todo, define somewhere, not one of BEZT_IPO_* */
{0, NULL, 0, NULL, NULL}};
StructRNA *srna;