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
diff options
context:
space:
mode:
authorJeroen Bakker <j.bakker@atmind.nl>2019-11-01 14:09:55 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2019-11-27 18:05:54 +0300
commit2e6159a4948cd0f4e0b636734bfe506796bd87f2 (patch)
treefb04244033e45a69c514ec9a0ac6aa6fd28d5a33 /source/blender/makesdna/DNA_color_types.h
parent6992fc0b3bf85e985169157b2e7ced1e1ed7fcdf (diff)
Curve: CurveMapping Extend Option
Extend options are currently stored per curve. This was not clearly communicated to the user and they expected this to be a setting per CurveMapping. This change will move the option from `Curve` to `CurveMapping`. In order to support this the API had to be changed. BPY: CurveMap.evaluate is also moved to CurveMapping.evaluate what breaks Python API. Cycles has been updated but other add-ons have not. After release of 2.81 we can merge this to master and adapt the add-ons. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D6169
Diffstat (limited to 'source/blender/makesdna/DNA_color_types.h')
-rw-r--r--source/blender/makesdna/DNA_color_types.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/source/blender/makesdna/DNA_color_types.h b/source/blender/makesdna/DNA_color_types.h
index 219fc96554a..66adc547cf2 100644
--- a/source/blender/makesdna/DNA_color_types.h
+++ b/source/blender/makesdna/DNA_color_types.h
@@ -24,6 +24,7 @@
#ifndef __DNA_COLOR_TYPES_H__
#define __DNA_COLOR_TYPES_H__
+#include "DNA_defs.h"
#include "DNA_vec_types.h"
/* general defines for kernel functions */
@@ -47,7 +48,8 @@ enum {
};
typedef struct CurveMap {
- short totpoint, flag;
+ short totpoint;
+ short flag DNA_DEPRECATED;
/** Quick multiply value for reading table. */
float range;
@@ -67,9 +69,6 @@ typedef struct CurveMap {
float premul_ext_out[2];
} CurveMap;
-/* cuma->flag */
-#define CUMA_EXTEND_EXTRAPOLATE 1
-
typedef struct CurveMapping {
/** Cur; for buttons, to show active curve. */
int flag, cur;
@@ -93,11 +92,17 @@ typedef struct CurveMapping {
char _pad[6];
} CurveMapping;
-/* cumapping->flag */
-#define CUMA_DO_CLIP (1 << 0)
-#define CUMA_PREMULLED (1 << 1)
-#define CUMA_DRAW_CFRA (1 << 2)
-#define CUMA_DRAW_SAMPLE (1 << 3)
+/* CurveMapping.flag */
+typedef enum eCurveMappingFlags {
+ CUMA_DO_CLIP = (1 << 0),
+ CUMA_PREMULLED = (1 << 1),
+ CUMA_DRAW_CFRA = (1 << 2),
+ CUMA_DRAW_SAMPLE = (1 << 3),
+
+ /* The curve is extended by extrapolation. When not set the curve is extended
+ * Horizontally */
+ CUMA_EXTEND_EXTRAPOLATE = (1 << 4),
+} eCurveMappingFlags;
/* cumapping->preset */
typedef enum eCurveMappingPreset {