diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-01-07 12:22:49 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-01-07 12:22:49 +0300 |
commit | c4fda6f7d076ffed5a55634031e623838a3d6192 (patch) | |
tree | b739b697ed619b76f5d28d526cdbcfb823b36f81 /source/blender/makesrna/intern/rna_modifier.c | |
parent | 0778856268a77a323970ad5f3e2374664f592b0b (diff) |
Cleanup: use generic xyz axis enums
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index bf35752dcf6..75030b83f80 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -255,6 +255,18 @@ EnumPropertyItem rna_enum_dt_layers_select_dst_items[] = { {0, NULL, 0, NULL, NULL} }; +EnumPropertyItem rna_enum_axis_xy_items[] = { + {0, "X", 0, "X", ""}, + {1, "Y", 0, "Y", ""}, + {0, NULL, 0, NULL, NULL} +}; + +EnumPropertyItem rna_enum_axis_xyz_items[] = { + {0, "X", 0, "X", ""}, + {1, "Y", 0, "Y", ""}, + {2, "Z", 0, "Z", ""}, + {0, NULL, 0, NULL, NULL} +}; #ifdef RNA_RUNTIME @@ -1557,7 +1569,7 @@ static void rna_def_modifier_decimate(BlenderRNA *brna) prop = RNA_def_property(srna, "symmetry_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "symmetry_axis"); - RNA_def_property_enum_items(prop, rna_enum_object_axis_unsigned_items); + RNA_def_property_enum_items(prop, rna_enum_axis_xyz_items); RNA_def_property_ui_text(prop, "Axis", "Axis of symmetry"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -2544,13 +2556,6 @@ static void rna_def_modifier_particleinstance(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem particleinstance_axis[] = { - {0, "X", 0, "X", ""}, - {1, "Y", 0, "Y", ""}, - {2, "Z", 0, "Z", ""}, - {0, NULL, 0, NULL, NULL} - }; - srna = RNA_def_struct(brna, "ParticleInstanceModifier", "Modifier"); RNA_def_struct_ui_text(srna, "ParticleInstance Modifier", "Particle system instancing modifier"); RNA_def_struct_sdna(srna, "ParticleInstanceModifierData"); @@ -2571,7 +2576,7 @@ static void rna_def_modifier_particleinstance(BlenderRNA *brna) prop = RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "axis"); - RNA_def_property_enum_items(prop, particleinstance_axis); + RNA_def_property_enum_items(prop, rna_enum_axis_xyz_items); RNA_def_property_ui_text(prop, "Axis", "Pole axis for rotation"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -3284,13 +3289,6 @@ static void rna_def_modifier_solidify(BlenderRNA *brna) static void rna_def_modifier_screw(BlenderRNA *brna) { - static EnumPropertyItem axis_items[] = { - {0, "X", 0, "X Axis", ""}, - {1, "Y", 0, "Y Axis", ""}, - {2, "Z", 0, "Z Axis", ""}, - {0, NULL, 0, NULL, NULL} - }; - StructRNA *srna; PropertyRNA *prop; @@ -3325,7 +3323,7 @@ static void rna_def_modifier_screw(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop = RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, axis_items); + RNA_def_property_enum_items(prop, rna_enum_axis_xyz_items); RNA_def_property_ui_text(prop, "Axis", "Screw axis"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -3390,13 +3388,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, rna_enum_object_axis_unsigned_items); + RNA_def_property_enum_items(prop, rna_enum_axis_xyz_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, rna_enum_object_axis_unsigned_items); + RNA_def_property_enum_items(prop, rna_enum_axis_xyz_items); RNA_def_property_ui_text(prop, "V-Axis", "Pole axis for rotation"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); |