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:
authorCampbell Barton <ideasman42@gmail.com>2015-11-18 04:23:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-11-18 04:23:05 +0300
commit3555ef184b3201afcecf610ee37694081ac5ee2c (patch)
treecef1979585e9191a1634d54ff806ff5916832274 /source/blender/makesrna/intern/rna_constraint.c
parenta374ff16b5e823ae37b69eb1995d36944b80c57f (diff)
RNA: reuse axis enum
Diffstat (limited to 'source/blender/makesrna/intern/rna_constraint.c')
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c13
1 files changed, 3 insertions, 10 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");