diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 0e0267db029..4ca7493eb13 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -61,7 +61,7 @@ #include "WM_api.h" #include "WM_types.h" -EnumPropertyItem modifier_type_items[] = { +EnumPropertyItem rna_enum_object_modifier_type_items[] = { {0, "", 0, N_("Modify"), ""}, {eModifierType_DataTransfer, "DATA_TRANSFER", ICON_MOD_DATA_TRANSFER, "Data Transfer", ""}, {eModifierType_MeshCache, "MESH_CACHE", ICON_MOD_MESHDEFORM, "Mesh Cache", ""}, @@ -120,7 +120,7 @@ EnumPropertyItem modifier_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem modifier_triangulate_quad_method_items[] = { +EnumPropertyItem rna_enum_modifier_triangulate_quad_method_items[] = { {MOD_TRIANGULATE_QUAD_BEAUTY, "BEAUTY", 0, "Beauty ", "Split the quads in nice triangles, slower method"}, {MOD_TRIANGULATE_QUAD_FIXED, "FIXED", 0, "Fixed", "Split the quads on the first and third vertices"}, {MOD_TRIANGULATE_QUAD_ALTERNATE, "FIXED_ALTERNATE", 0, "Fixed Alternate", @@ -130,7 +130,7 @@ EnumPropertyItem modifier_triangulate_quad_method_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem modifier_triangulate_ngon_method_items[] = { +EnumPropertyItem rna_enum_modifier_triangulate_ngon_method_items[] = { {MOD_TRIANGULATE_NGON_BEAUTY, "BEAUTY", 0, "Beauty", "Arrange the new triangles evenly (slow)"}, {MOD_TRIANGULATE_NGON_EARCLIP, "CLIP", 0, "Clip", "Split the polygons with an ear clipping algorithm"}, {0, NULL, 0, NULL, NULL} @@ -154,7 +154,7 @@ static EnumPropertyItem modifier_warp_falloff_items[] = { /* ***** Data Transfer ***** */ -EnumPropertyItem DT_method_vertex_items[] = { +EnumPropertyItem rna_enum_dt_method_vertex_items[] = { {MREMAP_MODE_TOPOLOGY, "TOPOLOGY", 0, "Topology", "Copy from identical topology meshes"}, {MREMAP_MODE_VERT_NEAREST, "NEAREST", 0, "Nearest vertex", @@ -172,7 +172,7 @@ EnumPropertyItem DT_method_vertex_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem DT_method_edge_items[] = { +EnumPropertyItem rna_enum_dt_method_edge_items[] = { {MREMAP_MODE_TOPOLOGY, "TOPOLOGY", 0, "Topology", "Copy from identical topology meshes"}, {MREMAP_MODE_EDGE_VERT_NEAREST, "VERT_NEAREST", 0, "Nearest Vertices", @@ -186,7 +186,7 @@ EnumPropertyItem DT_method_edge_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem DT_method_loop_items[] = { +EnumPropertyItem rna_enum_dt_method_loop_items[] = { {MREMAP_MODE_TOPOLOGY, "TOPOLOGY", 0, "Topology", "Copy from identical topology meshes"}, {MREMAP_MODE_LOOP_NEAREST_LOOPNOR, "NEAREST_NORMAL", 0, "Nearest Corner And Best Matching Normal", @@ -202,7 +202,7 @@ EnumPropertyItem DT_method_loop_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem DT_method_poly_items[] = { +EnumPropertyItem rna_enum_dt_method_poly_items[] = { {MREMAP_MODE_TOPOLOGY, "TOPOLOGY", 0, "Topology", "Copy from identical topology meshes"}, {MREMAP_MODE_POLY_NEAREST, "NEAREST", 0, "Nearest Face", @@ -214,7 +214,7 @@ EnumPropertyItem DT_method_poly_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem DT_mix_mode_items[] = { +EnumPropertyItem rna_enum_dt_mix_mode_items[] = { {CDT_MIX_TRANSFER, "REPLACE", 0, "Replace", "Overwrite all elements' data"}, {CDT_MIX_REPLACE_ABOVE_THRESHOLD, "ABOVE_THRESHOLD", 0, "Above Threshold", @@ -233,7 +233,7 @@ EnumPropertyItem DT_mix_mode_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem DT_layers_select_src_items[] = { +EnumPropertyItem rna_enum_dt_layers_select_src_items[] = { {DT_LAYERS_ACTIVE_SRC, "ACTIVE", 0, "Active Layer", "Only transfer active data layer"}, {DT_LAYERS_ALL_SRC, "ALL", 0, "All Layers", @@ -245,7 +245,7 @@ EnumPropertyItem DT_layers_select_src_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem DT_layers_select_dst_items[] = { +EnumPropertyItem rna_enum_dt_layers_select_dst_items[] = { {DT_LAYERS_ACTIVE_DST, "ACTIVE", 0, "Active Layer", "Affect active data layer of all targets"}, {DT_LAYERS_NAME_DST, "NAME", 0, "By Name", @@ -864,19 +864,19 @@ static EnumPropertyItem *rna_DataTransferModifier_layers_select_src_itemf(bConte int totitem = 0; if (!C) { /* needed for docs and i18n tools */ - return DT_layers_select_src_items; + return rna_enum_dt_layers_select_src_items; } /* No active here! */ - RNA_enum_items_add_value(&item, &totitem, DT_layers_select_src_items, DT_LAYERS_ALL_SRC); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_layers_select_src_items, DT_LAYERS_ALL_SRC); if (STREQ(RNA_property_identifier(prop), "layers_vgroup_select_src")) { Object *ob_src = dtmd->ob_source; #if 0 /* XXX Don't think we want this in modifier version... */ if (BKE_object_pose_armature_get(ob_src)) { - RNA_enum_items_add_value(&item, &totitem, DT_layers_select_src_items, DT_LAYERS_VGROUP_SRC_BONE_SELECT); - RNA_enum_items_add_value(&item, &totitem, DT_layers_select_src_items, DT_LAYERS_VGROUP_SRC_BONE_DEFORM); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_layers_select_src_items, DT_LAYERS_VGROUP_SRC_BONE_SELECT); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_layers_select_src_items, DT_LAYERS_VGROUP_SRC_BONE_DEFORM); } #endif @@ -954,12 +954,12 @@ static EnumPropertyItem *rna_DataTransferModifier_layers_select_dst_itemf(bConte int totitem = 0; if (!C) { /* needed for docs and i18n tools */ - return DT_layers_select_dst_items; + return rna_enum_dt_layers_select_dst_items; } /* No active here! */ - RNA_enum_items_add_value(&item, &totitem, DT_layers_select_dst_items, DT_LAYERS_NAME_DST); - RNA_enum_items_add_value(&item, &totitem, DT_layers_select_dst_items, DT_LAYERS_INDEX_DST); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_layers_select_dst_items, DT_LAYERS_NAME_DST); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_layers_select_dst_items, DT_LAYERS_INDEX_DST); if (STREQ(RNA_property_identifier(prop), "layers_vgroup_select_dst")) { /* Only list destination layers if we have a single source! */ @@ -1048,24 +1048,24 @@ static EnumPropertyItem *rna_DataTransferModifier_mix_mode_itemf(bContext *C, Po bool support_advanced_mixing, support_threshold; if (!C) { /* needed for docs and i18n tools */ - return DT_mix_mode_items; + return rna_enum_dt_mix_mode_items; } - RNA_enum_items_add_value(&item, &totitem, DT_mix_mode_items, CDT_MIX_TRANSFER); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_mix_mode_items, CDT_MIX_TRANSFER); BKE_object_data_transfer_get_dttypes_capacity(dtmd->data_types, &support_advanced_mixing, &support_threshold); if (support_threshold) { - RNA_enum_items_add_value(&item, &totitem, DT_mix_mode_items, CDT_MIX_REPLACE_ABOVE_THRESHOLD); - RNA_enum_items_add_value(&item, &totitem, DT_mix_mode_items, CDT_MIX_REPLACE_BELOW_THRESHOLD); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_mix_mode_items, CDT_MIX_REPLACE_ABOVE_THRESHOLD); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_mix_mode_items, CDT_MIX_REPLACE_BELOW_THRESHOLD); } if (support_advanced_mixing) { RNA_enum_item_add_separator(&item, &totitem); - RNA_enum_items_add_value(&item, &totitem, DT_mix_mode_items, CDT_MIX_MIX); - RNA_enum_items_add_value(&item, &totitem, DT_mix_mode_items, CDT_MIX_ADD); - RNA_enum_items_add_value(&item, &totitem, DT_mix_mode_items, CDT_MIX_SUB); - RNA_enum_items_add_value(&item, &totitem, DT_mix_mode_items, CDT_MIX_MUL); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_mix_mode_items, CDT_MIX_MIX); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_mix_mode_items, CDT_MIX_ADD); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_mix_mode_items, CDT_MIX_SUB); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_mix_mode_items, CDT_MIX_MUL); } RNA_enum_item_end(&item, &totitem); @@ -1557,7 +1557,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, object_axis_unsigned_items); + RNA_def_property_enum_items(prop, rna_enum_object_axis_unsigned_items); RNA_def_property_ui_text(prop, "Axis", "Axis of symmetry"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -1577,7 +1577,7 @@ static void rna_def_modifier_decimate(BlenderRNA *brna) prop = RNA_def_property(srna, "delimit", PROP_ENUM, PROP_NONE); RNA_def_property_flag(prop, PROP_ENUM_FLAG); /* important to run before default set */ - RNA_def_property_enum_items(prop, mesh_delimit_mode_items); + RNA_def_property_enum_items(prop, rna_enum_mesh_delimit_mode_items); RNA_def_property_ui_text(prop, "Delimit", "Limit merging geometry"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -2756,7 +2756,7 @@ static void rna_def_modifier_dynamic_paint(BlenderRNA *brna) prop = RNA_def_property(srna, "ui_type", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_enum_sdna(prop, NULL, "type"); - RNA_def_property_enum_items(prop, prop_dynamicpaint_type_items); + RNA_def_property_enum_items(prop, rna_enum_prop_dynamicpaint_type_items); RNA_def_property_ui_text(prop, "Type", ""); } @@ -3362,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, object_axis_unsigned_items); + RNA_def_property_enum_items(prop, rna_enum_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, object_axis_unsigned_items); + RNA_def_property_enum_items(prop, rna_enum_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"); @@ -4019,13 +4019,13 @@ static void rna_def_modifier_triangulate(BlenderRNA *brna) prop = RNA_def_property(srna, "quad_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "quad_method"); - RNA_def_property_enum_items(prop, modifier_triangulate_quad_method_items); + RNA_def_property_enum_items(prop, rna_enum_modifier_triangulate_quad_method_items); RNA_def_property_ui_text(prop, "Quad Method", "Method for splitting the quads into triangles"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop = RNA_def_property(srna, "ngon_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "ngon_method"); - RNA_def_property_enum_items(prop, modifier_triangulate_ngon_method_items); + RNA_def_property_enum_items(prop, rna_enum_modifier_triangulate_ngon_method_items); RNA_def_property_ui_text(prop, "Polygon Method", "Method for splitting the polygons into triangles"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); } @@ -4130,13 +4130,13 @@ static void rna_def_modifier_meshcache(BlenderRNA *brna) /* Axis Conversion */ prop = RNA_def_property(srna, "forward_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "forward_axis"); - RNA_def_property_enum_items(prop, object_axis_items); + RNA_def_property_enum_items(prop, rna_enum_object_axis_items); RNA_def_property_ui_text(prop, "Forward", ""); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop = RNA_def_property(srna, "up_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "up_axis"); - RNA_def_property_enum_items(prop, object_axis_items); + RNA_def_property_enum_items(prop, rna_enum_object_axis_items); RNA_def_property_ui_text(prop, "Up", ""); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -4399,22 +4399,22 @@ static void rna_def_modifier_datatransfer(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_DataTransferModifier_data_types_update"); /* Mapping methods. */ - prop = RNA_def_enum(srna, "vert_mapping", DT_method_vertex_items, MREMAP_MODE_VERT_NEAREST, "Vertex Mapping", + prop = RNA_def_enum(srna, "vert_mapping", rna_enum_dt_method_vertex_items, MREMAP_MODE_VERT_NEAREST, "Vertex Mapping", "Method used to map source vertices to destination ones"); RNA_def_property_enum_sdna(prop, NULL, "vmap_mode"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop = RNA_def_enum(srna, "edge_mapping", DT_method_edge_items, MREMAP_MODE_EDGE_NEAREST, "Edge Mapping", + prop = RNA_def_enum(srna, "edge_mapping", rna_enum_dt_method_edge_items, MREMAP_MODE_EDGE_NEAREST, "Edge Mapping", "Method used to map source edges to destination ones"); RNA_def_property_enum_sdna(prop, NULL, "emap_mode"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop = RNA_def_enum(srna, "loop_mapping", DT_method_loop_items, MREMAP_MODE_LOOP_NEAREST_POLYNOR, + prop = RNA_def_enum(srna, "loop_mapping", rna_enum_dt_method_loop_items, MREMAP_MODE_LOOP_NEAREST_POLYNOR, "Face Corner Mapping", "Method used to map source faces' corners to destination ones"); RNA_def_property_enum_sdna(prop, NULL, "lmap_mode"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop = RNA_def_enum(srna, "poly_mapping", DT_method_poly_items, MREMAP_MODE_POLY_NEAREST, "Face Mapping", + prop = RNA_def_enum(srna, "poly_mapping", rna_enum_dt_method_poly_items, MREMAP_MODE_POLY_NEAREST, "Face Mapping", "Method used to map source faces to destination ones"); RNA_def_property_enum_sdna(prop, NULL, "pmap_mode"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -4445,60 +4445,60 @@ static void rna_def_modifier_datatransfer(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Modifier_update"); /* How to handle multi-layers types of data. */ - prop = RNA_def_enum(srna, "layers_vgroup_select_src", DT_layers_select_src_items, DT_LAYERS_ALL_SRC, + prop = RNA_def_enum(srna, "layers_vgroup_select_src", rna_enum_dt_layers_select_src_items, DT_LAYERS_ALL_SRC, "Source Layers Selection", "Which layers to transfer, in case of multi-layers types"); RNA_def_property_enum_sdna(prop, NULL, "layers_select_src[DT_MULTILAYER_INDEX_MDEFORMVERT]"); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_DataTransferModifier_layers_select_src_itemf"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); #if 0 - prop = RNA_def_enum(srna, "layers_shapekey_select_src", DT_layers_select_src_items, DT_LAYERS_ALL_SRC, + prop = RNA_def_enum(srna, "layers_shapekey_select_src", rna_enum_dt_layers_select_src_items, DT_LAYERS_ALL_SRC, "Source Layers Selection", "Which layers to transfer, in case of multi-layers types"); RNA_def_property_enum_sdna(prop, NULL, "layers_select_src[DT_MULTILAYER_INDEX_SHAPEKEY]"); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_DataTransferModifier_layers_select_src_itemf"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); #endif - prop = RNA_def_enum(srna, "layers_vcol_select_src", DT_layers_select_src_items, DT_LAYERS_ALL_SRC, + prop = RNA_def_enum(srna, "layers_vcol_select_src", rna_enum_dt_layers_select_src_items, DT_LAYERS_ALL_SRC, "Source Layers Selection", "Which layers to transfer, in case of multi-layers types"); RNA_def_property_enum_sdna(prop, NULL, "layers_select_src[DT_MULTILAYER_INDEX_VCOL]"); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_DataTransferModifier_layers_select_src_itemf"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop = RNA_def_enum(srna, "layers_uv_select_src", DT_layers_select_src_items, DT_LAYERS_ALL_SRC, + prop = RNA_def_enum(srna, "layers_uv_select_src", rna_enum_dt_layers_select_src_items, DT_LAYERS_ALL_SRC, "Source Layers Selection", "Which layers to transfer, in case of multi-layers types"); RNA_def_property_enum_sdna(prop, NULL, "layers_select_src[DT_MULTILAYER_INDEX_UV]"); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_DataTransferModifier_layers_select_src_itemf"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop = RNA_def_enum(srna, "layers_vgroup_select_dst", DT_layers_select_dst_items, DT_LAYERS_NAME_DST, + prop = RNA_def_enum(srna, "layers_vgroup_select_dst", rna_enum_dt_layers_select_dst_items, DT_LAYERS_NAME_DST, "Destination Layers Matching", "How to match source and destination layers"); RNA_def_property_enum_sdna(prop, NULL, "layers_select_dst[DT_MULTILAYER_INDEX_MDEFORMVERT]"); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_DataTransferModifier_layers_select_dst_itemf"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); #if 0 - prop = RNA_def_enum(srna, "layers_shapekey_select_dst", DT_layers_select_dst_items, DT_LAYERS_NAME_DST, + prop = RNA_def_enum(srna, "layers_shapekey_select_dst", rna_enum_dt_layers_select_dst_items, DT_LAYERS_NAME_DST, "Destination Layers Matching", "How to match source and destination layers"); RNA_def_property_enum_sdna(prop, NULL, "layers_select_dst[DT_MULTILAYER_INDEX_SHAPEKEY]"); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_DataTransferModifier_layers_select_dst_itemf"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); #endif - prop = RNA_def_enum(srna, "layers_vcol_select_dst", DT_layers_select_dst_items, DT_LAYERS_NAME_DST, + prop = RNA_def_enum(srna, "layers_vcol_select_dst", rna_enum_dt_layers_select_dst_items, DT_LAYERS_NAME_DST, "Destination Layers Matching", "How to match source and destination layers"); RNA_def_property_enum_sdna(prop, NULL, "layers_select_dst[DT_MULTILAYER_INDEX_VCOL]"); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_DataTransferModifier_layers_select_dst_itemf"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop = RNA_def_enum(srna, "layers_uv_select_dst", DT_layers_select_dst_items, DT_LAYERS_NAME_DST, + prop = RNA_def_enum(srna, "layers_uv_select_dst", rna_enum_dt_layers_select_dst_items, DT_LAYERS_NAME_DST, "Destination Layers Matching", "How to match source and destination layers"); RNA_def_property_enum_sdna(prop, NULL, "layers_select_dst[DT_MULTILAYER_INDEX_UV]"); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_DataTransferModifier_layers_select_dst_itemf"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); /* Mix stuff */ - prop = RNA_def_enum(srna, "mix_mode", DT_mix_mode_items, CDT_MIX_TRANSFER, "Mix Mode", + prop = RNA_def_enum(srna, "mix_mode", rna_enum_dt_mix_mode_items, CDT_MIX_TRANSFER, "Mix Mode", "How to affect destination elements with source values"); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_DataTransferModifier_mix_mode_itemf"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -4613,7 +4613,7 @@ void RNA_def_modifier(BlenderRNA *brna) prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_sdna(prop, NULL, "type"); - RNA_def_property_enum_items(prop, modifier_type_items); + RNA_def_property_enum_items(prop, rna_enum_object_modifier_type_items); RNA_def_property_ui_text(prop, "Type", ""); /* flags */ |