diff options
-rw-r--r-- | source/blender/makesrna/intern/rna_constraint.c | 13 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 11 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object_force.c | 10 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_particle.c | 9 |
4 files changed, 8 insertions, 35 deletions
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 860ed5e49ab..6b1f4856f9c 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -1617,13 +1617,6 @@ static void rna_def_constraint_transform(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem axis_map_items[] = { - {0, "X", 0, "X", ""}, - {1, "Y", 0, "Y", ""}, - {2, "Z", 0, "Z", ""}, - {0, NULL, 0, NULL, NULL} - }; - srna = RNA_def_struct(brna, "TransformConstraint", "Constraint"); RNA_def_struct_ui_text(srna, "Transformation Constraint", "Map transformations of the target to the object"); RNA_def_struct_sdna_from(srna, "bTransformConstraint", "data"); @@ -1653,19 +1646,19 @@ static void rna_def_constraint_transform(BlenderRNA *brna) prop = RNA_def_property(srna, "map_to_x_from", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "map[0]"); - RNA_def_property_enum_items(prop, axis_map_items); + RNA_def_property_enum_items(prop, object_axis_unsigned_items); RNA_def_property_ui_text(prop, "Map To X From", "The source axis constrained object's X axis uses"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); prop = RNA_def_property(srna, "map_to_y_from", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "map[1]"); - RNA_def_property_enum_items(prop, axis_map_items); + RNA_def_property_enum_items(prop, object_axis_unsigned_items); RNA_def_property_ui_text(prop, "Map To Y From", "The source axis constrained object's Y axis uses"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); prop = RNA_def_property(srna, "map_to_z_from", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "map[2]"); - RNA_def_property_enum_items(prop, axis_map_items); + RNA_def_property_enum_items(prop, object_axis_unsigned_items); RNA_def_property_ui_text(prop, "Map To Z From", "The source axis constrained object's Z axis uses"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 251db029974..0e0267db029 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -3355,13 +3355,6 @@ static void rna_def_modifier_uvwarp(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem uvwarp_axis[] = { - {0, "X", 0, "X", ""}, - {1, "Y", 0, "Y", ""}, - {2, "Z", 0, "Z", ""}, - {0, NULL, 0, NULL, NULL} - }; - srna = RNA_def_struct(brna, "UVWarpModifier", "Modifier"); RNA_def_struct_ui_text(srna, "UVWarp Modifier", "Add target position to uv coordinates"); RNA_def_struct_sdna(srna, "UVWarpModifierData"); @@ -3369,13 +3362,13 @@ static void rna_def_modifier_uvwarp(BlenderRNA *brna) prop = RNA_def_property(srna, "axis_u", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "axis_u"); - RNA_def_property_enum_items(prop, uvwarp_axis); + RNA_def_property_enum_items(prop, object_axis_unsigned_items); RNA_def_property_ui_text(prop, "U-Axis", "Pole axis for rotation"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop = RNA_def_property(srna, "axis_v", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "axis_v"); - RNA_def_property_enum_items(prop, uvwarp_axis); + RNA_def_property_enum_items(prop, object_axis_unsigned_items); RNA_def_property_ui_text(prop, "V-Axis", "Pole axis for rotation"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index f7cc4187dc6..0841a19dcee 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -34,6 +34,7 @@ #include "DNA_smoke_types.h" #include "RNA_define.h" +#include "RNA_enum_types.h" #include "rna_internal.h" @@ -1169,13 +1170,6 @@ static void rna_def_field(BlenderRNA *brna) {6, "ROLL", 0, "Roll", ""}, {0, NULL, 0, NULL, NULL} }; - - static EnumPropertyItem guide_kink_axis_items[] = { - {0, "X", 0, "X", ""}, - {1, "Y", 0, "Y", ""}, - {2, "Z", 0, "Z", ""}, - {0, NULL, 0, NULL, NULL} - }; srna = RNA_def_struct(brna, "FieldSettings", NULL); RNA_def_struct_sdna(srna, "PartDeflect"); @@ -1456,7 +1450,7 @@ static void rna_def_field(BlenderRNA *brna) prop = RNA_def_property(srna, "guide_kink_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "kink_axis"); - RNA_def_property_enum_items(prop, guide_kink_axis_items); + RNA_def_property_enum_items(prop, object_axis_unsigned_items); RNA_def_property_ui_text(prop, "Axis", "Which axis to use for offset"); RNA_def_property_update(prop, 0, "rna_FieldSettings_update"); diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index bac6b88feb9..11750c683af 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -1997,13 +1997,6 @@ static void rna_def_particle_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem kink_axis_items[] = { - {0, "X", 0, "X", ""}, - {1, "Y", 0, "Y", ""}, - {2, "Z", 0, "Z", ""}, - {0, NULL, 0, NULL, NULL} - }; - static EnumPropertyItem bb_align_items[] = { {PART_BB_X, "X", 0, "X", ""}, {PART_BB_Y, "Y", 0, "Y", ""}, @@ -2421,7 +2414,7 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); prop = RNA_def_property(srna, "kink_axis", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, kink_axis_items); + RNA_def_property_enum_items(prop, object_axis_unsigned_items); RNA_def_property_ui_text(prop, "Axis", "Which axis to use for offset"); RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); |