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:
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_enum_types.h5
-rw-r--r--source/blender/makesrna/intern/rna_curve.c31
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c25
3 files changed, 33 insertions, 28 deletions
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index 065c1eba606..2262c73a9af 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -34,6 +34,11 @@ extern EnumPropertyItem space_type_items[];
extern EnumPropertyItem region_type_items[];
extern EnumPropertyItem modifier_type_items[];
+extern EnumPropertyItem beztriple_handle_type_items[];
+extern EnumPropertyItem beztriple_interpolation_mode_items[];
+
+extern EnumPropertyItem fmodifier_type_items[];
+
#endif /* RNA_ENUM_TYPES */
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index dd1c620fe45..719c6cb3c89 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -32,6 +32,19 @@
#include "DNA_curve_types.h"
#include "DNA_material_types.h"
+EnumPropertyItem beztriple_handle_type_items[] = {
+ {HD_FREE, "FREE", "Free", ""},
+ {HD_AUTO, "AUTO", "Auto", ""},
+ {HD_VECT, "VECTOR", "Vector", ""},
+ {HD_ALIGN, "ALIGNED", "Aligned", ""},
+ {HD_AUTO_ANIM, "AUTO_CLAMPED", "Auto Clamped", ""},
+ {0, NULL, NULL, NULL}};
+EnumPropertyItem beztriple_interpolation_mode_items[] = {
+ {BEZT_IPO_CONST, "CONSTANT", "Constant", ""},
+ {BEZT_IPO_LIN, "LINEAR", "Linear", ""},
+ {BEZT_IPO_BEZ, "BEZIER", "Bezier", ""},
+ {0, NULL, NULL, NULL}};
+
#ifdef RNA_RUNTIME
static void rna_BezTriple_handle1_get(PointerRNA *ptr, float *values)
@@ -160,18 +173,6 @@ static void rna_def_beztriple(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_handle_type_items[] = {
- {HD_FREE, "FREE", "Free", ""},
- {HD_AUTO, "AUTO", "Auto", ""},
- {HD_VECT, "VECTOR", "Vector", ""},
- {HD_ALIGN, "ALIGNED", "Aligned", ""},
- {HD_AUTO_ANIM, "AUTO_CLAMPED", "Auto Clamped", ""},
- {0, NULL, NULL, NULL}};
- static EnumPropertyItem prop_mode_interpolation_items[] = {
- {BEZT_IPO_CONST, "CONSTANT", "Constant", ""},
- {BEZT_IPO_LIN, "LINEAR", "Linear", ""},
- {BEZT_IPO_BEZ, "BEZIER", "Bezier", ""},
- {0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "BezierCurvePoint", NULL);
RNA_def_struct_sdna(srna, "BezTriple");
@@ -197,18 +198,18 @@ static void rna_def_beztriple(BlenderRNA *brna)
/* Enums */
prop= RNA_def_property(srna, "handle1_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "h1");
- RNA_def_property_enum_items(prop, prop_handle_type_items);
+ RNA_def_property_enum_items(prop, beztriple_handle_type_items);
RNA_def_property_ui_text(prop, "Handle 1 Type", "Handle types");
prop= RNA_def_property(srna, "handle2_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "h2");
- RNA_def_property_enum_items(prop, prop_handle_type_items);
+ RNA_def_property_enum_items(prop, beztriple_handle_type_items);
RNA_def_property_ui_text(prop, "Handle 2 Type", "Handle types");
prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ipo");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_enum_items(prop, prop_mode_interpolation_items);
+ RNA_def_property_enum_items(prop, beztriple_interpolation_mode_items);
RNA_def_property_ui_text(prop, "Interpolation", "(For F-Curves Only) Interpolation to use for segment of curve starting from current BezTriple.");
/* Vector values */
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index 6c58c521535..d57e302263e 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -34,6 +34,17 @@
#include "MEM_guardedalloc.h"
+EnumPropertyItem fmodifier_type_items[] = {
+ {FMODIFIER_TYPE_NULL, "NULL", "Invalid", ""},
+ {FMODIFIER_TYPE_GENERATOR, "GENERATOR", "Generator", ""},
+ {FMODIFIER_TYPE_ENVELOPE, "ENVELOPE", "Envelope", ""},
+ {FMODIFIER_TYPE_CYCLES, "CYCLES", "Cycles", ""},
+ {FMODIFIER_TYPE_NOISE, "NOISE", "Noise", ""},
+ {FMODIFIER_TYPE_FILTER, "FILTER", "Filter", ""},
+ {FMODIFIER_TYPE_PYTHON, "PYTHON", "Python", ""},
+ {FMODIFIER_TYPE_LIMITS, "LIMITS", "Limits", ""},
+ {0, NULL, NULL, NULL}};
+
#ifdef RNA_RUNTIME
float FModGenFunc_amplitude_get(PointerRNA *ptr)
@@ -457,18 +468,6 @@ void rna_def_fmodifier(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
- {FMODIFIER_TYPE_NULL, "NULL", "Invalid", ""},
- {FMODIFIER_TYPE_GENERATOR, "GENERATOR", "Generator", ""},
- {FMODIFIER_TYPE_ENVELOPE, "ENVELOPE", "Envelope", ""},
- {FMODIFIER_TYPE_CYCLES, "CYCLES", "Cycles", ""},
- {FMODIFIER_TYPE_NOISE, "NOISE", "Noise", ""},
- {FMODIFIER_TYPE_FILTER, "FILTER", "Filter", ""},
- {FMODIFIER_TYPE_PYTHON, "PYTHON", "Python", ""},
- {FMODIFIER_TYPE_LIMITS, "LIMITS", "Limits", ""},
- {0, NULL, NULL, NULL}};
-
-
/* base struct definition */
srna= RNA_def_struct(brna, "FModifier", NULL);
RNA_def_struct_refine_func(srna, "rna_FModifierType_refine");
@@ -484,7 +483,7 @@ void rna_def_fmodifier(BlenderRNA *brna)
/* type */
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_enum_items(prop, prop_type_items);
+ RNA_def_property_enum_items(prop, fmodifier_type_items);
RNA_def_property_ui_text(prop, "Type", "F-Curve Modifier Type");
/* settings */