From ab7ebf2b10f67b002447fb0e2cb352c2c178e128 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 18 Oct 2017 15:07:26 +1100 Subject: Cleanup: Use const for RNA EnumPropertyItem args Practically all access to enum data is read-only. --- source/blender/makesrna/intern/makesrna.c | 2 +- source/blender/makesrna/intern/rna_ID.c | 4 +- source/blender/makesrna/intern/rna_access.c | 117 +++++++------ source/blender/makesrna/intern/rna_actuator.c | 56 +++--- source/blender/makesrna/intern/rna_animation.c | 4 +- source/blender/makesrna/intern/rna_animviz.c | 2 +- source/blender/makesrna/intern/rna_armature.c | 6 +- source/blender/makesrna/intern/rna_boid.c | 4 +- source/blender/makesrna/intern/rna_brush.c | 50 +++--- source/blender/makesrna/intern/rna_camera.c | 12 +- source/blender/makesrna/intern/rna_cloth.c | 2 +- source/blender/makesrna/intern/rna_color.c | 30 ++-- source/blender/makesrna/intern/rna_constraint.c | 54 +++--- source/blender/makesrna/intern/rna_context.c | 2 +- source/blender/makesrna/intern/rna_controller.c | 4 +- source/blender/makesrna/intern/rna_curve.c | 20 +-- source/blender/makesrna/intern/rna_define.c | 20 +-- source/blender/makesrna/intern/rna_dynamicpaint.c | 26 +-- source/blender/makesrna/intern/rna_fcurve.c | 28 +-- source/blender/makesrna/intern/rna_fluidsim.c | 8 +- source/blender/makesrna/intern/rna_gpencil.c | 6 +- source/blender/makesrna/intern/rna_image.c | 6 +- .../blender/makesrna/intern/rna_internal_types.h | 7 +- source/blender/makesrna/intern/rna_key.c | 2 +- source/blender/makesrna/intern/rna_lamp.c | 26 +-- source/blender/makesrna/intern/rna_linestyle.c | 44 ++--- source/blender/makesrna/intern/rna_main_api.c | 6 +- source/blender/makesrna/intern/rna_mask.c | 12 +- source/blender/makesrna/intern/rna_material.c | 44 ++--- source/blender/makesrna/intern/rna_mesh.c | 2 +- source/blender/makesrna/intern/rna_meta.c | 2 +- source/blender/makesrna/intern/rna_modifier.c | 122 ++++++------- source/blender/makesrna/intern/rna_movieclip.c | 4 +- source/blender/makesrna/intern/rna_nla.c | 6 +- source/blender/makesrna/intern/rna_nodetree.c | 171 +++++++++--------- source/blender/makesrna/intern/rna_object.c | 36 ++-- source/blender/makesrna/intern/rna_object_api.c | 8 +- source/blender/makesrna/intern/rna_object_force.c | 30 ++-- source/blender/makesrna/intern/rna_packedfile.c | 2 +- source/blender/makesrna/intern/rna_particle.c | 70 ++++---- source/blender/makesrna/intern/rna_pose.c | 8 +- source/blender/makesrna/intern/rna_property.c | 2 +- source/blender/makesrna/intern/rna_render.c | 6 +- source/blender/makesrna/intern/rna_rigidbody.c | 8 +- source/blender/makesrna/intern/rna_rna.c | 14 +- source/blender/makesrna/intern/rna_scene.c | 194 ++++++++++----------- source/blender/makesrna/intern/rna_scene_api.c | 2 +- source/blender/makesrna/intern/rna_screen.c | 4 +- source/blender/makesrna/intern/rna_sculpt_paint.c | 30 ++-- source/blender/makesrna/intern/rna_sensor.c | 20 +-- source/blender/makesrna/intern/rna_sequencer.c | 10 +- source/blender/makesrna/intern/rna_sequencer_api.c | 2 +- source/blender/makesrna/intern/rna_smoke.c | 32 ++-- source/blender/makesrna/intern/rna_space.c | 123 ++++++------- source/blender/makesrna/intern/rna_texture.c | 75 ++++---- source/blender/makesrna/intern/rna_tracking.c | 18 +- source/blender/makesrna/intern/rna_ui.c | 8 +- source/blender/makesrna/intern/rna_ui_api.c | 16 +- source/blender/makesrna/intern/rna_userdef.c | 66 +++---- source/blender/makesrna/intern/rna_wm.c | 36 ++-- source/blender/makesrna/intern/rna_wm_api.c | 2 +- source/blender/makesrna/intern/rna_world.c | 12 +- 62 files changed, 880 insertions(+), 865 deletions(-) (limited to 'source/blender/makesrna/intern') diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 9471d0e3fcf..2c558e56412 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -2872,7 +2872,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr int i, defaultfound = 0, totflag = 0; if (eprop->item) { - fprintf(f, "static EnumPropertyItem rna_%s%s_%s_items[%d] = {\n\t", srna->identifier, + fprintf(f, "static const EnumPropertyItem rna_%s%s_%s_items[%d] = {\n\t", srna->identifier, strnest, prop->identifier, eprop->totitem + 1); for (i = 0; i < eprop->totitem; i++) { diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index bf767d47994..c748d00de84 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -48,7 +48,7 @@ /* enum of ID-block types * NOTE: need to keep this in line with the other defines for these */ -EnumPropertyItem rna_enum_id_type_items[] = { +const EnumPropertyItem rna_enum_id_type_items[] = { {ID_AC, "ACTION", ICON_ACTION, "Action", ""}, {ID_AR, "ARMATURE", ICON_ARMATURE_DATA, "Armature", ""}, {ID_BR, "BRUSH", ICON_BRUSH_DATA, "Brush", ""}, @@ -939,7 +939,7 @@ static void rna_def_ID(BlenderRNA *brna) FunctionRNA *func; PropertyRNA *prop, *parm; - static EnumPropertyItem update_flag_items[] = { + static const EnumPropertyItem update_flag_items[] = { {OB_RECALC_OB, "OBJECT", 0, "Object", ""}, {OB_RECALC_DATA, "DATA", 0, "Data", ""}, {OB_RECALC_TIME, "TIME", 0, "Time", ""}, diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index bfa1e7cef93..2c62ae52f55 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -1323,26 +1323,26 @@ int RNA_property_pointer_poll(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *va } /* Reuse for dynamic types */ -EnumPropertyItem DummyRNA_NULL_items[] = { +const EnumPropertyItem DummyRNA_NULL_items[] = { {0, NULL, 0, NULL, NULL} }; /* Reuse for dynamic types with default value */ -EnumPropertyItem DummyRNA_DEFAULT_items[] = { +const EnumPropertyItem DummyRNA_DEFAULT_items[] = { {0, "DEFAULT", 0, "Default", ""}, {0, NULL, 0, NULL, NULL} }; void RNA_property_enum_items_ex( bContext *C, PointerRNA *ptr, PropertyRNA *prop, const bool use_static, - EnumPropertyItem **r_item, int *r_totitem, bool *r_free) + const EnumPropertyItem **r_item, int *r_totitem, bool *r_free) { EnumPropertyRNA *eprop = (EnumPropertyRNA *)rna_ensure_property(prop); *r_free = false; if (!use_static && eprop->itemf && (C != NULL || (prop->flag & PROP_ENUM_NO_CONTEXT))) { - EnumPropertyItem *item; + const EnumPropertyItem *item; if (prop->flag & PROP_ENUM_NO_CONTEXT) item = eprop->itemf(NULL, ptr, prop, r_free); @@ -1370,13 +1370,15 @@ void RNA_property_enum_items_ex( } void RNA_property_enum_items( - bContext *C, PointerRNA *ptr, PropertyRNA *prop, EnumPropertyItem **r_item, int *r_totitem, bool *r_free) + bContext *C, PointerRNA *ptr, PropertyRNA *prop, + const EnumPropertyItem **r_item, int *r_totitem, bool *r_free) { RNA_property_enum_items_ex(C, ptr, prop, false, r_item, r_totitem, r_free); } #ifdef WITH_INTERNATIONAL -static void property_enum_translate(PropertyRNA *prop, EnumPropertyItem **r_item, int *r_totitem, bool *r_free) +static void property_enum_translate( + PropertyRNA *prop, EnumPropertyItem **r_item, int *r_totitem, bool *r_free) { if (!(prop->flag & PROP_ENUM_NO_TRANSLATE)) { int i; @@ -1393,7 +1395,7 @@ static void property_enum_translate(PropertyRNA *prop, EnumPropertyItem **r_item nitem = *r_item; } else { - EnumPropertyItem *item = *r_item; + const EnumPropertyItem *item = *r_item; int tot; if (r_totitem) { @@ -1426,31 +1428,36 @@ static void property_enum_translate(PropertyRNA *prop, EnumPropertyItem **r_item } #endif -void RNA_property_enum_items_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA *prop, - EnumPropertyItem **r_item, int *r_totitem, bool *r_free) +void RNA_property_enum_items_gettexted( + bContext *C, PointerRNA *ptr, PropertyRNA *prop, + const EnumPropertyItem **r_item, int *r_totitem, bool *r_free) { RNA_property_enum_items(C, ptr, prop, r_item, r_totitem, r_free); #ifdef WITH_INTERNATIONAL - property_enum_translate(prop, r_item, r_totitem, r_free); + /* Normally dropping 'const' is _not_ ok, in this case it's only modified if we own the memory + * so allow the exception (callers are creating new arrays in this case). */ + property_enum_translate(prop, (EnumPropertyItem **)r_item, r_totitem, r_free); #endif } -void RNA_property_enum_items_gettexted_all(bContext *C, PointerRNA *ptr, PropertyRNA *prop, - EnumPropertyItem **r_item, int *r_totitem, bool *r_free) +void RNA_property_enum_items_gettexted_all( + bContext *C, PointerRNA *ptr, PropertyRNA *prop, + const EnumPropertyItem **r_item, int *r_totitem, bool *r_free) { EnumPropertyRNA *eprop = (EnumPropertyRNA *)rna_ensure_property(prop); int mem_size = sizeof(EnumPropertyItem) * (eprop->totitem + 1); /* first return all items */ + EnumPropertyItem *item_array = MEM_mallocN(mem_size, "enum_gettext_all"); *r_free = true; - *r_item = MEM_mallocN(mem_size, "enum_gettext_all"); - memcpy(*r_item, eprop->item, mem_size); + memcpy(item_array, eprop->item, mem_size); - if (r_totitem) + if (r_totitem) { *r_totitem = eprop->totitem; + } if (eprop->itemf && (C != NULL || (prop->flag & PROP_ENUM_NO_CONTEXT))) { - EnumPropertyItem *item; + const EnumPropertyItem *item; int i; bool free = false; @@ -1468,30 +1475,32 @@ void RNA_property_enum_items_gettexted_all(bContext *C, PointerRNA *ptr, Propert /* items that do not exist on list are returned, but have their names/identifiers NULLed out */ for (i_fixed = 0; item[i_fixed].identifier; i_fixed++) { - if (STREQ(item[i_fixed].identifier, (*r_item)[i].identifier)) { + if (STREQ(item[i_fixed].identifier, item_array[i].identifier)) { exists = true; break; } } if (!exists) { - (*r_item)[i].name = NULL; - (*r_item)[i].identifier = ""; + item_array[i].name = NULL; + item_array[i].identifier = ""; } } - if (free) - MEM_freeN(item); + if (free) { + MEM_freeN((void *)item); + } } #ifdef WITH_INTERNATIONAL - property_enum_translate(prop, r_item, r_totitem, r_free); + property_enum_translate(prop, &item_array, r_totitem, r_free); #endif + *r_item = item_array; } bool RNA_property_enum_value(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *identifier, int *r_value) { - EnumPropertyItem *item; + const EnumPropertyItem *item; bool free; bool found; @@ -1508,7 +1517,7 @@ bool RNA_property_enum_value(bContext *C, PointerRNA *ptr, PropertyRNA *prop, co } if (free) { - MEM_freeN(item); + MEM_freeN((void *)item); } } else { @@ -1517,7 +1526,7 @@ bool RNA_property_enum_value(bContext *C, PointerRNA *ptr, PropertyRNA *prop, co return found; } -bool RNA_enum_identifier(EnumPropertyItem *item, const int value, const char **r_identifier) +bool RNA_enum_identifier(const EnumPropertyItem *item, const int value, const char **r_identifier) { const int i = RNA_enum_from_value(item, value); if (i != -1) { @@ -1529,7 +1538,7 @@ bool RNA_enum_identifier(EnumPropertyItem *item, const int value, const char **r } } -int RNA_enum_bitflag_identifiers(EnumPropertyItem *item, const int value, const char **r_identifier) +int RNA_enum_bitflag_identifiers(const EnumPropertyItem *item, const int value, const char **r_identifier) { int index = 0; for (; item->identifier; item++) { @@ -1541,7 +1550,7 @@ int RNA_enum_bitflag_identifiers(EnumPropertyItem *item, const int value, const return index; } -bool RNA_enum_name(EnumPropertyItem *item, const int value, const char **r_name) +bool RNA_enum_name(const EnumPropertyItem *item, const int value, const char **r_name) { const int i = RNA_enum_from_value(item, value); if (i != -1) { @@ -1553,7 +1562,7 @@ bool RNA_enum_name(EnumPropertyItem *item, const int value, const char **r_name) } } -bool RNA_enum_description(EnumPropertyItem *item, const int value, const char **r_description) +bool RNA_enum_description(const EnumPropertyItem *item, const int value, const char **r_description) { const int i = RNA_enum_from_value(item, value); if (i != -1) { @@ -1565,7 +1574,7 @@ bool RNA_enum_description(EnumPropertyItem *item, const int value, const char ** } } -int RNA_enum_from_identifier(EnumPropertyItem *item, const char *identifier) +int RNA_enum_from_identifier(const EnumPropertyItem *item, const char *identifier) { int i = 0; for (; item->identifier; item++, i++) { @@ -1576,7 +1585,7 @@ int RNA_enum_from_identifier(EnumPropertyItem *item, const char *identifier) return -1; } -int RNA_enum_from_value(EnumPropertyItem *item, const int value) +int RNA_enum_from_value(const EnumPropertyItem *item, const int value) { int i = 0; for (; item->identifier; item++, i++) { @@ -1590,16 +1599,16 @@ int RNA_enum_from_value(EnumPropertyItem *item, const int value) bool RNA_property_enum_identifier(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **identifier) { - EnumPropertyItem *item = NULL; + const EnumPropertyItem *item = NULL; bool free; RNA_property_enum_items(C, ptr, prop, &item, NULL, &free); if (item) { bool result; result = RNA_enum_identifier(item, value, identifier); - if (free) - MEM_freeN(item); - + if (free) { + MEM_freeN((void *)item); + } return result; } return false; @@ -1607,15 +1616,16 @@ bool RNA_property_enum_identifier(bContext *C, PointerRNA *ptr, PropertyRNA *pro bool RNA_property_enum_name(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **name) { - EnumPropertyItem *item = NULL; + const EnumPropertyItem *item = NULL; bool free; RNA_property_enum_items(C, ptr, prop, &item, NULL, &free); if (item) { bool result; result = RNA_enum_name(item, value, name); - if (free) - MEM_freeN(item); + if (free) { + MEM_freeN((void *)item); + } return result; } @@ -1643,7 +1653,7 @@ bool RNA_property_enum_item_from_value( bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, EnumPropertyItem *r_item) { - EnumPropertyItem *item = NULL; + const EnumPropertyItem *item = NULL; bool free; RNA_property_enum_items(C, ptr, prop, &item, NULL, &free); @@ -1659,8 +1669,9 @@ bool RNA_property_enum_item_from_value( result = false; } - if (free) - MEM_freeN(item); + if (free) { + MEM_freeN((void *)item); + } return result; } @@ -1687,7 +1698,7 @@ bool RNA_property_enum_item_from_value_gettexted( int RNA_property_enum_bitflag_identifiers(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **identifier) { - EnumPropertyItem *item = NULL; + const EnumPropertyItem *item = NULL; bool free; RNA_property_enum_items(C, ptr, prop, &item, NULL, &free); @@ -1695,7 +1706,7 @@ int RNA_property_enum_bitflag_identifiers(bContext *C, PointerRNA *ptr, Property int result; result = RNA_enum_bitflag_identifiers(item, value, identifier); if (free) - MEM_freeN(item); + MEM_freeN((void *)item); return result; } @@ -3038,7 +3049,7 @@ void *RNA_property_enum_py_data_get(PropertyRNA *prop) */ int RNA_property_enum_step(const bContext *C, PointerRNA *ptr, PropertyRNA *prop, int from_value, int step) { - EnumPropertyItem *item_array; + const EnumPropertyItem *item_array; int totitem; bool free; int result_value = from_value; @@ -3062,7 +3073,7 @@ int RNA_property_enum_step(const bContext *C, PointerRNA *ptr, PropertyRNA *prop } if (free) { - MEM_freeN(item_array); + MEM_freeN((void *)item_array); } return result_value; @@ -5336,7 +5347,7 @@ void RNA_enum_set_identifier(bContext *C, PointerRNA *ptr, const char *name, con bool RNA_enum_is_equal(bContext *C, PointerRNA *ptr, const char *name, const char *enumname) { PropertyRNA *prop = RNA_struct_find_property(ptr, name); - EnumPropertyItem *item; + const EnumPropertyItem *item; bool free; if (prop) { @@ -5350,7 +5361,7 @@ bool RNA_enum_is_equal(bContext *C, PointerRNA *ptr, const char *name, const cha } if (free) { - MEM_freeN(item); + MEM_freeN((void *)item); } if (i != -1) { @@ -5366,7 +5377,7 @@ bool RNA_enum_is_equal(bContext *C, PointerRNA *ptr, const char *name, const cha } } -bool RNA_enum_value_from_id(EnumPropertyItem *item, const char *identifier, int *r_value) +bool RNA_enum_value_from_id(const EnumPropertyItem *item, const char *identifier, int *r_value) { const int i = RNA_enum_from_identifier(item, identifier); if (i != -1) { @@ -5378,7 +5389,7 @@ bool RNA_enum_value_from_id(EnumPropertyItem *item, const char *identifier, int } } -bool RNA_enum_id_from_value(EnumPropertyItem *item, int value, const char **r_identifier) +bool RNA_enum_id_from_value(const EnumPropertyItem *item, int value, const char **r_identifier) { const int i = RNA_enum_from_value(item, value); if (i != -1) { @@ -5390,7 +5401,7 @@ bool RNA_enum_id_from_value(EnumPropertyItem *item, int value, const char **r_id } } -bool RNA_enum_icon_from_value(EnumPropertyItem *item, int value, int *r_icon) +bool RNA_enum_icon_from_value(const EnumPropertyItem *item, int value, int *r_icon) { const int i = RNA_enum_from_value(item, value); if (i != -1) { @@ -5402,7 +5413,7 @@ bool RNA_enum_icon_from_value(EnumPropertyItem *item, int value, int *r_icon) } } -bool RNA_enum_name_from_value(EnumPropertyItem *item, int value, const char **r_name) +bool RNA_enum_name_from_value(const EnumPropertyItem *item, int value, const char **r_name) { const int i = RNA_enum_from_value(item, value); if (i != -1) { @@ -5923,14 +5934,14 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop, in if (RNA_property_flag(prop) & PROP_ENUM_FLAG) { /* represent as a python set */ if (val) { - EnumPropertyItem *item_array; + const EnumPropertyItem *item_array; bool free; BLI_dynstr_append(dynstr, "{"); RNA_property_enum_items(C, ptr, prop, &item_array, NULL, &free); if (item_array) { - EnumPropertyItem *item = item_array; + const EnumPropertyItem *item = item_array; bool is_first = true; for (; item->identifier; item++) { if (item->identifier[0] && item->value & val) { @@ -5940,7 +5951,7 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop, in } if (free) { - MEM_freeN(item_array); + MEM_freeN((void *)item_array); } } diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c index 004acbe4dbd..26ec813a14f 100644 --- a/source/blender/makesrna/intern/rna_actuator.c +++ b/source/blender/makesrna/intern/rna_actuator.c @@ -47,7 +47,7 @@ #include "WM_types.h" /* Always keep in alphabetical order */ -static EnumPropertyItem actuator_type_items[] = { +static const EnumPropertyItem actuator_type_items[] = { {ACT_ACTION, "ACTION", 0, "Action", ""}, {ACT_ARMATURE, "ARMATURE", 0, "Armature", ""}, {ACT_CAMERA, "CAMERA", 0, "Camera", ""}, @@ -432,7 +432,7 @@ static void rna_StateActuator_state_set(PointerRNA *ptr, const int *values) } /* Always keep in alphabetical order */ -EnumPropertyItem *rna_Actuator_type_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) +const EnumPropertyItem *rna_Actuator_type_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { EnumPropertyItem *item = NULL; Object *ob = NULL; @@ -579,7 +579,7 @@ static void rna_def_action_actuator(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {ACT_ACTION_PLAY, "PLAY", 0, "Play", ""}, {ACT_ACTION_PINGPONG, "PINGPONG", 0, "Ping Pong", ""}, {ACT_ACTION_FLIPPER, "FLIPPER", 0, "Flipper", ""}, @@ -592,7 +592,7 @@ static void rna_def_action_actuator(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_blend_items[] = { + static const EnumPropertyItem prop_blend_items[] = { {ACT_ACTION_BLEND, "BLEND", 0, "Blend", ""}, {ACT_ACTION_ADD, "ADD", 0, "Add", ""}, {0, NULL, 0, NULL, NULL} @@ -714,7 +714,7 @@ static void rna_def_object_actuator(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {ACT_OBJECT_NORMAL, "OBJECT_NORMAL", 0, "Simple Motion", ""}, {ACT_OBJECT_SERVO, "OBJECT_SERVO", 0, "Servo Control", ""}, {ACT_OBJECT_CHARACTER, "OBJECT_CHARACTER", 0, "Character Motion", ""}, @@ -915,7 +915,7 @@ static void rna_def_camera_actuator(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_axis_items[] = { + static const EnumPropertyItem prop_axis_items[] = { {OB_POSX, "POS_X", 0, "+X", "Camera tries to get behind the X axis"}, {OB_POSY, "POS_Y", 0, "+Y", "Camera tries to get behind the Y axis"}, {OB_NEGX, "NEG_X", 0, "-X", "Camera tries to get behind the -X axis"}, @@ -970,7 +970,7 @@ static void rna_def_sound_actuator(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {ACT_SND_PLAY_STOP_SOUND, "PLAYSTOP", 0, "Play Stop", ""}, {ACT_SND_PLAY_END_SOUND, "PLAYEND", 0, "Play End", ""}, {ACT_SND_LOOP_STOP_SOUND, "LOOPSTOP", 0, "Loop Stop", ""}, @@ -1072,7 +1072,7 @@ static void rna_def_property_actuator(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {ACT_PROP_ASSIGN, "ASSIGN", 0, "Assign", ""}, {ACT_PROP_ADD, "ADD", 0, "Add", ""}, {ACT_PROP_COPY, "COPY", 0, "Copy", ""}, @@ -1120,7 +1120,7 @@ static void rna_def_constraint_actuator(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {ACT_CONST_TYPE_LOC, "LOC", 0, "Location Constraint", ""}, {ACT_CONST_TYPE_DIST, "DIST", 0, "Distance Constraint", ""}, {ACT_CONST_TYPE_ORI, "ORI", 0, "Orientation Constraint", ""}, @@ -1128,7 +1128,7 @@ static void rna_def_constraint_actuator(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_limit_items[] = { + static const EnumPropertyItem prop_limit_items[] = { {ACT_CONST_NONE, "NONE", 0, "None", ""}, {ACT_CONST_LOCX, "LOCX", 0, "Loc X", ""}, {ACT_CONST_LOCY, "LOCY", 0, "Loc Y", ""}, @@ -1136,7 +1136,7 @@ static void rna_def_constraint_actuator(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_direction_items[] = { + static const EnumPropertyItem prop_direction_items[] = { {ACT_CONST_NONE, "NONE", 0, "None", ""}, {ACT_CONST_DIRPX, "DIRPX", 0, "X axis", ""}, {ACT_CONST_DIRPY, "DIRPY", 0, "Y axis", ""}, @@ -1147,7 +1147,7 @@ static void rna_def_constraint_actuator(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_direction_pos_items[] = { + static const EnumPropertyItem prop_direction_pos_items[] = { {ACT_CONST_NONE, "NONE", 0, "None", ""}, {ACT_CONST_DIRPX, "DIRPX", 0, "X axis", ""}, {ACT_CONST_DIRPY, "DIRPY", 0, "Y axis", ""}, @@ -1339,7 +1339,7 @@ static void rna_def_edit_object_actuator(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_dyn_items[] = { + static const EnumPropertyItem prop_dyn_items[] = { {ACT_EDOB_RESTORE_DYN, "RESTOREDYN", 0, "Restore Dynamics", ""}, {ACT_EDOB_SUSPEND_DYN, "SUSPENDDYN", 0, "Suspend Dynamics", ""}, {ACT_EDOB_ENABLE_RB, "ENABLERIGIDBODY", 0, "Enable Rigid Body", ""}, @@ -1348,7 +1348,7 @@ static void rna_def_edit_object_actuator(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {ACT_EDOB_ADD_OBJECT, "ADDOBJECT", 0, "Add Object", ""}, {ACT_EDOB_END_OBJECT, "ENDOBJECT", 0, "End Object", ""}, {ACT_EDOB_REPLACE_MESH, "REPLACEMESH", 0, "Replace Mesh", ""}, @@ -1357,7 +1357,7 @@ static void rna_def_edit_object_actuator(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_track_axis_items[] = { + static const EnumPropertyItem prop_track_axis_items[] = { {ACT_TRACK_TRAXIS_X, "TRACKAXISX", 0, "X axis", ""}, {ACT_TRACK_TRAXIS_Y, "TRACKAXISY", 0, "Y axis", ""}, {ACT_TRACK_TRAXIS_Z, "TRACKAXISZ", 0, "Z axis", ""}, @@ -1367,7 +1367,7 @@ static void rna_def_edit_object_actuator(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_up_axis_items[] = { + static const EnumPropertyItem prop_up_axis_items[] = { {ACT_TRACK_UP_X, "UPAXISX", 0, "X axis", ""}, {ACT_TRACK_UP_Y, "UPAXISY", 0, "Y axis", ""}, {ACT_TRACK_UP_Z, "UPAXISZ", 0, "Z axis", ""}, @@ -1484,7 +1484,7 @@ static void rna_def_scene_actuator(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {ACT_SCENE_RESTART, "RESTART", 0, "Restart", ""}, {ACT_SCENE_SET, "SET", 0, "Set Scene", ""}, {ACT_SCENE_CAMERA, "CAMERA", 0, "Set Camera", ""}, @@ -1525,7 +1525,7 @@ static void rna_def_random_actuator(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_distribution_items[] = { + static const EnumPropertyItem prop_distribution_items[] = { {ACT_RANDOM_BOOL_CONST, "BOOL_CONSTANT", 0, "Bool Constant", ""}, {ACT_RANDOM_BOOL_UNIFORM, "BOOL_UNIFORM", 0, "Bool Uniform", ""}, {ACT_RANDOM_BOOL_BERNOUILLI, "BOOL_BERNOUILLI", 0, "Bool Bernoulli", ""}, @@ -1653,7 +1653,7 @@ static void rna_def_message_actuator(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_body_type_items[] = { + static const EnumPropertyItem prop_body_type_items[] = { {ACT_MESG_MESG, "TEXT", 0, "Text", ""}, {ACT_MESG_PROP, "PROPERTY", 0, "Property", ""}, {0, NULL, 0, NULL, NULL} @@ -1696,7 +1696,7 @@ static void rna_def_game_actuator(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { /* {ACT_GAME_LOAD, "LOAD", 0, "Load Game", ""}, */ /* {ACT_GAME_START, "START", 0, "Start Loaded Game", ""}, */ /* keeping the load/start hacky for compatibility with 2.49 */ @@ -1765,7 +1765,7 @@ static void rna_def_twodfilter_actuator(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {ACT_2DFILTER_ENABLED, "ENABLE", 0, "Enable Filter", ""}, {ACT_2DFILTER_DISABLED, "DISABLE", 0, "Disable Filter", ""}, {ACT_2DFILTER_NOFILTER, "REMOVE", 0, "Remove Filter", ""}, @@ -1826,7 +1826,7 @@ static void rna_def_parent_actuator(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {ACT_PARENT_SET, "SETPARENT", 0, "Set Parent", ""}, {ACT_PARENT_REMOVE, "REMOVEPARENT", 0, "Remove Parent", ""}, {0, NULL, 0, NULL, NULL} @@ -1868,7 +1868,7 @@ static void rna_def_state_actuator(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {ACT_STATE_SET, "SET", 0, "Set State", ""}, {ACT_STATE_ADD, "ADD", 0, "Add State", ""}, {ACT_STATE_REMOVE, "REMOVE", 0, "Remove State", ""}, @@ -1898,7 +1898,7 @@ static void rna_def_armature_actuator(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {ACT_ARM_RUN, "RUN", 0, "Run Armature", ""}, {ACT_ARM_ENABLE, "ENABLE", 0, "Enable", ""}, {ACT_ARM_DISABLE, "DISABLE", 0, "Disable", ""}, @@ -1961,14 +1961,14 @@ static void rna_def_steering_actuator(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {ACT_STEERING_SEEK, "SEEK", 0, "Seek", ""}, {ACT_STEERING_FLEE, "FLEE", 0, "Flee", ""}, {ACT_STEERING_PATHFOLLOWING, "PATHFOLLOWING", 0, "Path following", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem facingaxis_items[] = { + static const EnumPropertyItem facingaxis_items[] = { {1, "X", 0, "X", ""}, {2, "Y", 0, "Y", ""}, {3, "Z", 0, "Z", ""}, @@ -2070,13 +2070,13 @@ static void rna_def_mouse_actuator(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {ACT_MOUSE_VISIBILITY, "VISIBILITY", 0, "Visibility", ""}, {ACT_MOUSE_LOOK, "LOOK", 0, "Look", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_object_axis_items[] = { + static const EnumPropertyItem prop_object_axis_items[] = { {ACT_MOUSE_OBJECT_AXIS_X, "OBJECT_AXIS_X", 0, "X Axis", ""}, {ACT_MOUSE_OBJECT_AXIS_Y, "OBJECT_AXIS_Y", 0, "Y Axis", ""}, {ACT_MOUSE_OBJECT_AXIS_Z, "OBJECT_AXIS_Z", 0, "Z Axis", ""}, diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index 47b2c84a67f..d798a8f7ecc 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -47,7 +47,7 @@ #include "ED_keyframing.h" /* exported for use in API */ -EnumPropertyItem rna_enum_keyingset_path_grouping_items[] = { +const EnumPropertyItem rna_enum_keyingset_path_grouping_items[] = { {KSP_GROUP_NAMED, "NAMED", 0, "Named Group", ""}, {KSP_GROUP_NONE, "NONE", 0, "None", ""}, {KSP_GROUP_KSNAME, "KEYINGSET", 0, "Keying Set Name", ""}, @@ -57,7 +57,7 @@ EnumPropertyItem rna_enum_keyingset_path_grouping_items[] = { /* It would be cool to get rid of this 'INSERTKEY_' prefix in 'py strings' values, but it would break existing * exported keyingset... :/ */ -EnumPropertyItem rna_enum_keying_flag_items[] = { +const EnumPropertyItem rna_enum_keying_flag_items[] = { {INSERTKEY_NEEDED, "INSERTKEY_NEEDED", 0, "Only Needed", "Only insert keyframes where they're needed in the relevant F-Curves"}, {INSERTKEY_MATRIX, "INSERTKEY_VISUAL", 0, "Visual Keying", diff --git a/source/blender/makesrna/intern/rna_animviz.c b/source/blender/makesrna/intern/rna_animviz.c index eea24bfb1e0..0ae07874853 100644 --- a/source/blender/makesrna/intern/rna_animviz.c +++ b/source/blender/makesrna/intern/rna_animviz.c @@ -43,7 +43,7 @@ /* Which part of bone(s) get baked */ // TODO: icons? -EnumPropertyItem rna_enum_motionpath_bake_location_items[] = { +const EnumPropertyItem rna_enum_motionpath_bake_location_items[] = { {MOTIONPATH_BAKE_HEADS, "HEADS", 0, "Heads", "Calculate bone paths from heads"}, {0, "TAILS", 0, "Tails", "Calculate bone paths from tails"}, //{MOTIONPATH_BAKE_CENTERS, "CENTROID", 0, "Centers", "Calculate bone paths from center of mass"}, diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index ec700eb00de..cbb78f42f06 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -974,7 +974,7 @@ static void rna_def_armature(BlenderRNA *brna) FunctionRNA *func; PropertyRNA *parm; - static EnumPropertyItem prop_drawtype_items[] = { + static const EnumPropertyItem prop_drawtype_items[] = { {ARM_OCTA, "OCTAHEDRAL", 0, "Octahedral", "Display bones as octahedral shape (default)"}, {ARM_LINE, "STICK", 0, "Stick", "Display bones as simple 2D lines with dots"}, {ARM_B_BONE, "BBONE", 0, "B-Bone", "Display bones as boxes, showing subdivision and B-Splines"}, @@ -983,12 +983,12 @@ static void rna_def_armature(BlenderRNA *brna) {ARM_WIRE, "WIRE", 0, "Wire", "Display bones as thin wires, showing subdivision and B-Splines"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_vdeformer[] = { + static const EnumPropertyItem prop_vdeformer[] = { {ARM_VDEF_BLENDER, "BLENDER", 0, "Blender", "Use Blender's armature vertex deformation"}, {ARM_VDEF_BGE_CPU, "BGE_CPU", 0, "BGE", "Use vertex deformation code optimized for the BGE"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_ghost_type_items[] = { + static const EnumPropertyItem prop_ghost_type_items[] = { {ARM_GHOST_CUR, "CURRENT_FRAME", 0, "Around Frame", "Display Ghosts of poses within a fixed number of frames around the current frame"}, {ARM_GHOST_RANGE, "RANGE", 0, "In Range", "Display Ghosts of poses within specified range"}, diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c index 72f67b86c23..fd3694e7c45 100644 --- a/source/blender/makesrna/intern/rna_boid.c +++ b/source/blender/makesrna/intern/rna_boid.c @@ -48,7 +48,7 @@ #include "WM_api.h" #include "WM_types.h" -EnumPropertyItem rna_enum_boidrule_type_items[] = { +const EnumPropertyItem rna_enum_boidrule_type_items[] = { {eBoidRuleType_Goal, "GOAL", 0, "Goal", "Go to assigned object or loudest assigned signal source"}, {eBoidRuleType_Avoid, "AVOID", 0, "Avoid", "Get away from assigned object or loudest assigned signal source"}, {eBoidRuleType_AvoidCollision, "AVOID_COLLISION", 0, "Avoid Collision", @@ -71,7 +71,7 @@ EnumPropertyItem rna_enum_boidrule_type_items[] = { }; #ifndef RNA_RUNTIME -static EnumPropertyItem boidruleset_type_items[] = { +static const EnumPropertyItem boidruleset_type_items[] = { {eBoidRulesetType_Fuzzy, "FUZZY", 0, "Fuzzy", "Rules are gone through top to bottom (only the first rule which effect is above " "fuzziness threshold is evaluated)"}, diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index 294af1a4b83..78614bebceb 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -43,13 +43,13 @@ #include "WM_types.h" -static EnumPropertyItem prop_direction_items[] = { +static const EnumPropertyItem prop_direction_items[] = { {0, "ADD", 0, "Add", "Add effect of brush"}, {BRUSH_DIR_IN, "SUBTRACT", 0, "Subtract", "Subtract effect of brush"}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem sculpt_stroke_method_items[] = { +static const EnumPropertyItem sculpt_stroke_method_items[] = { {0, "DOTS", 0, "Dots", "Apply paint on each mouse move step"}, {BRUSH_DRAG_DOT, "DRAG_DOT", 0, "Drag Dot", "Allows a single dot to be carefully positioned"}, {BRUSH_SPACE, "SPACE", 0, "Space", "Limit brush application to the distance specified by spacing"}, @@ -62,7 +62,7 @@ static EnumPropertyItem sculpt_stroke_method_items[] = { }; -EnumPropertyItem rna_enum_brush_sculpt_tool_items[] = { +const EnumPropertyItem rna_enum_brush_sculpt_tool_items[] = { {SCULPT_TOOL_BLOB, "BLOB", ICON_BRUSH_BLOB, "Blob", ""}, {SCULPT_TOOL_CLAY, "CLAY", ICON_BRUSH_CLAY, "Clay", ""}, {SCULPT_TOOL_CLAY_STRIPS, "CLAY_STRIPS", ICON_BRUSH_CLAY_STRIPS, "Clay Strips", ""}, @@ -86,7 +86,7 @@ EnumPropertyItem rna_enum_brush_sculpt_tool_items[] = { }; -EnumPropertyItem rna_enum_brush_vertex_tool_items[] = { +const EnumPropertyItem rna_enum_brush_vertex_tool_items[] = { {PAINT_BLEND_MIX, "MIX", ICON_BRUSH_MIX, "Mix", "Use mix blending mode while painting"}, {PAINT_BLEND_ADD, "ADD", ICON_BRUSH_ADD, "Add", "Use add blending mode while painting"}, {PAINT_BLEND_SUB, "SUB", ICON_BRUSH_SUBTRACT, "Subtract", "Use subtract blending mode while painting"}, @@ -112,7 +112,7 @@ EnumPropertyItem rna_enum_brush_vertex_tool_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_brush_image_tool_items[] = { +const EnumPropertyItem rna_enum_brush_image_tool_items[] = { {PAINT_TOOL_DRAW, "DRAW", ICON_BRUSH_TEXDRAW, "Draw", ""}, {PAINT_TOOL_SOFTEN, "SOFTEN", ICON_BRUSH_SOFTEN, "Soften", ""}, {PAINT_TOOL_SMEAR, "SMEAR", ICON_BRUSH_SMEAR, "Smear", ""}, @@ -477,48 +477,48 @@ static void rna_Brush_set_unprojected_radius(PointerRNA *ptr, float value) brush->unprojected_radius = value; } -static EnumPropertyItem *rna_Brush_direction_itemf(bContext *C, PointerRNA *ptr, +static const EnumPropertyItem *rna_Brush_direction_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { ePaintMode mode = BKE_paintmode_get_active_from_context(C); - static EnumPropertyItem prop_default_items[] = { + static const EnumPropertyItem prop_default_items[] = { {0, NULL, 0, NULL, NULL} }; /* sculpt mode */ - static EnumPropertyItem prop_flatten_contrast_items[] = { + static const EnumPropertyItem prop_flatten_contrast_items[] = { {0, "FLATTEN", 0, "Flatten", "Add effect of brush"}, {BRUSH_DIR_IN, "CONTRAST", 0, "Contrast", "Subtract effect of brush"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_fill_deepen_items[] = { + static const EnumPropertyItem prop_fill_deepen_items[] = { {0, "FILL", 0, "Fill", "Add effect of brush"}, {BRUSH_DIR_IN, "DEEPEN", 0, "Deepen", "Subtract effect of brush"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_scrape_peaks_items[] = { + static const EnumPropertyItem prop_scrape_peaks_items[] = { {0, "SCRAPE", 0, "Scrape", "Add effect of brush"}, {BRUSH_DIR_IN, "PEAKS", 0, "Peaks", "Subtract effect of brush"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_pinch_magnify_items[] = { + static const EnumPropertyItem prop_pinch_magnify_items[] = { {0, "PINCH", 0, "Pinch", "Add effect of brush"}, {BRUSH_DIR_IN, "MAGNIFY", 0, "Magnify", "Subtract effect of brush"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_inflate_deflate_items[] = { + static const EnumPropertyItem prop_inflate_deflate_items[] = { {0, "INFLATE", 0, "Inflate", "Add effect of brush"}, {BRUSH_DIR_IN, "DEFLATE", 0, "Deflate", "Subtract effect of brush"}, {0, NULL, 0, NULL, NULL} }; /* texture paint mode */ - static EnumPropertyItem prop_soften_sharpen_items[] = { + static const EnumPropertyItem prop_soften_sharpen_items[] = { {0, "SOFTEN", 0, "Soften", "Blur effect of brush"}, {BRUSH_DIR_IN, "SHARPEN", 0, "Sharpen", "Sharpen effect of brush"}, {0, NULL, 0, NULL, NULL} @@ -583,12 +583,12 @@ static EnumPropertyItem *rna_Brush_direction_itemf(bContext *C, PointerRNA *ptr, } } -static EnumPropertyItem *rna_Brush_stroke_itemf(bContext *C, PointerRNA *UNUSED(ptr), +static const EnumPropertyItem *rna_Brush_stroke_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { ePaintMode mode = BKE_paintmode_get_active_from_context(C); - static EnumPropertyItem brush_stroke_method_items[] = { + static const EnumPropertyItem brush_stroke_method_items[] = { {0, "DOTS", 0, "Dots", "Apply paint on each mouse move step"}, {BRUSH_SPACE, "SPACE", 0, "Space", "Limit brush application to the distance specified by spacing"}, {BRUSH_AIRBRUSH, "AIRBRUSH", 0, "Airbrush", "Keep applying paint effect while holding mouse (spray)"}, @@ -614,7 +614,7 @@ static void rna_def_brush_texture_slot(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_map_mode_items[] = { + static const EnumPropertyItem prop_map_mode_items[] = { {MTEX_MAP_MODE_VIEW, "VIEW_PLANE", 0, "View Plane", ""}, {MTEX_MAP_MODE_AREA, "AREA_PLANE", 0, "Area Plane", ""}, {MTEX_MAP_MODE_TILED, "TILED", 0, "Tiled", ""}, @@ -624,7 +624,7 @@ static void rna_def_brush_texture_slot(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_tex_paint_map_mode_items[] = { + static const EnumPropertyItem prop_tex_paint_map_mode_items[] = { {MTEX_MAP_MODE_VIEW, "VIEW_PLANE", 0, "View Plane", ""}, {MTEX_MAP_MODE_TILED, "TILED", 0, "Tiled", ""}, {MTEX_MAP_MODE_3D, "3D", 0, "3D", ""}, @@ -633,7 +633,7 @@ static void rna_def_brush_texture_slot(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_mask_paint_map_mode_items[] = { + static const EnumPropertyItem prop_mask_paint_map_mode_items[] = { {MTEX_MAP_MODE_VIEW, "VIEW_PLANE", 0, "View Plane", ""}, {MTEX_MAP_MODE_TILED, "TILED", 0, "Tiled", ""}, {MTEX_MAP_MODE_RANDOM, "RANDOM", 0, "Random", ""}, @@ -799,7 +799,7 @@ static void rna_def_brush(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_blend_items[] = { + static const EnumPropertyItem prop_blend_items[] = { {IMB_BLEND_MIX, "MIX", 0, "Mix", "Use mix blending mode while painting"}, {IMB_BLEND_ADD, "ADD", 0, "Add", "Use add blending mode while painting"}, {IMB_BLEND_SUB, "SUB", 0, "Subtract", "Use subtract blending mode while painting"}, @@ -827,7 +827,7 @@ static void rna_def_brush(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem brush_sculpt_plane_items[] = { + static const EnumPropertyItem brush_sculpt_plane_items[] = { {SCULPT_DISP_DIR_AREA, "AREA", 0, "Area Plane", ""}, {SCULPT_DISP_DIR_VIEW, "VIEW", 0, "View Plane", ""}, {SCULPT_DISP_DIR_X, "X", 0, "X Plane", ""}, @@ -836,32 +836,32 @@ static void rna_def_brush(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem brush_mask_tool_items[] = { + static const EnumPropertyItem brush_mask_tool_items[] = { {BRUSH_MASK_DRAW, "DRAW", 0, "Draw", ""}, {BRUSH_MASK_SMOOTH, "SMOOTH", 0, "Smooth", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem brush_blur_mode_items[] = { + static const EnumPropertyItem brush_blur_mode_items[] = { {KERNEL_BOX, "BOX", 0, "Box", ""}, {KERNEL_GAUSSIAN, "GAUSSIAN", 0, "Gaussian", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem brush_gradient_items[] = { + static const EnumPropertyItem brush_gradient_items[] = { {BRUSH_GRADIENT_PRESSURE, "PRESSURE", 0, "Pressure", ""}, {BRUSH_GRADIENT_SPACING_REPEAT, "SPACING_REPEAT", 0, "Repeat", ""}, {BRUSH_GRADIENT_SPACING_CLAMP, "SPACING_CLAMP", 0, "Clamp", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem brush_gradient_fill_items[] = { + static const EnumPropertyItem brush_gradient_fill_items[] = { {BRUSH_GRADIENT_LINEAR, "LINEAR", 0, "Linear", ""}, {BRUSH_GRADIENT_RADIAL, "RADIAL", 0, "Radial", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem brush_mask_pressure_items[] = { + static const EnumPropertyItem brush_mask_pressure_items[] = { {0, "NONE", 0, "Off", ""}, {BRUSH_MASK_PRESSURE_RAMP, "RAMP", ICON_STYLUS_PRESSURE, "Ramp", ""}, {BRUSH_MASK_PRESSURE_CUTOFF, "CUTOFF", ICON_STYLUS_PRESSURE, "Cutoff", ""}, diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c index 078ba13d76d..68cd2902acd 100644 --- a/source/blender/makesrna/intern/rna_camera.c +++ b/source/blender/makesrna/intern/rna_camera.c @@ -101,14 +101,14 @@ static void rna_def_camera_stereo_data(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem convergence_mode_items[] = { + static const EnumPropertyItem convergence_mode_items[] = { {CAM_S3D_OFFAXIS, "OFFAXIS", 0, "Off-Axis", "Off-axis frustums converging in a plane"}, {CAM_S3D_PARALLEL, "PARALLEL", 0, "Parallel", "Parallel cameras with no convergence"}, {CAM_S3D_TOE, "TOE", 0, "Toe-in", "Rotated cameras, looking at the convergence distance"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem pivot_items[] = { + static const EnumPropertyItem pivot_items[] = { {CAM_S3D_PIVOT_LEFT, "LEFT", 0, "Left", ""}, {CAM_S3D_PIVOT_RIGHT, "RIGHT", 0, "Right", ""}, {CAM_S3D_PIVOT_CENTER, "CENTER", 0, "Center", ""}, @@ -175,13 +175,13 @@ void RNA_def_camera(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {CAM_PERSP, "PERSP", 0, "Perspective", ""}, {CAM_ORTHO, "ORTHO", 0, "Orthographic", ""}, {CAM_PANO, "PANO", 0, "Panoramic", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_draw_type_extra_items[] = { + static const EnumPropertyItem prop_draw_type_extra_items[] = { {CAM_DTX_CENTER, "CENTER", 0, "Center", ""}, {CAM_DTX_CENTER_DIAG, "CENTER_DIAGONAL", 0, "Center Diagonal", ""}, {CAM_DTX_THIRDS, "THIRDS", 0, "Thirds", ""}, @@ -192,12 +192,12 @@ void RNA_def_camera(BlenderRNA *brna) {CAM_DTX_HARMONY_TRI_B, "HARMONY_TRIANGLE_B", 0, "Harmonious Triangle B", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_lens_unit_items[] = { + static const EnumPropertyItem prop_lens_unit_items[] = { {0, "MILLIMETERS", 0, "Millimeters", "Specify the lens in millimeters"}, {CAM_ANGLETOGGLE, "FOV", 0, "Field of View", "Specify the lens as the field of view's angle"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem sensor_fit_items[] = { + static const EnumPropertyItem sensor_fit_items[] = { {CAMERA_SENSOR_FIT_AUTO, "AUTO", 0, "Auto", "Fit to the sensor width or height depending on image resolution"}, {CAMERA_SENSOR_FIT_HOR, "HORIZONTAL", 0, "Horizontal", "Fit to the sensor width"}, {CAMERA_SENSOR_FIT_VERT, "VERTICAL", 0, "Vertical", "Fit to the sensor height"}, diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c index d8bcbc2cc72..0ac5bf899a3 100644 --- a/source/blender/makesrna/intern/rna_cloth.c +++ b/source/blender/makesrna/intern/rna_cloth.c @@ -291,7 +291,7 @@ static void rna_def_cloth_solver_result(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem status_items[] = { + static const EnumPropertyItem status_items[] = { {BPH_SOLVER_SUCCESS, "SUCCESS", 0, "Success", "Computation was successful"}, {BPH_SOLVER_NUMERICAL_ISSUE, "NUMERICAL_ISSUE", 0, "Numerical Issue", "The provided data did not satisfy the prerequisites"}, {BPH_SOLVER_NO_CONVERGENCE, "NO_CONVERGENCE", 0, "No Convergence", "Iterative procedure did not converge"}, diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index 5339df34a38..51c7e93f3ef 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -420,7 +420,7 @@ static void rna_ColorManagedDisplaySettings_display_device_set(struct PointerRNA } } -static EnumPropertyItem *rna_ColorManagedDisplaySettings_display_device_itemf( +static const EnumPropertyItem *rna_ColorManagedDisplaySettings_display_device_itemf( bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { EnumPropertyItem *items = NULL; @@ -474,7 +474,7 @@ static void rna_ColorManagedViewSettings_view_transform_set(PointerRNA *ptr, int } } -static EnumPropertyItem *rna_ColorManagedViewSettings_view_transform_itemf( +static const EnumPropertyItem *rna_ColorManagedViewSettings_view_transform_itemf( bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { Scene *scene = CTX_data_scene(C); @@ -507,7 +507,7 @@ static void rna_ColorManagedViewSettings_look_set(PointerRNA *ptr, int value) } } -static EnumPropertyItem *rna_ColorManagedViewSettings_look_itemf( +static const EnumPropertyItem *rna_ColorManagedViewSettings_look_itemf( bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { ColorManagedViewSettings *view = (ColorManagedViewSettings *) ptr->data; @@ -560,7 +560,7 @@ static void rna_ColorManagedColorspaceSettings_colorspace_set(struct PointerRNA } } -static EnumPropertyItem *rna_ColorManagedColorspaceSettings_colorspace_itemf( +static const EnumPropertyItem *rna_ColorManagedColorspaceSettings_colorspace_itemf( bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { EnumPropertyItem *items = NULL; @@ -689,7 +689,7 @@ static void rna_def_curvemappoint(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_handle_type_items[] = { + static const EnumPropertyItem prop_handle_type_items[] = { {0, "AUTO", 0, "Auto Handle", ""}, {CUMA_HANDLE_AUTO_ANIM, "AUTO_CLAMPED", 0, "Auto Clamped Handle", ""}, {CUMA_HANDLE_VECTOR, "VECTOR", 0, "Vector Handle", ""}, @@ -748,7 +748,7 @@ static void rna_def_curvemap(BlenderRNA *brna) PropertyRNA *prop, *parm; FunctionRNA *func; - static EnumPropertyItem prop_extend_items[] = { + static const EnumPropertyItem prop_extend_items[] = { {0, "HORIZONTAL", 0, "Horizontal", ""}, {CUMA_EXTEND_EXTRAPOLATE, "EXTRAPOLATED", 0, "Extrapolated", ""}, {0, NULL, 0, NULL, NULL} @@ -911,7 +911,7 @@ static void rna_def_color_ramp(BlenderRNA *brna) FunctionRNA *func; PropertyRNA *parm; - static EnumPropertyItem prop_interpolation_items[] = { + static const EnumPropertyItem prop_interpolation_items[] = { {COLBAND_INTERP_EASE, "EASE", 0, "Ease", ""}, {COLBAND_INTERP_CARDINAL, "CARDINAL", 0, "Cardinal", ""}, {COLBAND_INTERP_LINEAR, "LINEAR", 0, "Linear", ""}, @@ -920,14 +920,14 @@ static void rna_def_color_ramp(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_mode_items[] = { + static const EnumPropertyItem prop_mode_items[] = { {COLBAND_BLEND_RGB, "RGB", 0, "RGB", ""}, {COLBAND_BLEND_HSV, "HSV", 0, "HSV", ""}, {COLBAND_BLEND_HSL, "HSL", 0, "HSL", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_hsv_items[] = { + static const EnumPropertyItem prop_hsv_items[] = { {COLBAND_HUE_NEAR, "NEAR", 0, "Near", ""}, {COLBAND_HUE_FAR, "FAR", 0, "Far", ""}, {COLBAND_HUE_CW, "CW", 0, "Clockwise", ""}, @@ -991,7 +991,7 @@ static void rna_def_histogram(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_mode_items[] = { + static const EnumPropertyItem prop_mode_items[] = { {HISTO_MODE_LUMA, "LUMA", 0, "Luma", "Luma"}, {HISTO_MODE_RGB, "RGB", 0, "RGB", "Red Green Blue"}, {HISTO_MODE_R, "R", 0, "R", "Red"}, @@ -1020,7 +1020,7 @@ static void rna_def_scopes(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_wavefrm_mode_items[] = { + static const EnumPropertyItem prop_wavefrm_mode_items[] = { {SCOPES_WAVEFRM_LUMA, "LUMA", ICON_COLOR, "Luma", ""}, {SCOPES_WAVEFRM_RGB_PARADE, "PARADE", ICON_COLOR, "Parade", ""}, {SCOPES_WAVEFRM_YCC_601, "YCBCR601", ICON_COLOR, "YCbCr (ITU 601)", ""}, @@ -1072,22 +1072,22 @@ static void rna_def_colormanage(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem display_device_items[] = { + static const EnumPropertyItem display_device_items[] = { {0, "DEFAULT", 0, "Default", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem look_items[] = { + static const EnumPropertyItem look_items[] = { {0, "NONE", 0, "None", "Do not modify image in an artistic manner"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem view_transform_items[] = { + static const EnumPropertyItem view_transform_items[] = { {0, "NONE", 0, "None", "Do not perform any color transform on display, use old non-color managed technique for display"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem color_space_items[] = { + static const EnumPropertyItem color_space_items[] = { {0, "NONE", 0, "None", "Do not perform any color transform on load, treat colors as in scene linear space already"}, {0, NULL, 0, NULL, NULL} }; diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index de1a0f24c31..bef121cd535 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -46,7 +46,7 @@ #include "ED_object.h" /* please keep the names in sync with constraint.c */ -EnumPropertyItem rna_enum_constraint_type_items[] = { +const EnumPropertyItem rna_enum_constraint_type_items[] = { {0, "", 0, N_("Motion Tracking"), ""}, {CONSTRAINT_TYPE_CAMERASOLVER, "CAMERA_SOLVER", ICON_CONSTRAINT_DATA, "Camera Solver", ""}, {CONSTRAINT_TYPE_FOLLOWTRACK, "FOLLOW_TRACK", ICON_CONSTRAINT_DATA, "Follow Track", ""}, @@ -109,7 +109,7 @@ EnumPropertyItem rna_enum_constraint_type_items[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem target_space_pchan_items[] = { +static const EnumPropertyItem target_space_pchan_items[] = { {CONSTRAINT_SPACE_WORLD, "WORLD", 0, "World Space", "The transformation of the target is evaluated relative to the world " "coordinate system"}, @@ -125,7 +125,7 @@ static EnumPropertyItem target_space_pchan_items[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem owner_space_pchan_items[] = { +static const EnumPropertyItem owner_space_pchan_items[] = { {CONSTRAINT_SPACE_WORLD, "WORLD", 0, "World Space", "The constraint is applied relative to the world coordinate system"}, {CONSTRAINT_SPACE_POSE, "POSE", 0, "Pose Space", @@ -140,7 +140,7 @@ static EnumPropertyItem owner_space_pchan_items[] = { #ifdef RNA_RUNTIME -static EnumPropertyItem space_object_items[] = { +static const EnumPropertyItem space_object_items[] = { {CONSTRAINT_SPACE_WORLD, "WORLD", 0, "World Space", "The transformation of the target is evaluated relative to the world coordinate system"}, {CONSTRAINT_SPACE_LOCAL, "LOCAL", 0, "Local Space", @@ -316,7 +316,7 @@ static void rna_Constraint_ik_type_set(struct PointerRNA *ptr, int value) } } -static EnumPropertyItem *rna_Constraint_owner_space_itemf(bContext *UNUSED(C), PointerRNA *ptr, +static const EnumPropertyItem *rna_Constraint_owner_space_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { Object *ob = (Object *)ptr->id.data; @@ -328,7 +328,7 @@ static EnumPropertyItem *rna_Constraint_owner_space_itemf(bContext *UNUSED(C), P return space_object_items; } -static EnumPropertyItem *rna_Constraint_target_space_itemf(bContext *UNUSED(C), PointerRNA *ptr, +static const EnumPropertyItem *rna_Constraint_target_space_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { bConstraint *con = (bConstraint *)ptr->data; @@ -494,7 +494,7 @@ static void rna_Constraint_transformCache_object_path_update(Main *bmain, Scene #else -static EnumPropertyItem constraint_distance_items[] = { +static const EnumPropertyItem constraint_distance_items[] = { {LIMITDIST_INSIDE, "LIMITDIST_INSIDE", 0, "Inside", "The object is constrained inside a virtual sphere around the target object, " "with a radius defined by the limit distance"}, @@ -659,13 +659,13 @@ static void rna_def_constraint_kinematic(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem constraint_ik_axisref_items[] = { + static const EnumPropertyItem constraint_ik_axisref_items[] = { {0, "BONE", 0, "Bone", ""}, {CONSTRAINT_IK_TARGETAXIS, "TARGET", 0, "Target", ""}, {0, NULL, 0, NULL, NULL}, }; - static EnumPropertyItem constraint_ik_type_items[] = { + static const EnumPropertyItem constraint_ik_type_items[] = { {CONSTRAINT_IK_COPYPOSE, "COPY_POSE", 0, "Copy Pose", ""}, {CONSTRAINT_IK_DISTANCE, "DISTANCE", 0, "Distance", ""}, {0, NULL, 0, NULL, NULL}, @@ -807,7 +807,7 @@ static void rna_def_constraint_track_to(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem track_items[] = { + static const EnumPropertyItem track_items[] = { {TRACK_X, "TRACK_X", 0, "X", ""}, {TRACK_Y, "TRACK_Y", 0, "Y", ""}, {TRACK_Z, "TRACK_Z", 0, "Z", ""}, @@ -817,7 +817,7 @@ static void rna_def_constraint_track_to(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem up_items[] = { + static const EnumPropertyItem up_items[] = { {TRACK_X, "UP_X", 0, "X", ""}, {TRACK_Y, "UP_Y", 0, "Y", ""}, {TRACK_Z, "UP_Z", 0, "Z", ""}, @@ -1023,7 +1023,7 @@ static void rna_def_constraint_same_volume(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem volume_items[] = { + static const EnumPropertyItem volume_items[] = { {SAMEVOL_X, "SAMEVOL_X", 0, "X", ""}, {SAMEVOL_Y, "SAMEVOL_Y", 0, "Y", ""}, {SAMEVOL_Z, "SAMEVOL_Z", 0, "Z", ""}, @@ -1077,7 +1077,7 @@ static void rna_def_constraint_minmax(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem minmax_items[] = { + static const EnumPropertyItem minmax_items[] = { {TRACK_X, "FLOOR_X", 0, "X", ""}, {TRACK_Y, "FLOOR_Y", 0, "Y", ""}, {TRACK_Z, "FLOOR_Z", 0, "Z", ""}, @@ -1129,7 +1129,7 @@ static void rna_def_constraint_action(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem transform_channel_items[] = { + static const EnumPropertyItem transform_channel_items[] = { {20, "LOCATION_X", 0, "X Location", ""}, {21, "LOCATION_Y", 0, "Y Location", ""}, {22, "LOCATION_Z", 0, "Z Location", ""}, @@ -1210,7 +1210,7 @@ static void rna_def_constraint_locked_track(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem locktrack_items[] = { + static const EnumPropertyItem locktrack_items[] = { {TRACK_X, "TRACK_X", 0, "X", ""}, {TRACK_Y, "TRACK_Y", 0, "Y", ""}, {TRACK_Z, "TRACK_Z", 0, "Z", ""}, @@ -1220,7 +1220,7 @@ static void rna_def_constraint_locked_track(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem lock_items[] = { + static const EnumPropertyItem lock_items[] = { {TRACK_X, "LOCK_X", 0, "X", ""}, {TRACK_Y, "LOCK_Y", 0, "Y", ""}, {TRACK_Z, "LOCK_Z", 0, "Z", ""}, @@ -1264,7 +1264,7 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem forwardpath_items[] = { + static const EnumPropertyItem forwardpath_items[] = { {TRACK_X, "FORWARD_X", 0, "X", ""}, {TRACK_Y, "FORWARD_Y", 0, "Y", ""}, {TRACK_Z, "FORWARD_Z", 0, "Z", ""}, @@ -1274,7 +1274,7 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem pathup_items[] = { + static const EnumPropertyItem pathup_items[] = { {TRACK_X, "UP_X", 0, "X", ""}, {TRACK_Y, "UP_Y", 0, "Y", ""}, {TRACK_Z, "UP_Z", 0, "Z", ""}, @@ -1338,7 +1338,7 @@ static void rna_def_constraint_stretch_to(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem volume_items[] = { + static const EnumPropertyItem volume_items[] = { {VOLUME_XZ, "VOLUME_XZX", 0, "XZ", ""}, {VOLUME_X, "VOLUME_X", 0, "X", ""}, {VOLUME_Z, "VOLUME_Z", 0, "Z", ""}, @@ -1346,7 +1346,7 @@ static void rna_def_constraint_stretch_to(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem plane_items[] = { + static const EnumPropertyItem plane_items[] = { {PLANE_X, "PLANE_X", 0, "X", "Keep X Axis"}, {PLANE_Z, "PLANE_Z", 0, "Z", "Keep Z Axis"}, {0, NULL, 0, NULL, NULL} @@ -1425,7 +1425,7 @@ static void rna_def_constraint_rigid_body_joint(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem pivot_items[] = { + static const EnumPropertyItem pivot_items[] = { {CONSTRAINT_RB_BALL, "BALL", 0, "Ball", "Allow rotations around all axes"}, {CONSTRAINT_RB_HINGE, "HINGE", 0, "Hinge", "Work in one plane, allow rotations around one axis only"}, {CONSTRAINT_RB_CONETWIST, "CONE_TWIST", 0, "Cone Twist", @@ -1597,7 +1597,7 @@ static void rna_def_constraint_clamp_to(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem clamp_items[] = { + static const EnumPropertyItem clamp_items[] = { {CLAMPTO_AUTO, "CLAMPTO_AUTO", 0, "Auto", ""}, {CLAMPTO_X, "CLAMPTO_X", 0, "X", ""}, {CLAMPTO_Y, "CLAMPTO_Y", 0, "Y", ""}, @@ -1634,7 +1634,7 @@ static void rna_def_constraint_transform(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem transform_items[] = { + static const EnumPropertyItem transform_items[] = { {TRANS_LOCATION, "LOCATION", 0, "Loc", ""}, {TRANS_ROTATION, "ROTATION", 0, "Rot", ""}, {TRANS_SCALE, "SCALE", 0, "Scale", ""}, @@ -2185,7 +2185,7 @@ static void rna_def_constraint_shrinkwrap(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem type_items[] = { + static const EnumPropertyItem type_items[] = { {MOD_SHRINKWRAP_NEAREST_SURFACE, "NEAREST_SURFACE", 0, "Nearest Surface Point", "Shrink the location to the nearest target surface"}, {MOD_SHRINKWRAP_PROJECT, "PROJECT", 0, "Project", @@ -2244,7 +2244,7 @@ static void rna_def_constraint_damped_track(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem damptrack_items[] = { + static const EnumPropertyItem damptrack_items[] = { {TRACK_X, "TRACK_X", 0, "X", ""}, {TRACK_Y, "TRACK_Y", 0, "Y", ""}, {TRACK_Z, "TRACK_Z", 0, "Z", ""}, @@ -2285,7 +2285,7 @@ static void rna_def_constraint_spline_ik(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem splineik_xz_scale_mode[] = { + static const EnumPropertyItem splineik_xz_scale_mode[] = { {CONSTRAINT_SPLINEIK_XZS_NONE, "NONE", 0, "None", "Don't scale the X and Z axes (Default)"}, {CONSTRAINT_SPLINEIK_XZS_ORIGINAL, "BONE_ORIGINAL", 0, "Bone Original", "Use the original scaling of the bones"}, @@ -2398,7 +2398,7 @@ static void rna_def_constraint_pivot(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem pivot_rotAxis_items[] = { + static const EnumPropertyItem pivot_rotAxis_items[] = { {PIVOTCON_AXIS_NONE, "ALWAYS_ACTIVE", 0, "Always", "Use the pivot point in every rotation"}, {PIVOTCON_AXIS_X_NEG, "NX", 0, "-X Rot", "Use the pivot point in the negative rotation range around the X-axis"}, diff --git a/source/blender/makesrna/intern/rna_context.c b/source/blender/makesrna/intern/rna_context.c index d7a679e9702..4bbf31d6500 100644 --- a/source/blender/makesrna/intern/rna_context.c +++ b/source/blender/makesrna/intern/rna_context.c @@ -134,7 +134,7 @@ void RNA_def_context(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem mode_items[] = { + static const EnumPropertyItem mode_items[] = { {CTX_MODE_EDIT_MESH, "EDIT_MESH", 0, "Mesh Edit", ""}, {CTX_MODE_EDIT_CURVE, "EDIT_CURVE", 0, "Curve Edit", ""}, {CTX_MODE_EDIT_SURFACE, "EDIT_SURFACE", 0, "Surface Edit", ""}, diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c index 3fa9d7ef270..bdb3daedebb 100644 --- a/source/blender/makesrna/intern/rna_controller.c +++ b/source/blender/makesrna/intern/rna_controller.c @@ -41,7 +41,7 @@ #include "WM_types.h" -EnumPropertyItem rna_enum_controller_type_items[] = { +const EnumPropertyItem rna_enum_controller_type_items[] = { {CONT_LOGIC_AND, "LOGIC_AND", 0, "And", "Logic And"}, {CONT_LOGIC_OR, "LOGIC_OR", 0, "Or", "Logic Or"}, {CONT_LOGIC_NAND, "LOGIC_NAND", 0, "Nand", "Logic Nand"}, @@ -190,7 +190,7 @@ void RNA_def_controller(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem python_controller_modes[] = { + static const EnumPropertyItem python_controller_modes[] = { {CONT_PY_SCRIPT, "SCRIPT", 0, "Script", ""}, {CONT_PY_MODULE, "MODULE", 0, "Module", ""}, {0, NULL, 0, NULL, NULL} diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 7787533d311..45b312a742d 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -47,7 +47,7 @@ #include "WM_types.h" #ifndef RNA_RUNTIME -static EnumPropertyItem beztriple_handle_type_items[] = { +static const EnumPropertyItem beztriple_handle_type_items[] = { {HD_FREE, "FREE", 0, "Free", ""}, {HD_VECT, "VECTOR", 0, "Vector", ""}, {HD_ALIGN, "ALIGNED", 0, "Aligned", ""}, @@ -56,7 +56,7 @@ static EnumPropertyItem beztriple_handle_type_items[] = { }; #endif -EnumPropertyItem rna_enum_keyframe_handle_type_items[] = { +const EnumPropertyItem rna_enum_keyframe_handle_type_items[] = { {HD_FREE, "FREE", 0, "Free", ""}, {HD_VECT, "VECTOR", 0, "Vector", ""}, {HD_ALIGN, "ALIGNED", 0, "Aligned", ""}, @@ -65,7 +65,7 @@ EnumPropertyItem rna_enum_keyframe_handle_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_beztriple_interpolation_mode_items[] = { +const EnumPropertyItem rna_enum_beztriple_interpolation_mode_items[] = { /* interpolation */ {0, "", 0, N_("Interpolation"), "Standard transitions between keyframes"}, {BEZT_IPO_CONST, "CONSTANT", ICON_IPO_CONSTANT, "Constant", "No interpolation, value of A gets held until B is encountered"}, @@ -91,7 +91,7 @@ EnumPropertyItem rna_enum_beztriple_interpolation_mode_items[] = { }; #ifndef RNA_RUNTIME -static EnumPropertyItem curve_type_items[] = { +static const EnumPropertyItem curve_type_items[] = { {CU_POLY, "POLY", 0, "Poly", ""}, {CU_BEZIER, "BEZIER", 0, "Bezier", ""}, {CU_BSPLINE, "BSPLINE", 0, "BSpline", ""}, @@ -300,7 +300,7 @@ static void rna_Curve_dimension_set(PointerRNA *ptr, int value) BKE_curve_curve_dimension_update(cu); } -static EnumPropertyItem *rna_Curve_fill_mode_itemf(bContext *UNUSED(C), PointerRNA *ptr, +static const EnumPropertyItem *rna_Curve_fill_mode_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { Curve *cu = (Curve *)ptr->id.data; @@ -953,7 +953,7 @@ static void rna_def_font(BlenderRNA *UNUSED(brna), StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem prop_align_items[] = { + static const EnumPropertyItem prop_align_items[] = { {CU_ALIGN_X_LEFT, "LEFT", 0, "Left", "Align text to the left"}, {CU_ALIGN_X_MIDDLE, "CENTER", 0, "Center", "Center text"}, {CU_ALIGN_X_RIGHT, "RIGHT", 0, "Right", "Align text to the right"}, @@ -962,7 +962,7 @@ static void rna_def_font(BlenderRNA *UNUSED(brna), StructRNA *srna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_align_y_items[] = { + static const EnumPropertyItem prop_align_y_items[] = { {CU_ALIGN_Y_TOP_BASELINE, "TOP_BASELINE", 0, "Top Base-Line", "Align to top but use the base-line of the text"}, {CU_ALIGN_Y_TOP, "TOP", 0, "Top", "Align text to the top"}, {CU_ALIGN_Y_CENTER, "CENTER", 0, "Center", "Align text to the middle"}, @@ -1334,7 +1334,7 @@ static void rna_def_curve(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem curve_twist_mode_items[] = { + static const EnumPropertyItem curve_twist_mode_items[] = { {CU_TWIST_Z_UP, "Z_UP", 0, "Z-Up", "Use Z-Up axis to calculate the curve twist at each point"}, {CU_TWIST_MINIMUM, "MINIMUM", 0, "Minimum", "Use the least twist over the entire curve"}, {CU_TWIST_TANGENT, "TANGENT", 0, "Tangent", "Use the tangent to calculate twist"}, @@ -1348,7 +1348,7 @@ static void rna_def_curve(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem bevfac_mapping_items[] = { + static const EnumPropertyItem bevfac_mapping_items[] = { {CU_BEVFAC_MAP_RESOLU, "RESOLUTION", 0, "Resolution", "Map the bevel factor to the number of subdivisions of a spline (U resolution)"}, {CU_BEVFAC_MAP_SEGMENT, "SEGMENTS", 0, "Segments", "Map the bevel factor to the length of a segment and to the number of subdivisions of a segment"}, {CU_BEVFAC_MAP_SPLINE, "SPLINE", 0, "Spline", "Map the bevel factor to the length of a spline"}, @@ -1600,7 +1600,7 @@ static void rna_def_curve(BlenderRNA *brna) static void rna_def_curve_nurb(BlenderRNA *brna) { - static EnumPropertyItem spline_interpolation_items[] = { + static const EnumPropertyItem spline_interpolation_items[] = { {KEY_LINEAR, "LINEAR", 0, "Linear", ""}, {KEY_CARDINAL, "CARDINAL", 0, "Cardinal", ""}, {KEY_BSPLINE, "BSPLINE", 0, "BSpline", ""}, diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 118dd0b15de..fd511655c5f 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -3284,17 +3284,17 @@ void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropert void RNA_enum_item_add_separator(EnumPropertyItem **items, int *totitem) { - static EnumPropertyItem sepr = {0, "", 0, NULL, NULL}; + static const EnumPropertyItem sepr = {0, "", 0, NULL, NULL}; RNA_enum_item_add(items, totitem, &sepr); } -void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, EnumPropertyItem *item) +void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item) { for (; item->identifier; item++) RNA_enum_item_add(items, totitem, item); } -void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, EnumPropertyItem *item, int value) +void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item, int value) { for (; item->identifier; item++) { if (item->value == value) { @@ -3308,7 +3308,7 @@ void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, EnumProper void RNA_enum_item_end(EnumPropertyItem **items, int *totitem) { - static EnumPropertyItem empty = {0, NULL, 0, NULL, NULL}; + static const EnumPropertyItem empty = {0, NULL, 0, NULL, NULL}; RNA_enum_item_add(items, totitem, &empty); } @@ -3425,12 +3425,12 @@ void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA eprop->item = earray; for (a = 0; a < eprop->totitem; a++) { - if (eprop->item[a].identifier) - eprop->item[a].identifier = BLI_strdup(eprop->item[a].identifier); - if (eprop->item[a].name) - eprop->item[a].name = BLI_strdup(eprop->item[a].name); - if (eprop->item[a].description) - eprop->item[a].description = BLI_strdup(eprop->item[a].description); + if (earray[a].identifier) + earray[a].identifier = BLI_strdup(earray[a].identifier); + if (earray[a].name) + earray[a].name = BLI_strdup(earray[a].name); + if (earray[a].description) + earray[a].description = BLI_strdup(earray[a].description); } } break; diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c index 4bb7f3a9ffd..fb8389fc2e9 100644 --- a/source/blender/makesrna/intern/rna_dynamicpaint.c +++ b/source/blender/makesrna/intern/rna_dynamicpaint.c @@ -45,7 +45,7 @@ #include "WM_types.h" -EnumPropertyItem rna_enum_prop_dynamicpaint_type_items[] = { +const EnumPropertyItem rna_enum_prop_dynamicpaint_type_items[] = { {MOD_DYNAMICPAINT_TYPE_CANVAS, "CANVAS", 0, "Canvas", ""}, {MOD_DYNAMICPAINT_TYPE_BRUSH, "BRUSH", 0, "Brush", ""}, {0, NULL, 0, NULL, NULL} @@ -245,7 +245,7 @@ static int rna_DynamicPaint_is_output_exists(DynamicPaintSurface *surface, Objec } -static EnumPropertyItem *rna_DynamicPaint_surface_type_itemf( +static const EnumPropertyItem *rna_DynamicPaint_surface_type_itemf( bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { DynamicPaintSurface *surface = (DynamicPaintSurface *)ptr->data; @@ -331,7 +331,7 @@ static void rna_def_canvas_surface(BlenderRNA *brna) FunctionRNA *func; /* Surface format */ - static EnumPropertyItem prop_dynamicpaint_surface_format[] = { + static const EnumPropertyItem prop_dynamicpaint_surface_format[] = { /*{MOD_DPAINT_SURFACE_F_PTEX, "PTEX", ICON_TEXTURE_SHADED, "Ptex", ""}, */ {MOD_DPAINT_SURFACE_F_VERTEX, "VERTEX", ICON_OUTLINER_DATA_MESH, "Vertex", ""}, {MOD_DPAINT_SURFACE_F_IMAGESEQ, "IMAGE", ICON_FILE_IMAGE, "Image Sequence", ""}, @@ -339,20 +339,20 @@ static void rna_def_canvas_surface(BlenderRNA *brna) }; /* Surface type - generated dynamically based on surface format */ - static EnumPropertyItem prop_dynamicpaint_surface_type[] = { + static const EnumPropertyItem prop_dynamicpaint_surface_type[] = { {MOD_DPAINT_SURFACE_T_PAINT, "PAINT", 0, "Paint", ""}, {0, NULL, 0, NULL, NULL} }; /* Surface output preview. currently only paint has multiple outputs */ - static EnumPropertyItem prop_dynamicpaint_surface_preview[] = { + static const EnumPropertyItem prop_dynamicpaint_surface_preview[] = { {MOD_DPAINT_SURFACE_PREV_PAINT, "PAINT", 0, "Paint", ""}, {MOD_DPAINT_SURFACE_PREV_WETMAP, "WETMAP", 0, "Wetmap", ""}, {0, NULL, 0, NULL, NULL} }; /* Initial color setting */ - static EnumPropertyItem prop_dynamicpaint_init_color_type[] = { + static const EnumPropertyItem prop_dynamicpaint_init_color_type[] = { {MOD_DPAINT_INITIAL_NONE, "NONE", 0, "None", ""}, {MOD_DPAINT_INITIAL_COLOR, "COLOR", ICON_COLOR, "Color", ""}, {MOD_DPAINT_INITIAL_TEXTURE, "TEXTURE", ICON_TEXTURE, "UV Texture", ""}, @@ -362,7 +362,7 @@ static void rna_def_canvas_surface(BlenderRNA *brna) /* Effect type * Only used by ui to view per effect settings */ - static EnumPropertyItem prop_dynamicpaint_effecttype[] = { + static const EnumPropertyItem prop_dynamicpaint_effecttype[] = { {1, "SPREAD", 0, "Spread", ""}, {2, "DRIP", 0, "Drip", ""}, {3, "SHRINK", 0, "Shrink", ""}, @@ -370,7 +370,7 @@ static void rna_def_canvas_surface(BlenderRNA *brna) }; /* Displacemap file format */ - static EnumPropertyItem prop_dynamicpaint_image_fileformat[] = { + static const EnumPropertyItem prop_dynamicpaint_image_fileformat[] = { {MOD_DPAINT_IMGFORMAT_PNG, "PNG", 0, "PNG", ""}, #ifdef WITH_OPENEXR {MOD_DPAINT_IMGFORMAT_OPENEXR, "OPENEXR", 0, "OpenEXR", ""}, @@ -379,7 +379,7 @@ static void rna_def_canvas_surface(BlenderRNA *brna) }; /* Displacemap type */ - static EnumPropertyItem prop_dynamicpaint_displace_type[] = { + static const EnumPropertyItem prop_dynamicpaint_displace_type[] = { {MOD_DPAINT_DISP_DISPLACE, "DISPLACE", 0, "Displacement", ""}, {MOD_DPAINT_DISP_DEPTH, "DEPTH", 0, "Depth", ""}, {0, NULL, 0, NULL, NULL} @@ -772,7 +772,7 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna) PropertyRNA *prop; /* paint collision type */ - static EnumPropertyItem prop_dynamicpaint_collisiontype[] = { + static const EnumPropertyItem prop_dynamicpaint_collisiontype[] = { {MOD_DPAINT_COL_PSYS, "PARTICLE_SYSTEM", ICON_PARTICLES, "Particle System", ""}, {MOD_DPAINT_COL_POINT, "POINT", ICON_META_EMPTY, "Object Center", ""}, {MOD_DPAINT_COL_DIST, "DISTANCE", ICON_META_EMPTY, "Proximity", ""}, @@ -781,14 +781,14 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_dynamicpaint_prox_falloff[] = { + static const EnumPropertyItem prop_dynamicpaint_prox_falloff[] = { {MOD_DPAINT_PRFALL_SMOOTH, "SMOOTH", ICON_SPHERECURVE, "Smooth", ""}, {MOD_DPAINT_PRFALL_CONSTANT, "CONSTANT", ICON_NOCURVE, "Constant", ""}, {MOD_DPAINT_PRFALL_RAMP, "RAMP", ICON_COLOR, "Color Ramp", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_dynamicpaint_brush_wave_type[] = { + static const EnumPropertyItem prop_dynamicpaint_brush_wave_type[] = { {MOD_DPAINT_WAVEB_CHANGE, "CHANGE", 0, "Depth Change", ""}, {MOD_DPAINT_WAVEB_DEPTH, "DEPTH", 0, "Obstacle", ""}, {MOD_DPAINT_WAVEB_FORCE, "FORCE", 0, "Force", ""}, @@ -796,7 +796,7 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_dynamicpaint_brush_ray_dir[] = { + static const EnumPropertyItem prop_dynamicpaint_brush_ray_dir[] = { {MOD_DPAINT_RAY_CANVAS, "CANVAS", 0, "Canvas Normal", ""}, {MOD_DPAINT_RAY_BRUSH_AVG, "BRUSH", 0, "Brush Normal", ""}, {MOD_DPAINT_RAY_ZPLUS, "Z_AXIS", 0, "Z-Axis", ""}, diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index f7da5a0fda4..b23b229a27d 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -50,7 +50,7 @@ #include "ED_keyframing.h" #include "ED_keyframes_edit.h" -EnumPropertyItem rna_enum_fmodifier_type_items[] = { +const EnumPropertyItem rna_enum_fmodifier_type_items[] = { {FMODIFIER_TYPE_NULL, "NULL", 0, "Invalid", ""}, {FMODIFIER_TYPE_GENERATOR, "GENERATOR", 0, "Generator", "Generate a curve using a factorized or expanded polynomial"}, @@ -71,7 +71,7 @@ EnumPropertyItem rna_enum_fmodifier_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_beztriple_keyframe_type_items[] = { +const EnumPropertyItem rna_enum_beztriple_keyframe_type_items[] = { {BEZT_KEYTYPE_KEYFRAME, "KEYFRAME", VICO_KEYTYPE_KEYFRAME_VEC, "Keyframe", "Normal keyframe - e.g. for key poses"}, {BEZT_KEYTYPE_BREAKDOWN, "BREAKDOWN", VICO_KEYTYPE_BREAKDOWN_VEC, "Breakdown", "A breakdown pose - e.g. for transitions between key poses"}, {BEZT_KEYTYPE_MOVEHOLD, "MOVING_HOLD", VICO_KEYTYPE_MOVING_HOLD_VEC, "Moving Hold", "A keyframe that is part of a moving hold"}, @@ -80,7 +80,7 @@ EnumPropertyItem rna_enum_beztriple_keyframe_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_beztriple_interpolation_easing_items[] = { +const EnumPropertyItem rna_enum_beztriple_interpolation_easing_items[] = { /* XXX: auto-easing is currently using a placeholder icon... */ {BEZT_IPO_EASE_AUTO, "AUTO", ICON_IPO_EASE_IN_OUT, "Automatic Easing", "Easing type is chosen automatically based on what the type of interpolation used " @@ -921,7 +921,7 @@ static void rna_def_fmodifier_generator(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem generator_mode_items[] = { + static const EnumPropertyItem generator_mode_items[] = { {FCM_GENERATOR_POLYNOMIAL, "POLYNOMIAL", 0, "Expanded Polynomial", ""}, {FCM_GENERATOR_POLYNOMIAL_FACTORISED, "POLYNOMIAL_FACTORISED", 0, "Factorized Polynomial", ""}, {0, NULL, 0, NULL, NULL} @@ -968,7 +968,7 @@ static void rna_def_fmodifier_function_generator(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {0, "SIN", 0, "Sine", ""}, {1, "COS", 0, "Cosine", ""}, {2, "TAN", 0, "Tangent", ""}, @@ -1119,7 +1119,7 @@ static void rna_def_fmodifier_cycles(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {FCM_EXTRAPOLATE_NONE, "NONE", 0, "No Cycles", "Don't do anything"}, {FCM_EXTRAPOLATE_CYCLIC, "REPEAT", 0, "Repeat Motion", "Repeat keyframe range as-is"}, {FCM_EXTRAPOLATE_CYCLIC_OFFSET, "REPEAT_OFFSET", 0, "Repeat with Offset", @@ -1236,7 +1236,7 @@ static void rna_def_fmodifier_noise(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_modification_items[] = { + static const EnumPropertyItem prop_modification_items[] = { {FCM_NOISE_MODIF_REPLACE, "REPLACE", 0, "Replace", ""}, {FCM_NOISE_MODIF_ADD, "ADD", 0, "Add", ""}, {FCM_NOISE_MODIF_SUBTRACT, "SUBTRACT", 0, "Subtract", ""}, @@ -1441,7 +1441,7 @@ static void rna_def_drivertarget(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_trans_chan_items[] = { + static const EnumPropertyItem prop_trans_chan_items[] = { {DTAR_TRANSCHAN_LOCX, "LOC_X", 0, "X Location", ""}, {DTAR_TRANSCHAN_LOCY, "LOC_Y", 0, "Y Location", ""}, {DTAR_TRANSCHAN_LOCZ, "LOC_Z", 0, "Z Location", ""}, @@ -1454,7 +1454,7 @@ static void rna_def_drivertarget(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_local_space_items[] = { + static const EnumPropertyItem prop_local_space_items[] = { {0, "WORLD_SPACE", 0, "World Space", "Transforms include effects of parenting/restpose and constraints"}, {DTAR_FLAG_LOCALSPACE, "TRANSFORM_SPACE", 0, "Transform Space", "Transforms don't include parenting/restpose or constraints"}, @@ -1519,7 +1519,7 @@ static void rna_def_drivervar(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {DVAR_TYPE_SINGLE_PROP, "SINGLE_PROP", ICON_RNA, "Single Property", "Use the value from some RNA property (Default)"}, {DVAR_TYPE_TRANSFORM_CHAN, "TRANSFORMS", ICON_MANIPUL, "Transform Channel", "Final transformation value of object or bone"}, @@ -1602,7 +1602,7 @@ static void rna_def_channeldriver(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {DRIVER_TYPE_AVERAGE, "AVERAGE", 0, "Averaged Value", ""}, {DRIVER_TYPE_SUM, "SUM", 0, "Sum Values", ""}, {DRIVER_TYPE_PYTHON, "SCRIPTED", 0, "Scripted Expression", ""}, @@ -1832,7 +1832,7 @@ static void rna_def_fcurve_keyframe_points(BlenderRNA *brna, PropertyRNA *cprop) FunctionRNA *func; PropertyRNA *parm; - static EnumPropertyItem keyframe_flag_items[] = { + static const EnumPropertyItem keyframe_flag_items[] = { {INSERTKEY_REPLACE, "REPLACE", 0, "Replace", "Don't add any new keyframes, but just replace existing ones"}, {INSERTKEY_NEEDED, "NEEDED", 0, "Needed", "Only adds keyframes that are needed"}, {INSERTKEY_FAST, "FAST", 0, "Fast", "Fast keyframe insertion to avoid recalculating the curve each time"}, @@ -1879,12 +1879,12 @@ static void rna_def_fcurve(BlenderRNA *brna) FunctionRNA *func; PropertyRNA *parm; - static EnumPropertyItem prop_mode_extend_items[] = { + static const EnumPropertyItem prop_mode_extend_items[] = { {FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", 0, "Constant", "Hold values of endpoint keyframes"}, {FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", 0, "Linear", "Use slope of curve leading in/out of endpoint keyframes"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_mode_color_items[] = { + static const EnumPropertyItem prop_mode_color_items[] = { {FCURVE_COLOR_AUTO_RAINBOW, "AUTO_RAINBOW", 0, "Auto Rainbow", "Cycle through the rainbow, trying to give each curve a unique color"}, {FCURVE_COLOR_AUTO_RGB, "AUTO_RGB", 0, "Auto XYZ to RGB", diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c index 8c3984e4b29..437095ffb31 100644 --- a/source/blender/makesrna/intern/rna_fluidsim.c +++ b/source/blender/makesrna/intern/rna_fluidsim.c @@ -214,7 +214,7 @@ static void rna_def_fluidsim_slip(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem slip_items[] = { + static const EnumPropertyItem slip_items[] = { {OB_FSBND_NOSLIP, "NOSLIP", 0, "No Slip", "Obstacle causes zero normal and tangential velocity (=sticky), default for all " "(only option for moving objects)"}, @@ -260,7 +260,7 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem quality_items[] = { + static const EnumPropertyItem quality_items[] = { {OB_FSDOM_GEOM, "GEOMETRY", 0, "Geometry", "Display geometry"}, {OB_FSDOM_PREVIEW, "PREVIEW", 0, "Preview", "Display preview quality results"}, {OB_FSDOM_FINAL, "FINAL", 0, "Final", "Display final quality results"}, @@ -444,7 +444,7 @@ static void rna_def_fluidsim_volume(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem volume_type_items[] = { + static const EnumPropertyItem volume_type_items[] = { {1, "VOLUME", 0, "Volume", "Use only the inner volume of the mesh"}, {2, "SHELL", 0, "Shell", "Use only the outer shell of the mesh"}, {3, "BOTH", 0, "Both", "Use both the inner volume and the outer shell of the mesh"}, @@ -667,7 +667,7 @@ void RNA_def_fluidsim(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_fluid_type_items[] = { + static const EnumPropertyItem prop_fluid_type_items[] = { {OB_FLUIDSIM_ENABLE, "NONE", 0, "None", ""}, {OB_FLUIDSIM_DOMAIN, "DOMAIN", 0, "Domain", "Bounding box of this object represents the computational domain of the " diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index 79e1e95b27a..a2733b91427 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -46,7 +46,7 @@ #include "ED_gpencil.h" /* parent type */ -static EnumPropertyItem parent_type_items[] = { +static const EnumPropertyItem parent_type_items[] = { {PAROBJECT, "OBJECT", 0, "Object", "The layer is parented to an object"}, {PARSKEL, "ARMATURE", 0, "Armature", ""}, {PARBONE, "BONE", 0, "Bone", "The layer is parented to a bone"}, @@ -249,7 +249,7 @@ static void rna_GPencilLayer_parent_bone_set(PointerRNA *ptr, const char *value) /* parent types enum */ -static EnumPropertyItem *rna_Object_parent_type_itemf( +static const EnumPropertyItem *rna_Object_parent_type_itemf( bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { @@ -981,7 +981,7 @@ static void rna_def_gpencil_stroke(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem stroke_draw_mode_items[] = { + static const EnumPropertyItem stroke_draw_mode_items[] = { {0, "SCREEN", 0, "Screen", "Stroke is in screen-space"}, {GP_STROKE_3DSPACE, "3DSPACE", 0, "3D Space", "Stroke is in 3D-space"}, {GP_STROKE_2DSPACE, "2DSPACE", 0, "2D Space", "Stroke is in 2D-space"}, diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c index 5ca7e624d88..d7991ed6ef3 100644 --- a/source/blender/makesrna/intern/rna_image.c +++ b/source/blender/makesrna/intern/rna_image.c @@ -44,14 +44,14 @@ #include "WM_types.h" #include "WM_api.h" -EnumPropertyItem rna_enum_image_generated_type_items[] = { +const EnumPropertyItem rna_enum_image_generated_type_items[] = { {IMA_GENTYPE_BLANK, "BLANK", 0, "Blank", "Generate a blank image"}, {IMA_GENTYPE_GRID, "UV_GRID", 0, "UV Grid", "Generated grid to test UV mappings"}, {IMA_GENTYPE_GRID_COLOR, "COLOR_GRID", 0, "Color Grid", "Generated improved UV grid to test UV mappings"}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem image_source_items[] = { +static const EnumPropertyItem image_source_items[] = { {IMA_SRC_FILE, "FILE", 0, "Single Image", "Single image file"}, {IMA_SRC_SEQUENCE, "SEQUENCE", 0, "Image Sequence", "Multiple image files, as a sequence"}, {IMA_SRC_MOVIE, "MOVIE", 0, "Movie", "Movie file"}, @@ -200,7 +200,7 @@ static char *rna_ImageUser_path(PointerRNA *ptr) return BLI_strdup(""); } -static EnumPropertyItem *rna_Image_source_itemf(bContext *UNUSED(C), PointerRNA *ptr, +static const EnumPropertyItem *rna_Image_source_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { Image *ima = (Image *)ptr->data; diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h index a470c807091..59f68cdf106 100644 --- a/source/blender/makesrna/intern/rna_internal_types.h +++ b/source/blender/makesrna/intern/rna_internal_types.h @@ -88,8 +88,9 @@ typedef int (*PropStringLengthFunc)(struct PointerRNA *ptr); typedef void (*PropStringSetFunc)(struct PointerRNA *ptr, const char *value); typedef int (*PropEnumGetFunc)(struct PointerRNA *ptr); typedef void (*PropEnumSetFunc)(struct PointerRNA *ptr, int value); -typedef EnumPropertyItem *(*PropEnumItemFunc)(struct bContext *C, struct PointerRNA *ptr, - struct PropertyRNA *prop, bool *r_free); +typedef const EnumPropertyItem *(*PropEnumItemFunc)( + struct bContext *C, struct PointerRNA *ptr, + struct PropertyRNA *prop, bool *r_free); typedef PointerRNA (*PropPointerGetFunc)(struct PointerRNA *ptr); typedef StructRNA *(*PropPointerTypeFunc)(struct PointerRNA *ptr); typedef void (*PropPointerSetFunc)(struct PointerRNA *ptr, const PointerRNA value); @@ -316,7 +317,7 @@ typedef struct EnumPropertyRNA { PropEnumSetFuncEx set_ex; void *py_data; /* store py callback here */ - EnumPropertyItem *item; + const EnumPropertyItem *item; int totitem; int defaultvalue; diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c index b960890457b..e65011d34d7 100644 --- a/source/blender/makesrna/intern/rna_key.c +++ b/source/blender/makesrna/intern/rna_key.c @@ -591,7 +591,7 @@ static char *rna_ShapeKeyPoint_path(PointerRNA *ptr) #else -EnumPropertyItem rna_enum_keyblock_type_items[] = { +const EnumPropertyItem rna_enum_keyblock_type_items[] = { {KEY_LINEAR, "KEY_LINEAR", 0, "Linear", ""}, {KEY_CARDINAL, "KEY_CARDINAL", 0, "Cardinal", ""}, {KEY_CATMULL_ROM, "KEY_CATMULL_ROM", 0, "Catmull-Rom", ""}, diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c index 51709d3137c..f29fa44d306 100644 --- a/source/blender/makesrna/intern/rna_lamp.c +++ b/source/blender/makesrna/intern/rna_lamp.c @@ -166,7 +166,7 @@ static void rna_Lamp_use_nodes_update(bContext *C, PointerRNA *ptr) #else /* Don't define icons here, so they don't show up in the Lamp UI (properties Editor) - DingTo */ -EnumPropertyItem rna_enum_lamp_type_items[] = { +const EnumPropertyItem rna_enum_lamp_type_items[] = { {LA_LOCAL, "POINT", 0, "Point", "Omnidirectional point light source"}, {LA_SUN, "SUN", 0, "Sun", "Constant direction parallel ray light source"}, {LA_SPOT, "SPOT", 0, "Spot", "Directional cone light source"}, @@ -180,7 +180,7 @@ static void rna_def_lamp_mtex(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_texture_coordinates_items[] = { + static const EnumPropertyItem prop_texture_coordinates_items[] = { {TEXCO_GLOB, "GLOBAL", 0, "Global", "Use global coordinates for the texture coordinates"}, {TEXCO_VIEW, "VIEW", 0, "View", "Use view coordinates for the texture coordinates"}, {TEXCO_OBJECT, "OBJECT", 0, "Object", "Use linked object's coordinates for texture coordinates"}, @@ -230,7 +230,7 @@ static void rna_def_lamp_sky_settings(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_skycolorspace_items[] = { + static const EnumPropertyItem prop_skycolorspace_items[] = { {0, "SMPTE", 0, "SMPTE", ""}, {1, "REC709", 0, "REC709", ""}, {2, "CIE", 0, "CIE", ""}, @@ -416,7 +416,7 @@ static void rna_def_lamp_falloff(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem prop_fallofftype_items[] = { + static const EnumPropertyItem prop_fallofftype_items[] = { {LA_FALLOFF_CONSTANT, "CONSTANT", 0, "Constant", ""}, {LA_FALLOFF_INVLINEAR, "INVERSE_LINEAR", 0, "Inverse Linear", ""}, {LA_FALLOFF_INVSQUARE, "INVERSE_SQUARE", 0, "Inverse Square", ""}, @@ -479,33 +479,33 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area) { PropertyRNA *prop; - static EnumPropertyItem prop_shadow_items[] = { + static const EnumPropertyItem prop_shadow_items[] = { {0, "NOSHADOW", 0, "No Shadow", ""}, {LA_SHAD_RAY, "RAY_SHADOW", 0, "Ray Shadow", "Use ray tracing for shadow"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_spot_shadow_items[] = { + static const EnumPropertyItem prop_spot_shadow_items[] = { {0, "NOSHADOW", 0, "No Shadow", ""}, {LA_SHAD_BUF, "BUFFER_SHADOW", 0, "Buffer Shadow", "Let spotlight produce shadows using shadow buffer"}, {LA_SHAD_RAY, "RAY_SHADOW", 0, "Ray Shadow", "Use ray tracing for shadow"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_ray_sampling_method_items[] = { + static const EnumPropertyItem prop_ray_sampling_method_items[] = { {LA_SAMP_HALTON, "ADAPTIVE_QMC", 0, "Adaptive QMC", ""}, {LA_SAMP_HAMMERSLEY, "CONSTANT_QMC", 0, "Constant QMC", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_spot_ray_sampling_method_items[] = { + static const EnumPropertyItem prop_spot_ray_sampling_method_items[] = { {LA_SAMP_HALTON, "ADAPTIVE_QMC", 0, "Adaptive QMC", ""}, {LA_SAMP_HAMMERSLEY, "CONSTANT_QMC", 0, "Constant QMC", ""}, {LA_SAMP_CONSTANT, "CONSTANT_JITTERED", 0, "Constant Jittered", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_shadbuftype_items[] = { + static const EnumPropertyItem prop_shadbuftype_items[] = { {LA_SHADBUF_REGULAR, "REGULAR", 0, "Classical", "Classic shadow buffer"}, {LA_SHADBUF_HALFWAY, "HALFWAY", 0, "Classic-Halfway", "Regular buffer, averaging the closest and 2nd closest Z value to reducing " @@ -518,14 +518,14 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_shadbuffiltertype_items[] = { + static const EnumPropertyItem prop_shadbuffiltertype_items[] = { {LA_SHADBUF_BOX, "BOX", 0, "Box", "Apply the Box filter to shadow buffer samples"}, {LA_SHADBUF_TENT, "TENT", 0, "Tent", "Apply the Tent Filter to shadow buffer samples"}, {LA_SHADBUF_GAUSS, "GAUSS", 0, "Gauss", "Apply the Gauss filter to shadow buffer samples"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_numbuffer_items[] = { + static const EnumPropertyItem prop_numbuffer_items[] = { {1, "BUFFERS_1", 0, "1", "Only one buffer rendered"}, {4, "BUFFERS_4", 0, "4", "Render 4 buffers for better AA, this quadruples memory usage"}, {9, "BUFFERS_9", 0, "9", "Render 9 buffers for better AA, this uses nine times more memory"}, @@ -533,7 +533,7 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area) }; /* GE only */ - static EnumPropertyItem prop_ge_shadowbuffer_type_items[] = { + static const EnumPropertyItem prop_ge_shadowbuffer_type_items[] = { {LA_SHADMAP_SIMPLE, "SIMPLE", 0, "Simple", "Simple shadow maps"}, {LA_SHADMAP_VARIANCE, "VARIANCE", 0, "Variance", "Variance shadow maps"}, {0, NULL, 0, NULL, NULL} @@ -710,7 +710,7 @@ static void rna_def_area_lamp(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_areashape_items[] = { + static const EnumPropertyItem prop_areashape_items[] = { {LA_AREA_SQUARE, "SQUARE", 0, "Square", ""}, {LA_AREA_RECT, "RECTANGLE", 0, "Rectangle", ""}, {0, NULL, 0, NULL, NULL} diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c index a163d9764c1..bcd8ab054ae 100644 --- a/source/blender/makesrna/intern/rna_linestyle.c +++ b/source/blender/makesrna/intern/rna_linestyle.c @@ -42,7 +42,7 @@ #include "WM_types.h" #include "WM_api.h" -EnumPropertyItem rna_enum_linestyle_color_modifier_type_items[] = { +const EnumPropertyItem rna_enum_linestyle_color_modifier_type_items[] = { {LS_MODIFIER_ALONG_STROKE, "ALONG_STROKE", ICON_MODIFIER, "Along Stroke", ""}, {LS_MODIFIER_CREASE_ANGLE, "CREASE_ANGLE", ICON_MODIFIER, "Crease Angle", ""}, {LS_MODIFIER_CURVATURE_3D, "CURVATURE_3D", ICON_MODIFIER, "Curvature 3D", ""}, @@ -54,7 +54,7 @@ EnumPropertyItem rna_enum_linestyle_color_modifier_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_linestyle_alpha_modifier_type_items[] = { +const EnumPropertyItem rna_enum_linestyle_alpha_modifier_type_items[] = { {LS_MODIFIER_ALONG_STROKE, "ALONG_STROKE", ICON_MODIFIER, "Along Stroke", ""}, {LS_MODIFIER_CREASE_ANGLE, "CREASE_ANGLE", ICON_MODIFIER, "Crease Angle", ""}, {LS_MODIFIER_CURVATURE_3D, "CURVATURE_3D", ICON_MODIFIER, "Curvature 3D", ""}, @@ -66,7 +66,7 @@ EnumPropertyItem rna_enum_linestyle_alpha_modifier_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_linestyle_thickness_modifier_type_items[] = { +const EnumPropertyItem rna_enum_linestyle_thickness_modifier_type_items[] = { {LS_MODIFIER_ALONG_STROKE, "ALONG_STROKE", ICON_MODIFIER, "Along Stroke", ""}, {LS_MODIFIER_CALLIGRAPHY, "CALLIGRAPHY", ICON_MODIFIER, "Calligraphy", ""}, {LS_MODIFIER_CREASE_ANGLE, "CREASE_ANGLE", ICON_MODIFIER, "Crease Angle", ""}, @@ -79,7 +79,7 @@ EnumPropertyItem rna_enum_linestyle_thickness_modifier_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_linestyle_geometry_modifier_type_items[] = { +const EnumPropertyItem rna_enum_linestyle_geometry_modifier_type_items[] = { {LS_MODIFIER_2D_OFFSET, "2D_OFFSET", ICON_MODIFIER, "2D Offset", ""}, {LS_MODIFIER_2D_TRANSFORM, "2D_TRANSFORM", ICON_MODIFIER, "2D Transform", ""}, {LS_MODIFIER_BACKBONE_STRETCHER, "BACKBONE_STRETCHER", ICON_MODIFIER, "Backbone Stretcher", ""}, @@ -474,7 +474,7 @@ static void rna_def_linestyle_mtex(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem texco_items[] = { + static const EnumPropertyItem texco_items[] = { {TEXCO_WINDOW, "WINDOW", 0, "Window", "Use screen coordinates as texture coordinates"}, {TEXCO_GLOB, "GLOBAL", 0, "Global", "Use global coordinates for the texture coordinates"}, {TEXCO_STROKE, "ALONG_STROKE", 0, "Along stroke", "Use stroke length for texture coordinates"}, @@ -482,7 +482,7 @@ static void rna_def_linestyle_mtex(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_mapping_items[] = { + static const EnumPropertyItem prop_mapping_items[] = { {MTEX_FLAT, "FLAT", 0, "Flat", "Map X and Y coordinates directly"}, {MTEX_CUBE, "CUBE", 0, "Cube", "Map using the normal vector"}, {MTEX_TUBE, "TUBE", 0, "Tube", "Map with Z as central axis"}, @@ -490,7 +490,7 @@ static void rna_def_linestyle_mtex(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_x_mapping_items[] = { + static const EnumPropertyItem prop_x_mapping_items[] = { {0, "NONE", 0, "None", ""}, {1, "X", 0, "X", ""}, {2, "Y", 0, "Y", ""}, @@ -498,7 +498,7 @@ static void rna_def_linestyle_mtex(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_y_mapping_items[] = { + static const EnumPropertyItem prop_y_mapping_items[] = { {0, "NONE", 0, "None", ""}, {1, "X", 0, "X", ""}, {2, "Y", 0, "Y", ""}, @@ -506,7 +506,7 @@ static void rna_def_linestyle_mtex(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_z_mapping_items[] = { + static const EnumPropertyItem prop_z_mapping_items[] = { {0, "NONE", 0, "None", ""}, {1, "X", 0, "X", ""}, {2, "Y", 0, "Y", ""}, @@ -578,13 +578,13 @@ static void rna_def_linestyle_mtex(BlenderRNA *brna) } static void rna_def_modifier_type_common( - StructRNA *srna, EnumPropertyItem *modifier_type_items, + StructRNA *srna, const EnumPropertyItem *modifier_type_items, const char *set_name_func, const bool blend, const bool color) { PropertyRNA *prop; /* TODO: Check this is not already defined somewhere else, e.g. in nodes... */ - static EnumPropertyItem value_blend_items[] = { + static const EnumPropertyItem value_blend_items[] = { {LS_VALUE_BLEND, "MIX", 0, "Mix", ""}, {LS_VALUE_ADD, "ADD", 0, "Add", ""}, {LS_VALUE_SUB, "SUBTRACT", 0, "Subtract", ""}, @@ -684,7 +684,7 @@ static void rna_def_modifier_curve_common(StructRNA *srna, bool range, bool valu { PropertyRNA *prop; - static EnumPropertyItem mapping_items[] = { + static const EnumPropertyItem mapping_items[] = { {0, "LINEAR", 0, "Linear", "Use linear mapping"}, {LS_MODIFIER_USE_CURVE, "CURVE", 0, "Curve", "Use curve mapping"}, {0, NULL, 0, NULL, NULL} @@ -736,7 +736,7 @@ static void rna_def_modifier_material_common(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem mat_attr_items[] = { + static const EnumPropertyItem mat_attr_items[] = { {LS_MODIFIER_MATERIAL_LINE, "LINE", 0, "Line Color", ""}, {LS_MODIFIER_MATERIAL_LINE_R, "LINE_R", 0, "Line Color Red", ""}, {LS_MODIFIER_MATERIAL_LINE_G, "LINE_G", 0, "Line Color Green", ""}, @@ -768,14 +768,14 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem blueprint_shape_items[] = { + static const EnumPropertyItem blueprint_shape_items[] = { {LS_MODIFIER_BLUEPRINT_CIRCLES, "CIRCLES", 0, "Circles", "Draw a blueprint using circular contour strokes"}, {LS_MODIFIER_BLUEPRINT_ELLIPSES, "ELLIPSES", 0, "Ellipses", "Draw a blueprint using elliptic contour strokes"}, {LS_MODIFIER_BLUEPRINT_SQUARES, "SQUARES", 0, "Squares", "Draw a blueprint using square contour strokes"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem transform_pivot_items[] = { + static const EnumPropertyItem transform_pivot_items[] = { {LS_MODIFIER_2D_TRANSFORM_PIVOT_CENTER, "CENTER", 0, "Stroke Center", ""}, {LS_MODIFIER_2D_TRANSFORM_PIVOT_START, "START", 0, "Stroke Start", ""}, {LS_MODIFIER_2D_TRANSFORM_PIVOT_END, "END", 0, "Stroke End", ""}, @@ -1558,7 +1558,7 @@ static void rna_def_linestyle(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem panel_items[] = { + static const EnumPropertyItem panel_items[] = { {LS_PANEL_STROKES, "STROKES", 0, "Strokes", "Show the panel for stroke construction"}, {LS_PANEL_COLOR, "COLOR", 0, "Color", "Show the panel for line color options"}, {LS_PANEL_ALPHA, "ALPHA", 0, "Alpha", "Show the panel for alpha transparency options"}, @@ -1570,37 +1570,37 @@ static void rna_def_linestyle(BlenderRNA *brna) #endif {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem chaining_items[] = { + static const EnumPropertyItem chaining_items[] = { {LS_CHAINING_PLAIN, "PLAIN", 0, "Plain", "Plain chaining"}, {LS_CHAINING_SKETCHY, "SKETCHY", 0, "Sketchy", "Sketchy chaining with a multiple touch"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem cap_items[] = { + static const EnumPropertyItem cap_items[] = { {LS_CAPS_BUTT, "BUTT", 0, "Butt", "Butt cap (flat)"}, {LS_CAPS_ROUND, "ROUND", 0, "Round", "Round cap (half-circle)"}, {LS_CAPS_SQUARE, "SQUARE", 0, "Square", "Square cap (flat and extended)"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem thickness_position_items[] = { + static const EnumPropertyItem thickness_position_items[] = { {LS_THICKNESS_CENTER, "CENTER", 0, "Center", "Silhouettes and border edges are centered along stroke geometry"}, {LS_THICKNESS_INSIDE, "INSIDE", 0, "Inside", "Silhouettes and border edges are drawn inside of stroke geometry"}, {LS_THICKNESS_OUTSIDE, "OUTSIDE", 0, "Outside", "Silhouettes and border edges are drawn outside of stroke geometry"}, {LS_THICKNESS_RELATIVE, "RELATIVE", 0, "Relative", "Silhouettes and border edges are shifted by a user-defined ratio"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem sort_key_items[] = { + static const EnumPropertyItem sort_key_items[] = { {LS_SORT_KEY_DISTANCE_FROM_CAMERA, "DISTANCE_FROM_CAMERA", 0, "Distance from Camera", "Sort by distance from camera (closer lines lie on top of further lines)"}, {LS_SORT_KEY_2D_LENGTH, "2D_LENGTH", 0, "2D Length", "Sort by curvilinear 2D length (longer lines lie on top of shorter lines)"}, {LS_SORT_KEY_PROJECTED_X, "PROJECTED_X", 0, "Projected X", "Sort by the projected X value in the image coordinate system"}, {LS_SORT_KEY_PROJECTED_Y, "PROJECTED_Y", 0, "Projected Y", "Sort by the projected Y value in the image coordinate system"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem sort_order_items[] = { + static const EnumPropertyItem sort_order_items[] = { {0, "DEFAULT", 0, "Default", "Default order of the sort key"}, {LS_REVERSE_ORDER, "REVERSE", 0, "Reverse", "Reverse order"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem integration_type_items[] = { + static const EnumPropertyItem integration_type_items[] = { {LS_INTEGRATION_MEAN, "MEAN", 0, "Mean", "The value computed for the chain is the mean of the values obtained for chain vertices"}, {LS_INTEGRATION_MIN, "MIN", 0, "Min", "The value computed for the chain is the minimum of the values obtained for chain vertices"}, {LS_INTEGRATION_MAX, "MAX", 0, "Max", "The value computed for the chain is the maximum of the values obtained for chain vertices"}, diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 871f50e992e..dc3bbf6ca45 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -259,7 +259,7 @@ static Material *rna_Main_materials_new(Main *bmain, const char *name) return (Material *)id; } -static EnumPropertyItem *rna_Main_nodetree_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) +static const EnumPropertyItem *rna_Main_nodetree_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { return rna_node_tree_type_itemf(NULL, NULL, r_free); } @@ -805,7 +805,7 @@ void RNA_def_main_node_groups(BlenderRNA *brna, PropertyRNA *cprop) PropertyRNA *parm; PropertyRNA *prop; - static EnumPropertyItem dummy_items[] = { + static const EnumPropertyItem dummy_items[] = { {0, "DUMMY", 0, "", ""}, {0, NULL, 0, NULL, NULL} }; @@ -853,7 +853,7 @@ void RNA_def_main_meshes(BlenderRNA *brna, PropertyRNA *cprop) PropertyRNA *parm; PropertyRNA *prop; - static EnumPropertyItem mesh_type_items[] = { + static const EnumPropertyItem mesh_type_items[] = { {eModifierMode_Realtime, "PREVIEW", 0, "Preview", "Apply modifier preview settings"}, {eModifierMode_Render, "RENDER", 0, "Render", "Apply modifier render settings"}, {0, NULL, 0, NULL, NULL} diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c index 24dfff89832..f4f4685d1bf 100644 --- a/source/blender/makesrna/intern/rna_mask.c +++ b/source/blender/makesrna/intern/rna_mask.c @@ -593,11 +593,11 @@ static void rna_def_maskParent(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem mask_id_type_items[] = { + static const EnumPropertyItem mask_id_type_items[] = { {ID_MC, "MOVIECLIP", ICON_SEQUENCE, "Movie Clip", ""}, {0, NULL, 0, NULL, NULL}}; - static EnumPropertyItem parent_type_items[] = { + static const EnumPropertyItem parent_type_items[] = { {MASK_PARENT_POINT_TRACK, "POINT_TRACK", 0, "Point Track", ""}, {MASK_PARENT_PLANE_TRACK, "PLANE_TRACK", 0, "Plane Track", ""}, {0, NULL, 0, NULL, NULL}}; @@ -677,7 +677,7 @@ static void rna_def_maskSplinePoint(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem handle_type_items[] = { + static const EnumPropertyItem handle_type_items[] = { {HD_AUTO, "AUTO", 0, "Auto", ""}, {HD_VECT, "VECTOR", 0, "Vector", ""}, {HD_ALIGN, "ALIGNED", 0, "Aligned Single", ""}, @@ -824,13 +824,13 @@ static void rna_def_maskSplinePoints(BlenderRNA *brna) static void rna_def_maskSpline(BlenderRNA *brna) { - static EnumPropertyItem spline_interpolation_items[] = { + static const EnumPropertyItem spline_interpolation_items[] = { {MASK_SPLINE_INTERP_LINEAR, "LINEAR", 0, "Linear", ""}, {MASK_SPLINE_INTERP_EASE, "EASE", 0, "Ease", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem spline_offset_mode_items[] = { + static const EnumPropertyItem spline_offset_mode_items[] = { {MASK_SPLINE_OFFSET_EVEN, "EVEN", 0, "Even", "Calculate even feather offset"}, {MASK_SPLINE_OFFSET_SMOOTH, "SMOOTH", 0, "Smooth", "Calculate feather offset as a second curve"}, {0, NULL, 0, NULL, NULL} @@ -888,7 +888,7 @@ static void rna_def_maskSpline(BlenderRNA *brna) static void rna_def_mask_layer(BlenderRNA *brna) { - static EnumPropertyItem masklay_blend_mode_items[] = { + static const EnumPropertyItem masklay_blend_mode_items[] = { {MASK_BLEND_MERGE_ADD, "MERGE_ADD", 0, "Merge Add", ""}, {MASK_BLEND_MERGE_SUBTRACT, "MERGE_SUBTRACT", 0, "Merge Subtract", ""}, {MASK_BLEND_ADD, "ADD", 0, "Add", ""}, diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index b293f20dd95..bb0005e7a3e 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -38,7 +38,7 @@ #include "WM_api.h" #include "WM_types.h" -static EnumPropertyItem prop_texture_coordinates_items[] = { +static const EnumPropertyItem prop_texture_coordinates_items[] = { {TEXCO_GLOB, "GLOBAL", 0, "Global", "Use global coordinates for the texture coordinates"}, {TEXCO_OBJECT, "OBJECT", 0, "Object", "Use linked object's coordinates for texture coordinates"}, {TEXCO_UV, "UV", 0, "UV", "Use UV coordinates for texture coordinates"}, @@ -54,7 +54,7 @@ static EnumPropertyItem prop_texture_coordinates_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_ramp_blend_items[] = { +const EnumPropertyItem rna_enum_ramp_blend_items[] = { {MA_RAMP_BLEND, "MIX", 0, "Mix", ""}, {MA_RAMP_ADD, "ADD", 0, "Add", ""}, {MA_RAMP_MULT, "MULTIPLY", 0, "Multiply", ""}, @@ -345,7 +345,7 @@ static void rna_Material_use_nodes_update(bContext *C, PointerRNA *ptr) rna_Material_draw_update(CTX_data_main(C), CTX_data_scene(C), ptr); } -static EnumPropertyItem *rna_Material_texture_coordinates_itemf(bContext *UNUSED(C), PointerRNA *ptr, +static const EnumPropertyItem *rna_Material_texture_coordinates_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { Material *ma = (Material *)ptr->id.data; @@ -441,7 +441,7 @@ static void rna_def_material_mtex(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_mapping_items[] = { + static const EnumPropertyItem prop_mapping_items[] = { {MTEX_FLAT, "FLAT", 0, "Flat", "Map X and Y coordinates directly"}, {MTEX_CUBE, "CUBE", 0, "Cube", "Map using the normal vector"}, {MTEX_TUBE, "TUBE", 0, "Tube", "Map with Z as central axis"}, @@ -449,7 +449,7 @@ static void rna_def_material_mtex(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_x_mapping_items[] = { + static const EnumPropertyItem prop_x_mapping_items[] = { {0, "NONE", 0, "None", ""}, {1, "X", 0, "X", ""}, {2, "Y", 0, "Y", ""}, @@ -457,7 +457,7 @@ static void rna_def_material_mtex(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_y_mapping_items[] = { + static const EnumPropertyItem prop_y_mapping_items[] = { {0, "NONE", 0, "None", ""}, {1, "X", 0, "X", ""}, {2, "Y", 0, "Y", ""}, @@ -465,7 +465,7 @@ static void rna_def_material_mtex(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_z_mapping_items[] = { + static const EnumPropertyItem prop_z_mapping_items[] = { {0, "NONE", 0, "None", ""}, {1, "X", 0, "X", ""}, {2, "Y", 0, "Y", ""}, @@ -473,7 +473,7 @@ static void rna_def_material_mtex(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_normal_map_space_items[] = { + static const EnumPropertyItem prop_normal_map_space_items[] = { {MTEX_NSPACE_CAMERA, "CAMERA", 0, "Camera", ""}, {MTEX_NSPACE_WORLD, "WORLD", 0, "World", ""}, {MTEX_NSPACE_OBJECT, "OBJECT", 0, "Object", ""}, @@ -481,7 +481,7 @@ static void rna_def_material_mtex(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_bump_method_items[] = { + static const EnumPropertyItem prop_bump_method_items[] = { {0, "BUMP_ORIGINAL", 0, "Original", ""}, {MTEX_COMPAT_BUMP, "BUMP_COMPATIBLE", 0, "Compatible", ""}, {MTEX_3TAP_BUMP, "BUMP_LOW_QUALITY", 0, "Low Quality", "Use 3 tap filtering"}, @@ -492,7 +492,7 @@ static void rna_def_material_mtex(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_bump_space_items[] = { + static const EnumPropertyItem prop_bump_space_items[] = { {0, "BUMP_VIEWSPACE", 0, "ViewSpace", ""}, {MTEX_BUMP_OBJECTSPACE, "BUMP_OBJECTSPACE", 0, "ObjectSpace", ""}, {MTEX_BUMP_TEXTURESPACE, "BUMP_TEXTURESPACE", 0, "TextureSpace", ""}, @@ -829,7 +829,7 @@ static void rna_def_material_gamesettings(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_alpha_blend_items[] = { + static const EnumPropertyItem prop_alpha_blend_items[] = { {GEMAT_SOLID, "OPAQUE", 0, "Opaque", "Render color of textured face as color"}, {GEMAT_ADD, "ADD", 0, "Add", "Render face transparent and add color of face"}, {GEMAT_CLIP, "CLIP", 0, "Alpha Clip", "Use the image alpha values clipped with no blending (binary alpha)"}, @@ -842,7 +842,7 @@ static void rna_def_material_gamesettings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_face_orientation_items[] = { + static const EnumPropertyItem prop_face_orientation_items[] = { {GEMAT_NORMAL, "NORMAL", 0, "Normal", "No transformation"}, {GEMAT_HALO, "HALO", 0, "Halo", "Screen aligned billboard"}, {GEMAT_BILLBOARD, "BILLBOARD", 0, "Billboard", "Billboard with Z-axis constraint"}, @@ -889,7 +889,7 @@ static void rna_def_material_colors(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem prop_ramp_input_items[] = { + static const EnumPropertyItem prop_ramp_input_items[] = { {MA_RAMP_IN_SHADER, "SHADER", 0, "Shader", ""}, {MA_RAMP_IN_ENERGY, "ENERGY", 0, "Energy", ""}, {MA_RAMP_IN_NOR, "NORMAL", 0, "Normal", ""}, @@ -1006,7 +1006,7 @@ static void rna_def_material_diffuse(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem prop_diff_shader_items[] = { + static const EnumPropertyItem prop_diff_shader_items[] = { {MA_DIFF_LAMBERT, "LAMBERT", 0, "Lambert", "Use a Lambertian shader"}, {MA_DIFF_ORENNAYAR, "OREN_NAYAR", 0, "Oren-Nayar", "Use an Oren-Nayar shader"}, {MA_DIFF_TOON, "TOON", 0, "Toon", "Use a toon shader"}, @@ -1067,7 +1067,7 @@ static void rna_def_material_raymirror(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_fadeto_mir_items[] = { + static const EnumPropertyItem prop_fadeto_mir_items[] = { {MA_RAYMIR_FADETOSKY, "FADE_TO_SKY", 0, "Sky", ""}, {MA_RAYMIR_FADETOMAT, "FADE_TO_MATERIAL", 0, "Material", ""}, {0, NULL, 0, NULL, NULL} @@ -1237,7 +1237,7 @@ static void rna_def_material_volume(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_lighting_items[] = { + static const EnumPropertyItem prop_lighting_items[] = { {MA_VOL_SHADE_SHADELESS, "SHADELESS", 0, "Shadeless", "Do not calculate lighting and shadows"}, {MA_VOL_SHADE_SHADOWED, "SHADOWED", 0, "Shadowed", ""}, {MA_VOL_SHADE_SHADED, "SHADED", 0, "Shaded", ""}, @@ -1246,7 +1246,7 @@ static void rna_def_material_volume(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_stepsize_items[] = { + static const EnumPropertyItem prop_stepsize_items[] = { {MA_VOL_STEP_RANDOMIZED, "RANDOMIZED", 0, "Randomized", ""}, {MA_VOL_STEP_CONSTANT, "CONSTANT", 0, "Constant", ""}, /*{MA_VOL_STEP_ADAPTIVE, "ADAPTIVE", 0, "Adaptive", ""}, */ @@ -1594,7 +1594,7 @@ static void rna_def_material_specularity(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem prop_specular_shader_items[] = { + static const EnumPropertyItem prop_specular_shader_items[] = { {MA_SPEC_COOKTORR, "COOKTORR", 0, "CookTorr", "Use a Cook-Torrance shader"}, {MA_SPEC_PHONG, "PHONG", 0, "Phong", "Use a Phong shader"}, {MA_SPEC_BLINN, "BLINN", 0, "Blinn", "Use a Blinn shader"}, @@ -1771,14 +1771,14 @@ void RNA_def_material(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {MA_TYPE_SURFACE, "SURFACE", 0, "Surface", "Render object as a surface"}, {MA_TYPE_WIRE, "WIRE", 0, "Wire", "Render the edges of faces as wires (not supported in raytracing)"}, {MA_TYPE_VOLUME, "VOLUME", 0, "Volume", "Render object as a volume"}, {MA_TYPE_HALO, "HALO", 0, "Halo", "Render object as halo particles"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem transparency_items[] = { + static const EnumPropertyItem transparency_items[] = { {0, "MASK", 0, "Mask", "Mask the background"}, {MA_ZTRANSP, "Z_TRANSPARENCY", 0, "Z Transparency", "Use alpha buffer for transparent faces"}, {MA_RAYTRANSP, "RAYTRACE", 0, "Raytrace", "Use raytracing for transparent refraction rendering"}, @@ -1786,7 +1786,7 @@ void RNA_def_material(BlenderRNA *brna) }; /* Render Preview Types */ - static EnumPropertyItem preview_type_items[] = { + static const EnumPropertyItem preview_type_items[] = { {MA_FLAT, "FLAT", ICON_MATPLANE, "Flat", "Flat XY plane"}, {MA_SPHERE, "SPHERE", ICON_MATSPHERE, "Sphere", "Sphere"}, {MA_CUBE, "CUBE", ICON_MATCUBE, "Cube", "Cube"}, @@ -1796,7 +1796,7 @@ void RNA_def_material(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_shadows_only_items[] = { + static const EnumPropertyItem prop_shadows_only_items[] = { {MA_SO_OLD, "SHADOW_ONLY_OLD", 0, "Shadow and Distance", "Old shadow only method"}, {MA_SO_SHADOW, "SHADOW_ONLY", 0, "Shadow Only", "Improved shadow only method"}, {MA_SO_SHADED, "SHADOW_ONLY_SHADED", 0, "Shadow and Shading", diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 650caf20093..41758758178 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -52,7 +52,7 @@ #include "WM_types.h" -EnumPropertyItem rna_enum_mesh_delimit_mode_items[] = { +const EnumPropertyItem rna_enum_mesh_delimit_mode_items[] = { {BMO_DELIM_NORMAL, "NORMAL", 0, "Normal", "Delimit by face directions"}, {BMO_DELIM_MATERIAL, "MATERIAL", 0, "Material", "Delimit by face material"}, {BMO_DELIM_SEAM, "SEAM", 0, "Seam", "Delimit by edge seams"}, diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c index 91a65c7ccc5..1a45db1e45f 100644 --- a/source/blender/makesrna/intern/rna_meta.c +++ b/source/blender/makesrna/intern/rna_meta.c @@ -295,7 +295,7 @@ static void rna_def_metaball(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_update_items[] = { + static const EnumPropertyItem prop_update_items[] = { {MB_UPDATE_ALWAYS, "UPDATE_ALWAYS", 0, "Always", "While editing, update metaball always"}, {MB_UPDATE_HALFRES, "HALFRES", 0, "Half", "While editing, update metaball in half resolution"}, {MB_UPDATE_FAST, "FAST", 0, "Fast", "While editing, update metaball without polygonization"}, diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index a35d518b786..afead4f6bd6 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -62,7 +62,7 @@ #include "WM_api.h" #include "WM_types.h" -EnumPropertyItem rna_enum_object_modifier_type_items[] = { +const 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", ""}, @@ -123,7 +123,7 @@ EnumPropertyItem rna_enum_object_modifier_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_modifier_triangulate_quad_method_items[] = { +const 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", @@ -133,7 +133,7 @@ EnumPropertyItem rna_enum_modifier_triangulate_quad_method_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_modifier_triangulate_ngon_method_items[] = { +const 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} @@ -141,7 +141,7 @@ EnumPropertyItem rna_enum_modifier_triangulate_ngon_method_items[] = { #ifndef RNA_RUNTIME /* use eWarp_Falloff_*** & eHook_Falloff_***, they're in sync */ -static EnumPropertyItem modifier_warp_falloff_items[] = { +static const EnumPropertyItem modifier_warp_falloff_items[] = { {eWarp_Falloff_None, "NONE", 0, "No Falloff", ""}, {eWarp_Falloff_Curve, "CURVE", 0, "Curve", ""}, {eWarp_Falloff_Smooth, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", ""}, @@ -157,7 +157,7 @@ static EnumPropertyItem modifier_warp_falloff_items[] = { /* ***** Data Transfer ***** */ -EnumPropertyItem rna_enum_dt_method_vertex_items[] = { +const 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", @@ -175,7 +175,7 @@ EnumPropertyItem rna_enum_dt_method_vertex_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_dt_method_edge_items[] = { +const 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", @@ -189,7 +189,7 @@ EnumPropertyItem rna_enum_dt_method_edge_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_dt_method_loop_items[] = { +const 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", @@ -205,7 +205,7 @@ EnumPropertyItem rna_enum_dt_method_loop_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_dt_method_poly_items[] = { +const 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", @@ -217,7 +217,7 @@ EnumPropertyItem rna_enum_dt_method_poly_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_dt_mix_mode_items[] = { +const 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", @@ -236,7 +236,7 @@ EnumPropertyItem rna_enum_dt_mix_mode_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_dt_layers_select_src_items[] = { +const 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", @@ -248,7 +248,7 @@ EnumPropertyItem rna_enum_dt_layers_select_src_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_dt_layers_select_dst_items[] = { +const 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", @@ -258,20 +258,20 @@ EnumPropertyItem rna_enum_dt_layers_select_dst_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_axis_xy_items[] = { +const 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[] = { +const EnumPropertyItem rna_enum_axis_xyz_items[] = { {0, "X", 0, "X", ""}, {1, "Y", 0, "Y", ""}, {2, "Z", 0, "Z", ""}, {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_axis_flag_xyz_items[] = { +const EnumPropertyItem rna_enum_axis_flag_xyz_items[] = { {(1 << 0), "X", 0, "X", ""}, {(1 << 1), "Y", 0, "Y", ""}, {(1 << 2), "Z", 0, "Z", ""}, @@ -889,7 +889,7 @@ static void rna_DataTransferModifier_polys_data_types_set(struct PointerRNA *ptr dtmd->data_types |= value; } -static EnumPropertyItem *rna_DataTransferModifier_layers_select_src_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free) +static const EnumPropertyItem *rna_DataTransferModifier_layers_select_src_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free) { DataTransferModifierData *dtmd = (DataTransferModifierData *)ptr->data; EnumPropertyItem *item = NULL, tmp_item = {0}; @@ -981,7 +981,7 @@ static EnumPropertyItem *rna_DataTransferModifier_layers_select_src_itemf(bConte return item; } -static EnumPropertyItem *rna_DataTransferModifier_layers_select_dst_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free) +static const EnumPropertyItem *rna_DataTransferModifier_layers_select_dst_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free) { DataTransferModifierData *dtmd = (DataTransferModifierData *)ptr->data; EnumPropertyItem *item = NULL, tmp_item = {0}; @@ -1073,7 +1073,7 @@ static EnumPropertyItem *rna_DataTransferModifier_layers_select_dst_itemf(bConte return item; } -static EnumPropertyItem *rna_DataTransferModifier_mix_mode_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) +static const EnumPropertyItem *rna_DataTransferModifier_mix_mode_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { DataTransferModifierData *dtmd = (DataTransferModifierData *)ptr->data; EnumPropertyItem *item = NULL; @@ -1159,7 +1159,7 @@ static void rna_MeshSequenceCache_object_path_update(Main *bmain, Scene *scene, static PropertyRNA *rna_def_property_subdivision_common(StructRNA *srna, const char type[]) { - static EnumPropertyItem prop_subdivision_type_items[] = { + static const EnumPropertyItem prop_subdivision_type_items[] = { {0, "CATMULL_CLARK", 0, "Catmull-Clark", ""}, {1, "SIMPLE", 0, "Simple", ""}, {0, NULL, 0, NULL, NULL} @@ -1220,7 +1220,7 @@ static void rna_def_modifier_subsurf(BlenderRNA *brna) static void rna_def_modifier_generic_map_info(StructRNA *srna) { - static EnumPropertyItem prop_texture_coordinates_items[] = { + static const EnumPropertyItem prop_texture_coordinates_items[] = { {MOD_DISP_MAP_LOCAL, "LOCAL", 0, "Local", "Use the local coordinate system for the texture coordinates"}, {MOD_DISP_MAP_GLOBAL, "GLOBAL", 0, "Global", "Use the global coordinate system for the texture coordinates"}, {MOD_DISP_MAP_OBJECT, "OBJECT", 0, "Object", @@ -1403,7 +1403,7 @@ static void rna_def_modifier_curve(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_deform_axis_items[] = { + static const EnumPropertyItem prop_deform_axis_items[] = { {MOD_CURVE_POSX, "POS_X", 0, "X", ""}, {MOD_CURVE_POSY, "POS_Y", 0, "Y", ""}, {MOD_CURVE_POSZ, "POS_Z", 0, "Z", ""}, @@ -1570,7 +1570,7 @@ static void rna_def_modifier_mirror(BlenderRNA *brna) static void rna_def_modifier_decimate(BlenderRNA *brna) { - static EnumPropertyItem modifier_decim_mode_items[] = { + static const EnumPropertyItem modifier_decim_mode_items[] = { {MOD_DECIM_MODE_COLLAPSE, "COLLAPSE", 0, "Collapse", "Use edge collapsing"}, {MOD_DECIM_MODE_UNSUBDIV, "UNSUBDIV", 0, "Un-Subdivide", "Use un-subdivide face reduction"}, {MOD_DECIM_MODE_DISSOLVE, "DISSOLVE", 0, "Planar", "Dissolve geometry to form planar polygons"}, @@ -1950,7 +1950,7 @@ static void rna_def_modifier_boolean(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_operation_items[] = { + static const EnumPropertyItem prop_operation_items[] = { {eBooleanModifierOp_Intersect, "INTERSECT", 0, "Intersect", "Keep the part of the mesh that intersects with the other selected object"}, {eBooleanModifierOp_Union, "UNION", 0, "Union", "Combine two meshes in an additive way"}, @@ -1958,7 +1958,7 @@ static void rna_def_modifier_boolean(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_solver_items[] = { + static const EnumPropertyItem prop_solver_items[] = { {eBooleanModifierSolver_BMesh, "BMESH", 0, "BMesh", "Use the BMesh boolean solver"}, {eBooleanModifierSolver_Carve, "CARVE", 0, "Carve", "Use the Carve boolean solver"}, {0, NULL, 0, NULL, NULL} @@ -1995,7 +1995,7 @@ static void rna_def_modifier_boolean(BlenderRNA *brna) /* BMesh debugging options, only used when G_DEBUG is set */ /* BMesh intersection options */ - static EnumPropertyItem debug_items[] = { + static const EnumPropertyItem debug_items[] = { {eBooleanModifierBMeshFlag_BMesh_Separate, "SEPARATE", 0, "Separate", ""}, {eBooleanModifierBMeshFlag_BMesh_NoDissolve, "NO_DISSOLVE", 0, "No Dissolve", ""}, {eBooleanModifierBMeshFlag_BMesh_NoConnectRegions, "NO_CONNECT_REGIONS", 0, "No Connect Regions", ""}, @@ -2015,7 +2015,7 @@ static void rna_def_modifier_array(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_fit_type_items[] = { + static const EnumPropertyItem prop_fit_type_items[] = { {MOD_ARR_FIXEDCOUNT, "FIXED_COUNT", 0, "Fixed Count", "Duplicate the object a certain number of times"}, {MOD_ARR_FITLENGTH, "FIT_LENGTH", 0, "Fit Length", "Duplicate the object as many times as fits in a certain length"}, @@ -2156,7 +2156,7 @@ static void rna_def_modifier_displace(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_direction_items[] = { + static const EnumPropertyItem prop_direction_items[] = { {MOD_DISP_DIR_X, "X", 0, "X", "Use the texture's intensity value to displace in the X direction"}, {MOD_DISP_DIR_Y, "Y", 0, "Y", "Use the texture's intensity value to displace in the Y direction"}, {MOD_DISP_DIR_Z, "Z", 0, "Z", "Use the texture's intensity value to displace in the Z direction"}, @@ -2169,7 +2169,7 @@ static void rna_def_modifier_displace(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_space_items[] = { + static const EnumPropertyItem prop_space_items[] = { {MOD_DISP_SPACE_LOCAL, "LOCAL", 0, "Local", "Direction is defined in local coordinates"}, {MOD_DISP_SPACE_GLOBAL, "GLOBAL", 0, "Global", "Direction is defined in global coordinates"}, {0, NULL, 0, NULL, NULL} @@ -2347,7 +2347,7 @@ static void rna_def_modifier_correctivesmooth(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem modifier_smooth_type_items[] = { + static const EnumPropertyItem modifier_smooth_type_items[] = { {MOD_CORRECTIVESMOOTH_SMOOTH_SIMPLE, "SIMPLE", 0, "Simple", "Use the average of adjacent edge-vertices"}, {MOD_CORRECTIVESMOOTH_SMOOTH_LENGTH_WEIGHT, "LENGTH_WEIGHTED", 0, "Length Weight", @@ -2355,7 +2355,7 @@ static void rna_def_modifier_correctivesmooth(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem modifier_rest_source_items[] = { + static const EnumPropertyItem modifier_rest_source_items[] = { {MOD_CORRECTIVESMOOTH_RESTSOURCE_ORCO, "ORCO", 0, "Original Coords", "Use base mesh vert coords as the rest position"}, {MOD_CORRECTIVESMOOTH_RESTSOURCE_BIND, "BIND", 0, "Bind Coords", @@ -2493,7 +2493,7 @@ static void rna_def_modifier_cast(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_cast_type_items[] = { + static const EnumPropertyItem prop_cast_type_items[] = { {MOD_CAST_TYPE_SPHERE, "SPHERE", 0, "Sphere", ""}, {MOD_CAST_TYPE_CYLINDER, "CYLINDER", 0, "Cylinder", ""}, {MOD_CAST_TYPE_CUBOID, "CUBOID", 0, "Cuboid", ""}, @@ -2576,7 +2576,7 @@ static void rna_def_modifier_meshdeform(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; #if 0 - static EnumPropertyItem prop_mode_items[] = { + static const EnumPropertyItem prop_mode_items[] = { {0, "VOLUME", 0, "Volume", "Bind to volume inside cage mesh"}, {1, "SURFACE", 0, "Surface", "Bind to surface of cage mesh"}, {0, NULL, 0, NULL, NULL} @@ -2831,7 +2831,7 @@ static void rna_def_modifier_smoke(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_smoke_type_items[] = { + static const EnumPropertyItem prop_smoke_type_items[] = { {0, "NONE", 0, "None", ""}, {MOD_SMOKE_TYPE_DOMAIN, "DOMAIN", 0, "Domain", ""}, {MOD_SMOKE_TYPE_FLOW, "FLOW", 0, "Flow", "Inflow/Outflow"}, @@ -2912,7 +2912,7 @@ static void rna_def_modifier_bevel(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_limit_method_items[] = { + static const EnumPropertyItem prop_limit_method_items[] = { {0, "NONE", 0, "None", "Bevel the entire mesh by a constant amount"}, {MOD_BEVEL_ANGLE, "ANGLE", 0, "Angle", "Only bevel edges with sharp enough angles between faces"}, {MOD_BEVEL_WEIGHT, "WEIGHT", 0, "Weight", @@ -2922,7 +2922,7 @@ static void rna_def_modifier_bevel(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_val_type_items[] = { + static const EnumPropertyItem prop_val_type_items[] = { {MOD_BEVEL_AMT_OFFSET, "OFFSET", 0, "Offset", "Amount is offset of new edges from original"}, {MOD_BEVEL_AMT_WIDTH, "WIDTH", 0, "Width", "Amount is width of new face"}, {MOD_BEVEL_AMT_DEPTH, "DEPTH", 0, "Depth", "Amount is perpendicular distance from original edge to bevel face"}, @@ -2931,7 +2931,7 @@ static void rna_def_modifier_bevel(BlenderRNA *brna) }; /* TO BE DEPRECATED */ - static EnumPropertyItem prop_edge_weight_method_items[] = { + static const EnumPropertyItem prop_edge_weight_method_items[] = { {0, "AVERAGE", 0, "Average", ""}, {MOD_BEVEL_EMIN, "SHARPEST", 0, "Sharpest", ""}, {MOD_BEVEL_EMAX, "LARGEST", 0, "Largest", ""}, @@ -3021,7 +3021,7 @@ static void rna_def_modifier_shrinkwrap(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem shrink_type_items[] = { + static const EnumPropertyItem shrink_type_items[] = { {MOD_SHRINKWRAP_NEAREST_SURFACE, "NEAREST_SURFACEPOINT", 0, "Nearest Surface Point", "Shrink the mesh to the nearest target surface"}, {MOD_SHRINKWRAP_PROJECT, "PROJECT", 0, "Project", @@ -3031,7 +3031,7 @@ static void rna_def_modifier_shrinkwrap(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem shrink_face_cull_items[] = { + static const EnumPropertyItem shrink_face_cull_items[] = { {0, "OFF", 0, "Off", "No culling"}, {MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE, "FRONT", 0, "Front", "No projection when in front of the face"}, {MOD_SHRINKWRAP_CULL_TARGET_BACKFACE, "BACK", 0, "Back", "No projection when behind the face"}, @@ -3158,7 +3158,7 @@ static void rna_def_modifier_mask(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem modifier_mask_mode_items[] = { + static const EnumPropertyItem modifier_mask_mode_items[] = { {MOD_MASK_MODE_VGROUP, "VERTEX_GROUP", 0, "Vertex Group", ""}, {MOD_MASK_MODE_ARM, "ARMATURE", 0, "Armature", ""}, {0, NULL, 0, NULL, NULL} @@ -3198,7 +3198,7 @@ static void rna_def_modifier_simpledeform(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem simple_deform_mode_items[] = { + static const EnumPropertyItem simple_deform_mode_items[] = { {MOD_SIMPLEDEFORM_MODE_TWIST, "TWIST", 0, "Twist", "Rotate around the Z axis of the modifier space"}, {MOD_SIMPLEDEFORM_MODE_BEND, "BEND", 0, "Bend", "Bend the mesh over the Z axis of the modifier space"}, {MOD_SIMPLEDEFORM_MODE_TAPER, "TAPER", 0, "Taper", "Linearly scale along Z axis of the modifier space"}, @@ -3560,7 +3560,7 @@ static void rna_def_modifier_uvwarp(BlenderRNA *brna) static void rna_def_modifier_weightvg_mask(BlenderRNA *UNUSED(brna), StructRNA *srna, const char *mask_vgroup_setter, const char *mask_uvlayer_setter) { - static EnumPropertyItem weightvg_mask_tex_map_items[] = { + static const EnumPropertyItem weightvg_mask_tex_map_items[] = { {MOD_DISP_MAP_LOCAL, "LOCAL", 0, "Local", "Use local generated coordinates"}, {MOD_DISP_MAP_GLOBAL, "GLOBAL", 0, "Global", "Use global coordinates"}, {MOD_DISP_MAP_OBJECT, "OBJECT", 0, "Object", "Use local generated coordinates of another object"}, @@ -3568,7 +3568,7 @@ static void rna_def_modifier_weightvg_mask(BlenderRNA *UNUSED(brna), StructRNA * {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem weightvg_mask_tex_used_items[] = { + static const EnumPropertyItem weightvg_mask_tex_used_items[] = { {MOD_WVG_MASK_TEX_USE_INT, "INT", 0, "Intensity", ""}, {MOD_WVG_MASK_TEX_USE_RED, "RED", 0, "Red", ""}, {MOD_WVG_MASK_TEX_USE_GREEN, "GREEN", 0, "Green", ""}, @@ -3626,7 +3626,7 @@ static void rna_def_modifier_weightvg_mask(BlenderRNA *UNUSED(brna), StructRNA * static void rna_def_modifier_weightvgedit(BlenderRNA *brna) { - static EnumPropertyItem weightvg_edit_falloff_type_items[] = { + static const EnumPropertyItem weightvg_edit_falloff_type_items[] = { {MOD_WVG_MAPPING_NONE, "LINEAR", ICON_LINCURVE, "Linear", "Null action"}, {MOD_WVG_MAPPING_CURVE, "CURVE", ICON_RNDCURVE, "Custom Curve", ""}, {MOD_WVG_MAPPING_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", ""}, @@ -3707,7 +3707,7 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna) static void rna_def_modifier_weightvgmix(BlenderRNA *brna) { - static EnumPropertyItem weightvg_mix_modes_items[] = { + static const EnumPropertyItem weightvg_mix_modes_items[] = { {MOD_WVG_MIX_SET, "SET", 0, "Replace", "Replace VGroup A's weights by VGroup B's ones"}, {MOD_WVG_MIX_ADD, "ADD", 0, "Add", "Add VGroup B's weights to VGroup A's ones"}, {MOD_WVG_MIX_SUB, "SUB", 0, "Subtract", "Subtract VGroup B's weights from VGroup A's ones"}, @@ -3718,7 +3718,7 @@ static void rna_def_modifier_weightvgmix(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem weightvg_mix_set_items[] = { + static const EnumPropertyItem weightvg_mix_set_items[] = { {MOD_WVG_SET_ALL, "ALL", 0, "All", "Affect all vertices (might add some to VGroup A)"}, {MOD_WVG_SET_A, "A", 0, "VGroup A", "Affect vertices in VGroup A"}, {MOD_WVG_SET_B, "B", 0, "VGroup B", "Affect vertices in VGroup B (might add some to VGroup A)"}, @@ -3781,7 +3781,7 @@ static void rna_def_modifier_weightvgmix(BlenderRNA *brna) static void rna_def_modifier_weightvgproximity(BlenderRNA *brna) { - static EnumPropertyItem weightvg_proximity_modes_items[] = { + static const EnumPropertyItem weightvg_proximity_modes_items[] = { {MOD_WVG_PROXIMITY_OBJECT, "OBJECT", 0, "Object", "Use distance between affected and target objects"}, {MOD_WVG_PROXIMITY_GEOMETRY, "GEOMETRY", 0, "Geometry", @@ -3790,14 +3790,14 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem proximity_geometry_items[] = { + static const EnumPropertyItem proximity_geometry_items[] = { {MOD_WVG_PROXIMITY_GEOM_VERTS, "VERTEX", 0, "Vertex", "Compute distance to nearest vertex"}, {MOD_WVG_PROXIMITY_GEOM_EDGES, "EDGE", 0, "Edge", "Compute distance to nearest edge"}, {MOD_WVG_PROXIMITY_GEOM_FACES, "FACE", 0, "Face", "Compute distance to nearest face"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem weightvg_proximity_falloff_type_items[] = { + static const EnumPropertyItem weightvg_proximity_falloff_type_items[] = { {MOD_WVG_MAPPING_NONE, "LINEAR", ICON_LINCURVE, "Linear", "Null action"}, /* No curve mapping here! */ {MOD_WVG_MAPPING_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", ""}, @@ -3873,7 +3873,7 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna) static void rna_def_modifier_remesh(BlenderRNA *brna) { - static EnumPropertyItem mode_items[] = { + static const EnumPropertyItem mode_items[] = { {MOD_REMESH_CENTROID, "BLOCKS", 0, "Blocks", "Output a blocky surface with no smoothing"}, {MOD_REMESH_MASS_POINT, "SMOOTH", 0, "Smooth", "Output a smooth surface with no sharp-features detection"}, {MOD_REMESH_SHARP_FEATURES, "SHARP", 0, "Sharp", @@ -3940,7 +3940,7 @@ static void rna_def_modifier_ocean(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem geometry_items[] = { + static const EnumPropertyItem geometry_items[] = { {MOD_OCEAN_GEOM_GENERATE, "GENERATE", 0, "Generate", "Generate ocean surface geometry at the specified resolution"}, {MOD_OCEAN_GEOM_DISPLACE, "DISPLACE", 0, "Displace", "Displace existing geometry according to simulation"}, @@ -4177,13 +4177,13 @@ static void rna_def_modifier_triangulate(BlenderRNA *brna) static void rna_def_modifier_meshcache(BlenderRNA *brna) { - static EnumPropertyItem prop_format_type_items[] = { + static const EnumPropertyItem prop_format_type_items[] = { {MOD_MESHCACHE_TYPE_MDD, "MDD", 0, "MDD ", ""}, {MOD_MESHCACHE_TYPE_PC2, "PC2", 0, "PC2", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_deform_mode_items[] = { + static const EnumPropertyItem prop_deform_mode_items[] = { {MOD_MESHCACHE_DEFORM_OVERWRITE, "OVERWRITE", 0, "Overwrite", "Replace vertex coords with cached values"}, {MOD_MESHCACHE_DEFORM_INTEGRATE, "INTEGRATE", 0, "Integrate", @@ -4191,7 +4191,7 @@ static void rna_def_modifier_meshcache(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_interpolation_type_items[] = { + static const EnumPropertyItem prop_interpolation_type_items[] = { {MOD_MESHCACHE_INTERP_NONE, "NONE", 0, "None ", ""}, {MOD_MESHCACHE_INTERP_LINEAR, "LINEAR", 0, "Linear", ""}, /* for cardinal we'd need to read 4x cache's */ @@ -4199,7 +4199,7 @@ static void rna_def_modifier_meshcache(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_time_type_items[] = { + static const EnumPropertyItem prop_time_type_items[] = { /* use 'eval_frame' */ {MOD_MESHCACHE_TIME_FRAME, "FRAME", 0, "Frame", "Control playback using a frame-number " "(ignoring time FPS and start frame from the file)"}, @@ -4210,7 +4210,7 @@ static void rna_def_modifier_meshcache(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_time_play_items[] = { + static const EnumPropertyItem prop_time_play_items[] = { {MOD_MESHCACHE_PLAY_CFEA, "SCENE", 0, "Scene", "Use the time from the scene"}, {MOD_MESHCACHE_PLAY_EVAL, "CUSTOM", 0, "Custom", "Use the modifier's own time evaluation"}, {0, NULL, 0, NULL, NULL} @@ -4341,7 +4341,7 @@ static void rna_def_modifier_meshseqcache(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Object Path", "Path to the object in the Alembic archive used to lookup geometric data"); RNA_def_property_update(prop, 0, "rna_MeshSequenceCache_object_path_update"); - static EnumPropertyItem read_flag_items[] = { + static const EnumPropertyItem read_flag_items[] = { {MOD_MESHSEQ_READ_VERT, "VERT", 0, "Vertex", ""}, {MOD_MESHSEQ_READ_POLY, "POLY", 0, "Faces", ""}, {MOD_MESHSEQ_READ_UV, "UV", 0, "UV", ""}, @@ -4475,7 +4475,7 @@ static void rna_def_modifier_datatransfer(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem DT_layer_vert_items[] = { + static const EnumPropertyItem DT_layer_vert_items[] = { {DT_TYPE_MDEFORMVERT, "VGROUP_WEIGHTS", 0, "Vertex Group(s)", "Transfer active or all vertex groups"}, #if 0 /* TODO */ {DT_TYPE_SHAPEKEY, "SHAPEKEYS", 0, "Shapekey(s)", "Transfer active or all shape keys"}, @@ -4487,7 +4487,7 @@ static void rna_def_modifier_datatransfer(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem DT_layer_edge_items[] = { + static const EnumPropertyItem DT_layer_edge_items[] = { {DT_TYPE_SHARP_EDGE, "SHARP_EDGE", 0, "Sharp", "Transfer sharp mark"}, {DT_TYPE_SEAM, "SEAM", 0, "UV Seam", "Transfer UV seam mark"}, {DT_TYPE_CREASE, "CREASE", 0, "Subsurf Crease", "Transfer crease values"}, @@ -4496,14 +4496,14 @@ static void rna_def_modifier_datatransfer(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem DT_layer_loop_items[] = { + static const EnumPropertyItem DT_layer_loop_items[] = { {DT_TYPE_LNOR, "CUSTOM_NORMAL", 0, "Custom Normals", "Transfer custom normals"}, {DT_TYPE_VCOL, "VCOL", 0, "VCol", "Vertex (face corners) colors"}, {DT_TYPE_UV, "UV", 0, "UVs", "Transfer UV layers"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem DT_layer_poly_items[] = { + static const EnumPropertyItem DT_layer_poly_items[] = { {DT_TYPE_SHARP_FACE, "SMOOTH", 0, "Smooth", "Transfer flat/smooth mark"}, {DT_TYPE_FREESTYLE_FACE, "FREESTYLE_FACE", 0, "Freestyle Mark", "Transfer Freestyle face mark"}, {0, NULL, 0, NULL, NULL} @@ -4698,7 +4698,7 @@ static void rna_def_modifier_normaledit(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_mode_items[] = { + static const EnumPropertyItem prop_mode_items[] = { {MOD_NORMALEDIT_MODE_RADIAL, "RADIAL", 0, "Radial", "From an ellipsoid (shape defined by the boundbox's dimensions, target is optional)"}, {MOD_NORMALEDIT_MODE_DIRECTIONAL, "DIRECTIONAL", 0, "Directional", @@ -4706,7 +4706,7 @@ static void rna_def_modifier_normaledit(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_mix_mode_items[] = { + static const EnumPropertyItem prop_mix_mode_items[] = { {MOD_NORMALEDIT_MIX_COPY, "COPY", 0, "Copy", "Copy new normals (overwrite existing)"}, {MOD_NORMALEDIT_MIX_ADD, "ADD", 0, "Add", "Copy sum of new and old normals"}, {MOD_NORMALEDIT_MIX_SUB, "SUB", 0, "Subtract", "Copy new normals minus old normals"}, diff --git a/source/blender/makesrna/intern/rna_movieclip.c b/source/blender/makesrna/intern/rna_movieclip.c index 15411f85ba3..fb743f5236d 100644 --- a/source/blender/makesrna/intern/rna_movieclip.c +++ b/source/blender/makesrna/intern/rna_movieclip.c @@ -211,7 +211,7 @@ static void rna_def_moviecliUser(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem clip_render_size_items[] = { + static const EnumPropertyItem clip_render_size_items[] = { {MCLIP_PROXY_RENDER_SIZE_25, "PROXY_25", 0, "Proxy size 25%", ""}, {MCLIP_PROXY_RENDER_SIZE_50, "PROXY_50", 0, "Proxy size 50%", ""}, {MCLIP_PROXY_RENDER_SIZE_75, "PROXY_75", 0, "Proxy size 75%", ""}, @@ -258,7 +258,7 @@ static void rna_def_movieclip(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem clip_source_items[] = { + static const EnumPropertyItem clip_source_items[] = { {MCLIP_SRC_SEQUENCE, "SEQUENCE", 0, "Image Sequence", "Multiple image files, as a sequence"}, {MCLIP_SRC_MOVIE, "MOVIE", 0, "Movie File", "Movie file"}, {0, NULL, 0, NULL, NULL} diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c index d72c858a5d5..20d5e1e959c 100644 --- a/source/blender/makesrna/intern/rna_nla.c +++ b/source/blender/makesrna/intern/rna_nla.c @@ -471,7 +471,7 @@ static void rna_NlaTrack_solo_set(PointerRNA *ptr, int value) #else /* enum defines exported for rna_animation.c */ -EnumPropertyItem rna_enum_nla_mode_blend_items[] = { +const EnumPropertyItem rna_enum_nla_mode_blend_items[] = { {NLASTRIP_MODE_REPLACE, "REPLACE", 0, "Replace", "Result strip replaces the accumulated results by amount specified by influence"}, {NLASTRIP_MODE_ADD, "ADD", 0, "Add", "Weighted result of strip is added to the accumulated results"}, @@ -482,7 +482,7 @@ EnumPropertyItem rna_enum_nla_mode_blend_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_nla_mode_extend_items[] = { +const EnumPropertyItem rna_enum_nla_mode_extend_items[] = { {NLASTRIP_EXTEND_NOTHING, "NOTHING", 0, "Nothing", "Strip has no influence past its extents"}, {NLASTRIP_EXTEND_HOLD, "HOLD", 0, "Hold", "Hold the first frame if no previous strips in track, and always hold last frame"}, @@ -521,7 +521,7 @@ static void rna_def_nlastrip(BlenderRNA *brna) PropertyRNA *prop; /* enum defs */ - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {NLASTRIP_TYPE_CLIP, "CLIP", 0, "Action Clip", "NLA Strip references some Action"}, {NLASTRIP_TYPE_TRANSITION, "TRANSITION", 0, "Transition", "NLA Strip 'transitions' between adjacent strips"}, {NLASTRIP_TYPE_META, "META", 0, "Meta", "NLA Strip acts as a container for adjacent strips"}, diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 523c5c219d8..45793635877 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -66,21 +66,21 @@ #include "NOD_composite.h" -EnumPropertyItem rna_enum_node_socket_in_out_items[] = { +const EnumPropertyItem rna_enum_node_socket_in_out_items[] = { { SOCK_IN, "IN", 0, "Input", "" }, { SOCK_OUT, "OUT", 0, "Output", "" }, { 0, NULL, 0, NULL, NULL } }; #ifndef RNA_RUNTIME -static EnumPropertyItem rna_enum_node_socket_draw_shape_items[] = { +static const EnumPropertyItem rna_enum_node_socket_draw_shape_items[] = { {SOCK_DRAW_SHAPE_CIRCLE, "CIRCLE", 0, "Circle", ""}, {SOCK_DRAW_SHAPE_SQUARE, "SQUARE", 0, "Square", ""}, {SOCK_DRAW_SHAPE_DIAMOND, "DIAMOND", 0, "Diamond", ""}, {0, NULL, 0, NULL, NULL } }; -static EnumPropertyItem node_socket_type_items[] = { +static const EnumPropertyItem node_socket_type_items[] = { {SOCK_CUSTOM, "CUSTOM", 0, "Custom", ""}, {SOCK_FLOAT, "VALUE", 0, "Value", ""}, {SOCK_INT, "INT", 0, "Int", ""}, @@ -92,14 +92,14 @@ static EnumPropertyItem node_socket_type_items[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem node_quality_items[] = { +static const EnumPropertyItem node_quality_items[] = { {NTREE_QUALITY_HIGH, "HIGH", 0, "High", "High quality"}, {NTREE_QUALITY_MEDIUM, "MEDIUM", 0, "Medium", "Medium quality"}, {NTREE_QUALITY_LOW, "LOW", 0, "Low", "Low quality"}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem node_chunksize_items[] = { +static const EnumPropertyItem node_chunksize_items[] = { {NTREE_CHUNCKSIZE_32, "32", 0, "32x32", "Chunksize of 32x32"}, {NTREE_CHUNCKSIZE_64, "64", 0, "64x64", "Chunksize of 64x64"}, {NTREE_CHUNCKSIZE_128, "128", 0, "128x128", "Chunksize of 128x128"}, @@ -113,14 +113,14 @@ static EnumPropertyItem node_chunksize_items[] = { #define DEF_ICON_BLANK_SKIP #define DEF_ICON(name) {ICON_##name, (#name), 0, (#name), ""}, #define DEF_VICO(name) -EnumPropertyItem rna_enum_node_icon_items[] = { +const EnumPropertyItem rna_enum_node_icon_items[] = { #include "UI_icons.h" {0, NULL, 0, NULL, NULL}}; #undef DEF_ICON_BLANK_SKIP #undef DEF_ICON #undef DEF_VICO -EnumPropertyItem rna_enum_node_math_items[] = { +const EnumPropertyItem rna_enum_node_math_items[] = { {NODE_MATH_ADD, "ADD", 0, "Add", ""}, {NODE_MATH_SUB, "SUBTRACT", 0, "Subtract", ""}, {NODE_MATH_MUL, "MULTIPLY", 0, "Multiply", ""}, @@ -143,7 +143,7 @@ EnumPropertyItem rna_enum_node_math_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_node_vec_math_items[] = { +const EnumPropertyItem rna_enum_node_vec_math_items[] = { {0, "ADD", 0, "Add", ""}, {1, "SUBTRACT", 0, "Subtract", ""}, {2, "AVERAGE", 0, "Average", ""}, @@ -153,7 +153,7 @@ EnumPropertyItem rna_enum_node_vec_math_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_node_filter_items[] = { +const EnumPropertyItem rna_enum_node_filter_items[] = { {0, "SOFTEN", 0, "Soften", ""}, {1, "SHARPEN", 0, "Sharpen", ""}, {2, "LAPLACE", 0, "Laplace", ""}, @@ -165,7 +165,7 @@ EnumPropertyItem rna_enum_node_filter_items[] = { }; #ifndef RNA_RUNTIME -static EnumPropertyItem node_sampler_type_items[] = { +static const EnumPropertyItem node_sampler_type_items[] = { {0, "NEAREST", 0, "Nearest", ""}, {1, "BILINEAR", 0, "Bilinear", ""}, {2, "BICUBIC", 0, "Bicubic", ""}, @@ -243,7 +243,7 @@ bNodeTreeType *rna_node_tree_type_from_enum(int value) return result; } -EnumPropertyItem *rna_node_tree_type_itemf(void *data, int (*poll)(void *data, bNodeTreeType *), bool *r_free) +const EnumPropertyItem *rna_node_tree_type_itemf(void *data, int (*poll)(void *data, bNodeTreeType *), bool *r_free) { EnumPropertyItem tmp = {0}; EnumPropertyItem *item = NULL; @@ -319,7 +319,7 @@ bNodeType *rna_node_type_from_enum(int value) return result; } -EnumPropertyItem *rna_node_type_itemf(void *data, int (*poll)(void *data, bNodeType *), bool *r_free) +const EnumPropertyItem *rna_node_type_itemf(void *data, int (*poll)(void *data, bNodeType *), bool *r_free) { EnumPropertyItem *item = NULL; EnumPropertyItem tmp = {0}; @@ -393,7 +393,8 @@ bNodeSocketType *rna_node_socket_type_from_enum(int value) return result; } -EnumPropertyItem *rna_node_socket_type_itemf(void *data, int (*poll)(void *data, bNodeSocketType *), bool *r_free) +const EnumPropertyItem *rna_node_socket_type_itemf( + void *data, int (*poll)(void *data, bNodeSocketType *), bool *r_free) { EnumPropertyItem *item = NULL; EnumPropertyItem tmp = {0}; @@ -429,7 +430,7 @@ EnumPropertyItem *rna_node_socket_type_itemf(void *data, int (*poll)(void *data, return item; } -static EnumPropertyItem *rna_node_static_type_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) +static const EnumPropertyItem *rna_node_static_type_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { EnumPropertyItem *item = NULL; EnumPropertyItem tmp; @@ -2639,7 +2640,7 @@ static void rna_Node_image_layer_update(Main *bmain, Scene *scene, PointerRNA *p } } -static EnumPropertyItem *renderresult_layers_add_enum(RenderLayer *rl) +static const EnumPropertyItem *renderresult_layers_add_enum(RenderLayer *rl) { EnumPropertyItem *item = NULL; EnumPropertyItem tmp = {0}; @@ -2662,12 +2663,12 @@ static EnumPropertyItem *renderresult_layers_add_enum(RenderLayer *rl) return item; } -static EnumPropertyItem *rna_Node_image_layer_itemf(bContext *UNUSED(C), PointerRNA *ptr, +static const EnumPropertyItem *rna_Node_image_layer_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { bNode *node = (bNode *)ptr->data; Image *ima = (Image *)node->id; - EnumPropertyItem *item = NULL; + const EnumPropertyItem *item = NULL; RenderLayer *rl; if (ima == NULL || ima->rr == NULL) { @@ -2703,7 +2704,7 @@ static int rna_Node_image_has_views_get(PointerRNA *ptr) return BLI_listbase_count_ex(&ima->rr->views, 2) > 1; } -static EnumPropertyItem *renderresult_views_add_enum(RenderView *rv) +static const EnumPropertyItem *renderresult_views_add_enum(RenderView *rv) { EnumPropertyItem *item = NULL; EnumPropertyItem tmp = {0, "ALL", 0, "All", ""}; @@ -2729,12 +2730,12 @@ static EnumPropertyItem *renderresult_views_add_enum(RenderView *rv) return item; } -static EnumPropertyItem *rna_Node_image_view_itemf(bContext *UNUSED(C), PointerRNA *ptr, +static const EnumPropertyItem *rna_Node_image_view_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { bNode *node = (bNode *)ptr->data; Image *ima = (Image *)node->id; - EnumPropertyItem *item = NULL; + const EnumPropertyItem *item = NULL; RenderView *rv; if (ima == NULL || ima->rr == NULL) { @@ -2750,12 +2751,12 @@ static EnumPropertyItem *rna_Node_image_view_itemf(bContext *UNUSED(C), PointerR return item; } -static EnumPropertyItem *rna_Node_scene_layer_itemf(bContext *UNUSED(C), PointerRNA *ptr, +static const EnumPropertyItem *rna_Node_scene_layer_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { bNode *node = (bNode *)ptr->data; Scene *sce = (Scene *)node->id; - EnumPropertyItem *item = NULL; + const EnumPropertyItem *item = NULL; RenderLayer *rl; if (sce == NULL) { @@ -2779,7 +2780,7 @@ static void rna_Node_scene_layer_update(Main *bmain, Scene *scene, PointerRNA *p } } -static EnumPropertyItem *rna_Node_channel_itemf(bContext *UNUSED(C), PointerRNA *ptr, +static const EnumPropertyItem *rna_Node_channel_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { bNode *node = (bNode *)ptr->data; @@ -3205,43 +3206,43 @@ void rna_ShaderNodePointDensity_density_minmax(bNode *self, #else -static EnumPropertyItem prop_image_layer_items[] = { +static const EnumPropertyItem prop_image_layer_items[] = { { 0, "PLACEHOLDER", 0, "Placeholder", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem prop_image_view_items[] = { +static const EnumPropertyItem prop_image_view_items[] = { { 0, "ALL", 0, "All", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem prop_scene_layer_items[] = { +static const EnumPropertyItem prop_scene_layer_items[] = { { 0, "PLACEHOLDER", 0, "Placeholder", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem prop_tri_channel_items[] = { +static const EnumPropertyItem prop_tri_channel_items[] = { { 1, "R", 0, "R", ""}, { 2, "G", 0, "G", ""}, { 3, "B", 0, "B", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem node_flip_items[] = { +static const EnumPropertyItem node_flip_items[] = { {0, "X", 0, "Flip X", ""}, {1, "Y", 0, "Flip Y", ""}, {2, "XY", 0, "Flip X & Y", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem node_ycc_items[] = { +static const EnumPropertyItem node_ycc_items[] = { { 0, "ITUBT601", 0, "ITU 601", ""}, { 1, "ITUBT709", 0, "ITU 709", ""}, { 2, "JFIF", 0, "Jpeg", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem node_glossy_items[] = { +static const EnumPropertyItem node_glossy_items[] = { {SHD_GLOSSY_SHARP, "SHARP", 0, "Sharp", ""}, {SHD_GLOSSY_BECKMANN, "BECKMANN", 0, "Beckmann", ""}, {SHD_GLOSSY_GGX, "GGX", 0, "GGX", ""}, @@ -3250,7 +3251,7 @@ static EnumPropertyItem node_glossy_items[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem node_anisotropic_items[] = { +static const EnumPropertyItem node_anisotropic_items[] = { {SHD_GLOSSY_BECKMANN, "BECKMANN", 0, "Beckmann", ""}, {SHD_GLOSSY_GGX, "GGX", 0, "GGX", ""}, {SHD_GLOSSY_MULTI_GGX, "MULTI_GGX", 0, "Multiscatter GGX", ""}, @@ -3258,7 +3259,7 @@ static EnumPropertyItem node_anisotropic_items[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem node_glass_items[] = { +static const EnumPropertyItem node_glass_items[] = { {SHD_GLOSSY_SHARP, "SHARP", 0, "Sharp", ""}, {SHD_GLOSSY_BECKMANN, "BECKMANN", 0, "Beckmann", ""}, {SHD_GLOSSY_GGX, "GGX", 0, "GGX", ""}, @@ -3266,32 +3267,32 @@ static EnumPropertyItem node_glass_items[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem node_refraction_items[] = { +static const EnumPropertyItem node_refraction_items[] = { {SHD_GLOSSY_SHARP, "SHARP", 0, "Sharp", ""}, {SHD_GLOSSY_BECKMANN, "BECKMANN", 0, "Beckmann", ""}, {SHD_GLOSSY_GGX, "GGX", 0, "GGX", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem node_toon_items[] = { +static const EnumPropertyItem node_toon_items[] = { {SHD_TOON_DIFFUSE, "DIFFUSE", 0, "Diffuse", ""}, {SHD_TOON_GLOSSY, "GLOSSY", 0, "Glossy", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem node_hair_items[] = { +static const EnumPropertyItem node_hair_items[] = { {SHD_HAIR_REFLECTION, "Reflection", 0, "Reflection", ""}, {SHD_HAIR_TRANSMISSION, "Transmission", 0, "Transmission", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem node_script_mode_items[] = { +static const EnumPropertyItem node_script_mode_items[] = { {NODE_SCRIPT_INTERNAL, "INTERNAL", 0, "Internal", "Use internal text data-block"}, {NODE_SCRIPT_EXTERNAL, "EXTERNAL", 0, "External", "Use external .osl or .oso file"}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem node_principled_distribution_items[] = { +static const EnumPropertyItem node_principled_distribution_items[] = { { SHD_GLOSSY_GGX, "GGX", 0, "GGX", "" }, { SHD_GLOSSY_MULTI_GGX, "MULTI_GGX", 0, "Multiscatter GGX", "" }, { 0, NULL, 0, NULL, NULL } @@ -3551,7 +3552,7 @@ static void def_sh_material(StructRNA *srna) static void def_sh_mapping(StructRNA *srna) { - static EnumPropertyItem prop_vect_type_items[] = { + static const EnumPropertyItem prop_vect_type_items[] = { {TEXMAP_TYPE_TEXTURE, "TEXTURE", 0, "Texture", "Transform a texture by inverse mapping the texture coordinate"}, {TEXMAP_TYPE_POINT, "POINT", 0, "Point", "Transform a point"}, {TEXMAP_TYPE_VECTOR, "VECTOR", 0, "Vector", "Transform a direction vector"}, @@ -3670,7 +3671,7 @@ static void def_sh_tex(StructRNA *srna) static void def_sh_tex_sky(StructRNA *srna) { - static EnumPropertyItem prop_sky_type[] = { + static const EnumPropertyItem prop_sky_type[] = { {SHD_SKY_OLD, "PREETHAM", 0, "Preetham", ""}, {SHD_SKY_NEW, "HOSEK_WILKIE", 0, "Hosek / Wilkie", ""}, {0, NULL, 0, NULL, NULL} @@ -3787,7 +3788,7 @@ static void def_sh_tex_image(StructRNA *srna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_image_extension[] = { + static const EnumPropertyItem prop_image_extension[] = { {SHD_IMAGE_EXTENSION_REPEAT, "REPEAT", 0, "Repeat", "Cause the image to repeat horizontally and vertically"}, {SHD_IMAGE_EXTENSION_EXTEND, "EXTEND", 0, "Extend", "Extend by repeating edge pixels of the image"}, {SHD_IMAGE_EXTENSION_CLIP, "CLIP", 0, "Clip", "Clip to image size and set exterior pixels as transparent"}, @@ -3841,7 +3842,7 @@ static void def_sh_tex_image(StructRNA *srna) static void def_sh_tex_gradient(StructRNA *srna) { - static EnumPropertyItem prop_gradient_type[] = { + static const EnumPropertyItem prop_gradient_type[] = { {SHD_BLEND_LINEAR, "LINEAR", 0, "Linear", "Create a linear progression"}, {SHD_BLEND_QUADRATIC, "QUADRATIC", 0, "Quadratic", "Create a quadratic progression"}, {SHD_BLEND_EASING, "EASING", 0, "Easing", "Create a progression easing from one step to the next"}, @@ -3929,7 +3930,7 @@ static void def_sh_tex_magic(StructRNA *srna) static void def_sh_tex_musgrave(StructRNA *srna) { - static EnumPropertyItem prop_musgrave_type[] = { + static const EnumPropertyItem prop_musgrave_type[] = { {SHD_MUSGRAVE_MULTIFRACTAL, "MULTIFRACTAL", 0, "Multifractal", ""}, {SHD_MUSGRAVE_RIDGED_MULTIFRACTAL, "RIDGED_MULTIFRACTAL", 0, "Ridged Multifractal", ""}, {SHD_MUSGRAVE_HYBRID_MULTIFRACTAL, "HYBRID_MULTIFRACTAL", 0, "Hybrid Multifractal", ""}, @@ -3952,7 +3953,7 @@ static void def_sh_tex_musgrave(StructRNA *srna) static void def_sh_tex_voronoi(StructRNA *srna) { - static EnumPropertyItem prop_coloring_items[] = { + static const EnumPropertyItem prop_coloring_items[] = { {SHD_VORONOI_INTENSITY, "INTENSITY", 0, "Intensity", "Only calculate intensity"}, {SHD_VORONOI_CELLS, "CELLS", 0, "Cells", "Color cells by position"}, {0, NULL, 0, NULL, NULL} @@ -3972,13 +3973,13 @@ static void def_sh_tex_voronoi(StructRNA *srna) static void def_sh_tex_wave(StructRNA *srna) { - static EnumPropertyItem prop_wave_type_items[] = { + static const EnumPropertyItem prop_wave_type_items[] = { {SHD_WAVE_BANDS, "BANDS", 0, "Bands", "Use standard wave texture in bands"}, {SHD_WAVE_RINGS, "RINGS", 0, "Rings", "Use wave texture in rings"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_wave_profile_items[] = { + static const EnumPropertyItem prop_wave_profile_items[] = { {SHD_WAVE_PROFILE_SIN, "SIN", 0, "Sine", "Use a standard sine profile"}, {SHD_WAVE_PROFILE_SAW, "SAW", 0, "Saw", "Use a sawtooth profile"}, {0, NULL, 0, NULL, NULL} @@ -4021,14 +4022,14 @@ static void def_sh_tex_coord(StructRNA *srna) static void def_sh_vect_transform(StructRNA *srna) { - static EnumPropertyItem prop_vect_type_items[] = { + static const EnumPropertyItem prop_vect_type_items[] = { {SHD_VECT_TRANSFORM_TYPE_POINT, "POINT", 0, "Point", "Transform a point"}, {SHD_VECT_TRANSFORM_TYPE_VECTOR, "VECTOR", 0, "Vector", "Transform a direction vector"}, {SHD_VECT_TRANSFORM_TYPE_NORMAL, "NORMAL", 0, "Normal", "Transform a normal vector with unit length"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_vect_space_items[] = { + static const EnumPropertyItem prop_vect_space_items[] = { {SHD_VECT_TRANSFORM_SPACE_WORLD, "WORLD", 0, "World", ""}, {SHD_VECT_TRANSFORM_SPACE_OBJECT, "OBJECT", 0, "Object", ""}, {SHD_VECT_TRANSFORM_SPACE_CAMERA, "CAMERA", 0, "Camera", ""}, @@ -4073,7 +4074,7 @@ static void def_sh_tex_pointdensity(StructRNA *srna) FunctionRNA *func; PropertyRNA *parm; - static EnumPropertyItem point_source_items[] = { + static const EnumPropertyItem point_source_items[] = { {SHD_POINTDENSITY_SOURCE_PSYS, "PARTICLE_SYSTEM", 0, "Particle System", "Generate point density from a particle system"}, {SHD_POINTDENSITY_SOURCE_OBJECT, "OBJECT", 0, "Object Vertices", @@ -4091,13 +4092,13 @@ static void def_sh_tex_pointdensity(StructRNA *srna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem space_items[] = { + static const EnumPropertyItem space_items[] = { {SHD_POINTDENSITY_SPACE_OBJECT, "OBJECT", 0, "Object Space", ""}, {SHD_POINTDENSITY_SPACE_WORLD, "WORLD", 0, "World Space", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem particle_color_source_items[] = { + static const EnumPropertyItem particle_color_source_items[] = { {SHD_POINTDENSITY_COLOR_PARTAGE, "PARTICLE_AGE", 0, "Particle Age", "Lifetime mapped as 0.0 - 1.0 intensity"}, {SHD_POINTDENSITY_COLOR_PARTSPEED, "PARTICLE_SPEED", 0, "Particle Speed", @@ -4107,7 +4108,7 @@ static void def_sh_tex_pointdensity(StructRNA *srna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem vertex_color_source_items[] = { + static const EnumPropertyItem vertex_color_source_items[] = { {SHD_POINTDENSITY_COLOR_VERTCOL, "VERTEX_COLOR", 0, "Vertex Color", "Vertex color layer"}, {SHD_POINTDENSITY_COLOR_VERTWEIGHT, "VERTEX_WEIGHT", 0, "Vertex Weight", "Vertex group weight"}, {SHD_POINTDENSITY_COLOR_VERTNOR, "VERTEX_NORMAL", 0, "Vertex Normal", @@ -4116,7 +4117,7 @@ static void def_sh_tex_pointdensity(StructRNA *srna) }; /* TODO(sergey): Use some mnemonic names for the hardcoded values here. */ - static EnumPropertyItem calc_mode_items[] = { + static const EnumPropertyItem calc_mode_items[] = { {0, "VIEWPORT", 0, "Viewport", "Canculate density using viewport settings"}, {1, "RENDER", 0, "Render", "Canculate duplis using render settings"}, {0, NULL, 0, NULL, NULL} @@ -4326,7 +4327,7 @@ static void def_sh_uvalongstroke(StructRNA *srna) static void def_sh_normal_map(StructRNA *srna) { - static EnumPropertyItem prop_space_items[] = { + static const EnumPropertyItem prop_space_items[] = { {SHD_NORMAL_MAP_TANGENT, "TANGENT", 0, "Tangent Space", "Tangent space normal mapping"}, {SHD_NORMAL_MAP_OBJECT, "OBJECT", 0, "Object Space", "Object space normal mapping"}, {SHD_NORMAL_MAP_WORLD, "WORLD", 0, "World Space", "World space normal mapping"}, @@ -4353,13 +4354,13 @@ static void def_sh_normal_map(StructRNA *srna) static void def_sh_tangent(StructRNA *srna) { - static EnumPropertyItem prop_direction_type_items[] = { + static const EnumPropertyItem prop_direction_type_items[] = { {SHD_TANGENT_RADIAL, "RADIAL", 0, "Radial", "Radial tangent around the X, Y or Z axis"}, {SHD_TANGENT_UVMAP, "UV_MAP", 0, "UV Map", "Tangent from UV map"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_axis_items[] = { + static const EnumPropertyItem prop_axis_items[] = { {SHD_TANGENT_AXIS_X, "X", 0, "X", "X axis"}, {SHD_TANGENT_AXIS_Y, "Y", 0, "Y", "Y axis"}, {SHD_TANGENT_AXIS_Z, "Z", 0, "Z", "Z axis"}, @@ -4390,7 +4391,7 @@ static void def_sh_tangent(StructRNA *srna) static void def_sh_subsurface(StructRNA *srna) { - static EnumPropertyItem prop_subsurface_falloff_items[] = { + static const EnumPropertyItem prop_subsurface_falloff_items[] = { {SHD_SUBSURFACE_CUBIC, "CUBIC", 0, "Cubic", "Simple cubic falloff function"}, {SHD_SUBSURFACE_GAUSSIAN, "GAUSSIAN", 0, "Gaussian", "Normal distribution, multiple can be combined to fit more complex profiles"}, {SHD_SUBSURFACE_BURLEY, "BURLEY", 0, "Christensen-Burley", "Approximation to physically based volume scattering"}, @@ -4502,7 +4503,7 @@ static void def_cmp_blur(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem filter_type_items[] = { + static const EnumPropertyItem filter_type_items[] = { {R_FILTER_BOX, "FLAT", 0, "Flat", ""}, {R_FILTER_TENT, "TENT", 0, "Tent", ""}, {R_FILTER_QUAD, "QUAD", 0, "Quadratic", ""}, @@ -4514,7 +4515,7 @@ static void def_cmp_blur(StructRNA *srna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem aspect_correction_type_items[] = { + static const EnumPropertyItem aspect_correction_type_items[] = { {CMP_NODE_BLUR_ASPECT_NONE, "NONE", 0, "None", ""}, {CMP_NODE_BLUR_ASPECT_Y, "Y", 0, "Y", ""}, {CMP_NODE_BLUR_ASPECT_X, "X", 0, "X", ""}, @@ -4701,7 +4702,7 @@ static void def_cmp_levels(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem channel_items[] = { + static const EnumPropertyItem channel_items[] = { {1, "COMBINED_RGB", 0, "C", "Combined RGB"}, {2, "RED", 0, "R", "Red Channel"}, {3, "GREEN", 0, "G", "Green Channel"}, @@ -4785,7 +4786,7 @@ static void def_cmp_image(StructRNA *srna) PropertyRNA *prop; #if 0 - static EnumPropertyItem type_items[] = { + static const EnumPropertyItem type_items[] = { {IMA_SRC_FILE, "IMAGE", 0, "Image", ""}, {IMA_SRC_MOVIE, "MOVIE", "Movie", ""}, {IMA_SRC_SEQUENCE, "SEQUENCE", "Sequence", ""}, @@ -4959,7 +4960,7 @@ static void def_cmp_dilate_erode(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem mode_items[] = { + static const EnumPropertyItem mode_items[] = { {CMP_NODE_DILATEERODE_STEP, "STEP", 0, "Step", ""}, {CMP_NODE_DILATEERODE_DISTANCE_THRESH, "THRESHOLD", 0, "Threshold", ""}, {CMP_NODE_DILATEERODE_DISTANCE, "DISTANCE", 0, "Distance", ""}, @@ -5039,7 +5040,7 @@ static void def_cmp_scale(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem space_items[] = { + static const EnumPropertyItem space_items[] = { {CMP_SCALE_RELATIVE, "RELATIVE", 0, "Relative", ""}, {CMP_SCALE_ABSOLUTE, "ABSOLUTE", 0, "Absolute", ""}, {CMP_SCALE_SCENEPERCENT, "SCENE_SIZE", 0, "Scene Size", ""}, @@ -5140,7 +5141,7 @@ static void def_cmp_distance_matte(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem color_space_items[] = { + static const EnumPropertyItem color_space_items[] = { {1, "RGB", 0, "RGB", "RGB color space"}, {2, "YCC", 0, "YCC", "YCbCr Suppression"}, {0, NULL, 0, NULL, NULL} @@ -5174,21 +5175,21 @@ static void def_cmp_color_spill(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem channel_items[] = { + static const EnumPropertyItem channel_items[] = { {1, "R", 0, "R", "Red Spill Suppression"}, {2, "G", 0, "G", "Green Spill Suppression"}, {3, "B", 0, "B", "Blue Spill Suppression"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem limit_channel_items[] = { + static const EnumPropertyItem limit_channel_items[] = { {0, "R", 0, "R", "Limit by Red"}, {1, "G", 0, "G", "Limit by Green"}, {2, "B", 0, "B", "Limit by Blue"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem algorithm_items[] = { + static const EnumPropertyItem algorithm_items[] = { {0, "SIMPLE", 0, "Simple", "Simple Limit Algorithm"}, {1, "AVERAGE", 0, "Average", "Average Limit Algorithm"}, {0, NULL, 0, NULL, NULL} @@ -5318,7 +5319,7 @@ static void def_cmp_channel_matte(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem color_space_items[] = { + static const EnumPropertyItem color_space_items[] = { {CMP_NODE_CHANNEL_MATTE_CS_RGB, "RGB", 0, "RGB", "RGB Color Space"}, {CMP_NODE_CHANNEL_MATTE_CS_HSV, "HSV", 0, "HSV", "HSV Color Space"}, {CMP_NODE_CHANNEL_MATTE_CS_YUV, "YUV", 0, "YUV", "YUV Color Space"}, @@ -5326,7 +5327,7 @@ static void def_cmp_channel_matte(StructRNA *srna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem algorithm_items[] = { + static const EnumPropertyItem algorithm_items[] = { {0, "SINGLE", 0, "Single", "Limit by single channel"}, {1, "MAX", 0, "Max", "Limit by max of other channels "}, {0, NULL, 0, NULL, NULL} @@ -5423,13 +5424,13 @@ static void def_cmp_double_edge_mask(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem BufEdgeMode_items[] = { + static const EnumPropertyItem BufEdgeMode_items[] = { {0, "BLEED_OUT", 0, "Bleed Out", "Allow mask pixels to bleed along edges"}, {1, "KEEP_IN", 0, "Keep In", "Restrict mask pixels from touching edges"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem InnerEdgeMode_items[] = { + static const EnumPropertyItem InnerEdgeMode_items[] = { {0, "ALL", 0, "All", "All pixels on inner mask edge are considered during mask calculation"}, {1, "ADJACENT_ONLY", 0, "Adjacent Only", "Only inner mask pixels adjacent to outer mask pixels are considered during mask calculation"}, @@ -5464,7 +5465,7 @@ static void def_cmp_defocus(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem bokeh_items[] = { + static const EnumPropertyItem bokeh_items[] = { {8, "OCTAGON", 0, "Octagonal", "8 sides"}, {7, "HEPTAGON", 0, "Heptagonal", "7 sides"}, {6, "HEXAGON", 0, "Hexagonal", "6 sides"}, @@ -5708,7 +5709,7 @@ static void def_cmp_premul_key(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem type_items[] = { + static const EnumPropertyItem type_items[] = { {0, "STRAIGHT_TO_PREMUL", 0, "Straight to Premul", ""}, {1, "PREMUL_TO_STRAIGHT", 0, "Premul to Straight", ""}, {0, NULL, 0, NULL, NULL} @@ -5726,7 +5727,7 @@ static void def_cmp_glare(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem type_items[] = { + static const EnumPropertyItem type_items[] = { {3, "GHOSTS", 0, "Ghosts", ""}, {2, "STREAKS", 0, "Streaks", ""}, {1, "FOG_GLOW", 0, "Fog Glow", ""}, @@ -5734,7 +5735,7 @@ static void def_cmp_glare(StructRNA *srna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem quality_items[] = { + static const EnumPropertyItem quality_items[] = { {0, "HIGH", 0, "High", ""}, {1, "MEDIUM", 0, "Medium", ""}, {2, "LOW", 0, "Low", ""}, @@ -5822,7 +5823,7 @@ static void def_cmp_tonemap(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem type_items[] = { + static const EnumPropertyItem type_items[] = { {1, "RD_PHOTORECEPTOR", 0, "R/D Photoreceptor", ""}, {0, "RH_SIMPLE", 0, "Rh Simple", ""}, {0, NULL, 0, NULL, NULL} @@ -5909,7 +5910,7 @@ static void def_cmp_colorbalance(StructRNA *srna) PropertyRNA *prop; static float default_1[3] = {1.f, 1.f, 1.f}; - static EnumPropertyItem type_items[] = { + static const EnumPropertyItem type_items[] = { {0, "LIFT_GAMMA_GAIN", 0, "Lift/Gamma/Gain", ""}, {1, "OFFSET_POWER_SLOPE", 0, "Offset/Power/Slope (ASC-CDL)", "ASC-CDL standard color correction"}, {0, NULL, 0, NULL, NULL} @@ -6058,7 +6059,7 @@ static void def_cmp_moviedistortion(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem distortion_type_items[] = { + static const EnumPropertyItem distortion_type_items[] = { {0, "UNDISTORT", 0, "Undistort", ""}, {1, "DISTORT", 0, "Distort", ""}, {0, NULL, 0, NULL, NULL} @@ -6082,7 +6083,7 @@ static void def_cmp_mask(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem aspect_type_items[] = { + static const EnumPropertyItem aspect_type_items[] = { {0, "SCENE", 0, "Scene Size", ""}, {CMP_NODEFLAG_MASK_FIXED, "FIXED", 0, "Fixed", "Use pixel size for the buffer"}, {CMP_NODEFLAG_MASK_FIXED_SCENE, "FIXED_SCENE", 0, "Fixed/Scene", "Pixel size scaled by scene percentage"}, @@ -6156,7 +6157,7 @@ static void dev_cmd_transform(StructRNA *srna) /* -- Compositor Nodes ------------------------------------------------------ */ -static EnumPropertyItem node_masktype_items[] = { +static const EnumPropertyItem node_masktype_items[] = { {0, "ADD", 0, "Add", ""}, {1, "SUBTRACT", 0, "Subtract", ""}, {2, "MULTIPLY", 0, "Multiply", ""}, @@ -6532,7 +6533,7 @@ static void def_cmp_colorcorrection(StructRNA *srna) static void def_cmp_viewer(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem tileorder_items[] = { + static const EnumPropertyItem tileorder_items[] = { {0, "CENTEROUT", 0, "Center", "Expand from center"}, {1, "RANDOM", 0, "Random", "Random tiles"}, {2, "BOTTOMUP", 0, "Bottom up", "Expand from bottom"}, @@ -6679,7 +6680,7 @@ static void def_cmp_trackpos(StructRNA *srna) { PropertyRNA *prop; - static EnumPropertyItem position_items[] = { + static const EnumPropertyItem position_items[] = { {CMP_TRACKPOS_ABSOLUTE, "ABSOLUTE", 0, "Absolute", "Output absolute position of a marker"}, {CMP_TRACKPOS_RELATIVE_START, "RELATIVE_START", 0, @@ -6724,7 +6725,7 @@ static void def_cmp_trackpos(StructRNA *srna) static void def_cmp_translate(StructRNA *srna) { - static EnumPropertyItem translate_items[] = { + static const EnumPropertyItem translate_items[] = { {CMP_NODE_WRAP_NONE, "NONE", 0, "None", "No wrapping on X and Y"}, {CMP_NODE_WRAP_X, "XAXIS", 0, "X Axis", "Wrap all pixels on the X axis"}, {CMP_NODE_WRAP_Y, "YAXIS", 0, "Y Axis", "Wrap all pixels on the Y axis"}, @@ -7680,11 +7681,11 @@ static void rna_def_node(BlenderRNA *brna) FunctionRNA *func; PropertyRNA *parm; - static EnumPropertyItem dummy_static_type_items[] = { + static const EnumPropertyItem dummy_static_type_items[] = { {NODE_CUSTOM, "CUSTOM", 0, "Custom", "Custom Node"}, {0, NULL, 0, NULL, NULL}}; - static EnumPropertyItem node_shading_compatibilities[] = { + static const EnumPropertyItem node_shading_compatibilities[] = { {NODE_OLD_SHADING, "OLD_SHADING", 0, "Old Shading", "Old shading system compatibility"}, {NODE_NEW_SHADING, "NEW_SHADING", 0, "New Shading", "New shading system compatibility"}, {0, NULL, 0, NULL, NULL} @@ -8141,7 +8142,7 @@ static void rna_def_nodetree(BlenderRNA *brna) FunctionRNA *func; PropertyRNA *parm; - static EnumPropertyItem static_type_items[] = { + static const EnumPropertyItem static_type_items[] = { {NTREE_SHADER, "SHADER", ICON_MATERIAL, "Shader", "Shader nodes"}, {NTREE_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture nodes"}, {NTREE_COMPOSIT, "COMPOSITING", ICON_RENDERLAYERS, "Compositing", "Compositing nodes"}, diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 1f018a6ddfc..e179d78898f 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -60,7 +60,7 @@ #include "WM_api.h" #include "WM_types.h" -EnumPropertyItem rna_enum_object_mode_items[] = { +const EnumPropertyItem rna_enum_object_mode_items[] = { {OB_MODE_OBJECT, "OBJECT", ICON_OBJECT_DATAMODE, "Object Mode", ""}, {OB_MODE_EDIT, "EDIT", ICON_EDITMODE_HLT, "Edit Mode", ""}, {OB_MODE_POSE, "POSE", ICON_POSE_HLT, "Pose Mode", ""}, @@ -73,7 +73,7 @@ EnumPropertyItem rna_enum_object_mode_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_object_empty_drawtype_items[] = { +const EnumPropertyItem rna_enum_object_empty_drawtype_items[] = { {OB_PLAINAXES, "PLAIN_AXES", 0, "Plain Axes", ""}, {OB_ARROWS, "ARROWS", 0, "Arrows", ""}, {OB_SINGLE_ARROW, "SINGLE_ARROW", 0, "Single Arrow", ""}, @@ -86,7 +86,7 @@ EnumPropertyItem rna_enum_object_empty_drawtype_items[] = { }; -static EnumPropertyItem parent_type_items[] = { +static const EnumPropertyItem parent_type_items[] = { {PAROBJECT, "OBJECT", 0, "Object", "The object is parented to an object"}, {PARSKEL, "ARMATURE", 0, "Armature", ""}, {PARSKEL, "LATTICE", 0, "Lattice", "The object is parented to a lattice"}, /* PARSKEL reuse will give issues */ @@ -97,7 +97,7 @@ static EnumPropertyItem parent_type_items[] = { }; #ifndef RNA_RUNTIME -static EnumPropertyItem dupli_items[] = { +static const EnumPropertyItem dupli_items[] = { {0, "NONE", 0, "None", ""}, {OB_DUPLIFRAMES, "FRAMES", 0, "Frames", "Make copy of object for every frame"}, {OB_DUPLIVERTS, "VERTS", 0, "Verts", "Duplicate child objects on all vertices"}, @@ -107,7 +107,7 @@ static EnumPropertyItem dupli_items[] = { }; #endif -static EnumPropertyItem collision_bounds_items[] = { +static const EnumPropertyItem collision_bounds_items[] = { {OB_BOUND_BOX, "BOX", ICON_MESH_CUBE, "Box", ""}, {OB_BOUND_SPHERE, "SPHERE", ICON_MESH_UVSPHERE, "Sphere", ""}, {OB_BOUND_CYLINDER, "CYLINDER", ICON_MESH_CYLINDER, "Cylinder", ""}, @@ -119,7 +119,7 @@ static EnumPropertyItem collision_bounds_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_metaelem_type_items[] = { +const EnumPropertyItem rna_enum_metaelem_type_items[] = { {MB_BALL, "BALL", ICON_META_BALL, "Ball", ""}, {MB_TUBE, "CAPSULE", ICON_META_CAPSULE, "Capsule", ""}, {MB_PLANE, "PLANE", ICON_META_PLANE, "Plane", ""}, @@ -133,7 +133,7 @@ EnumPropertyItem rna_enum_metaelem_type_items[] = { #define OBTYPE_CU_SURF {OB_SURF, "SURFACE", 0, "Surface", ""} #define OBTYPE_CU_FONT {OB_FONT, "FONT", 0, "Font", ""} -EnumPropertyItem rna_enum_object_type_items[] = { +const EnumPropertyItem rna_enum_object_type_items[] = { {OB_MESH, "MESH", 0, "Mesh", ""}, OBTYPE_CU_CURVE, OBTYPE_CU_SURF, @@ -150,14 +150,14 @@ EnumPropertyItem rna_enum_object_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_object_type_curve_items[] = { +const EnumPropertyItem rna_enum_object_type_curve_items[] = { OBTYPE_CU_CURVE, OBTYPE_CU_SURF, OBTYPE_CU_FONT, {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_object_axis_items[] = { +const EnumPropertyItem rna_enum_object_axis_items[] = { {OB_POSX, "POS_X", 0, "+X", ""}, {OB_POSY, "POS_Y", 0, "+Y", ""}, {OB_POSZ, "POS_Z", 0, "+Z", ""}, @@ -445,7 +445,7 @@ static void rna_Object_parent_type_set(PointerRNA *ptr, int value) ED_object_parent(ob, ob->parent, value, ob->parsubstr); } -static EnumPropertyItem *rna_Object_parent_type_itemf(bContext *UNUSED(C), PointerRNA *ptr, +static const EnumPropertyItem *rna_Object_parent_type_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { Object *ob = (Object *)ptr->data; @@ -486,7 +486,7 @@ static void rna_Object_empty_draw_type_set(PointerRNA *ptr, int value) BKE_object_empty_draw_type_set(ob, value); } -static EnumPropertyItem *rna_Object_collision_bounds_itemf(bContext *UNUSED(C), PointerRNA *ptr, +static const EnumPropertyItem *rna_Object_collision_bounds_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { Object *ob = (Object *)ptr->data; @@ -1524,7 +1524,7 @@ static void rna_def_vertex_group(BlenderRNA *brna) FunctionRNA *func; PropertyRNA *parm; - static EnumPropertyItem assign_mode_items[] = { + static const EnumPropertyItem assign_mode_items[] = { {WEIGHT_REPLACE, "REPLACE", 0, "Replace", "Replace"}, {WEIGHT_ADD, "ADD", 0, "Add", "Add"}, {WEIGHT_SUBTRACT, "SUBTRACT", 0, "Subtract", "Subtract"}, @@ -1586,7 +1586,7 @@ static void rna_def_material_slot(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem link_items[] = { + static const EnumPropertyItem link_items[] = { {1, "OBJECT", 0, "Object", ""}, {0, "DATA", 0, "Data", ""}, {0, NULL, 0, NULL, NULL} @@ -1627,7 +1627,7 @@ static void rna_def_object_game_settings(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem body_type_items[] = { + static const EnumPropertyItem body_type_items[] = { {OB_BODY_TYPE_NO_COLLISION, "NO_COLLISION", 0, "No Collision", "Disable collision for this object"}, {OB_BODY_TYPE_STATIC, "STATIC", 0, "Static", "Stationary object"}, {OB_BODY_TYPE_DYNAMIC, "DYNAMIC", 0, "Dynamic", "Linear physics"}, @@ -2162,14 +2162,14 @@ static void rna_def_object(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem up_items[] = { + static const EnumPropertyItem up_items[] = { {OB_POSX, "X", 0, "X", ""}, {OB_POSY, "Y", 0, "Y", ""}, {OB_POSZ, "Z", 0, "Z", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem drawtype_items[] = { + static const EnumPropertyItem drawtype_items[] = { {OB_BOUNDBOX, "BOUNDS", 0, "Bounds", "Draw the bounds of the object"}, {OB_WIRE, "WIRE", 0, "Wire", "Draw the object as a wireframe"}, {OB_SOLID, "SOLID", 0, "Solid", "Draw the object as a solid (if solid drawing is enabled in the viewport)"}, @@ -2178,7 +2178,7 @@ static void rna_def_object(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem boundtype_items[] = { + static const EnumPropertyItem boundtype_items[] = { {OB_BOUND_BOX, "BOX", 0, "Box", "Draw bounds as box"}, {OB_BOUND_SPHERE, "SPHERE", 0, "Sphere", "Draw bounds as sphere"}, {OB_BOUND_CYLINDER, "CYLINDER", 0, "Cylinder", "Draw bounds as cylinder"}, @@ -2190,7 +2190,7 @@ static void rna_def_object(BlenderRNA *brna) /* XXX: this RNA enum define is currently duplicated for objects, * since there is some text here which is not applicable */ - static EnumPropertyItem prop_rotmode_items[] = { + static const EnumPropertyItem prop_rotmode_items[] = { {ROT_MODE_QUAT, "QUATERNION", 0, "Quaternion (WXYZ)", "No Gimbal Lock"}, {ROT_MODE_XYZ, "XYZ", 0, "XYZ Euler", "XYZ Rotation Order - prone to Gimbal Lock (default)"}, {ROT_MODE_XZY, "XZY", 0, "XZY Euler", "XZY Rotation Order - prone to Gimbal Lock"}, diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index 9b9f0705bb4..1d58a4a6350 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -47,7 +47,7 @@ #include "rna_internal.h" /* own include */ -static EnumPropertyItem space_items[] = { +static const EnumPropertyItem space_items[] = { {CONSTRAINT_SPACE_WORLD, "WORLD", 0, "World Space", "The most gobal space in Blender"}, {CONSTRAINT_SPACE_POSE, "POSE", 0, "Pose Space", @@ -488,13 +488,13 @@ void RNA_api_object(StructRNA *srna) FunctionRNA *func; PropertyRNA *parm; - static EnumPropertyItem mesh_type_items[] = { + static const EnumPropertyItem mesh_type_items[] = { {eModifierMode_Realtime, "PREVIEW", 0, "Preview", "Apply modifier preview settings"}, {eModifierMode_Render, "RENDER", 0, "Render", "Apply modifier render settings"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem dupli_eval_mode_items[] = { + static const EnumPropertyItem dupli_eval_mode_items[] = { {DAG_EVAL_VIEWPORT, "VIEWPORT", 0, "Viewport", "Generate duplis using viewport settings"}, {DAG_EVAL_PREVIEW, "PREVIEW", 0, "Preview", "Generate duplis using preview settings"}, {DAG_EVAL_RENDER, "RENDER", 0, "Render", "Generate duplis using render settings"}, @@ -502,7 +502,7 @@ void RNA_api_object(StructRNA *srna) }; #ifndef NDEBUG - static EnumPropertyItem mesh_dm_info_items[] = { + static const EnumPropertyItem mesh_dm_info_items[] = { {0, "SOURCE", 0, "Source", "Source mesh"}, {1, "DEFORM", 0, "Deform", "Objects deform mesh"}, {2, "FINAL", 0, "Final", "Objects final mesh"}, diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index 514fca1b011..366de586fa5 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -41,7 +41,7 @@ #include "WM_api.h" #include "WM_types.h" -static EnumPropertyItem effector_shape_items[] = { +static const EnumPropertyItem effector_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Surface", ""}, @@ -55,20 +55,20 @@ static EnumPropertyItem effector_shape_items[] = { /* type specific return values only used from functions */ -static EnumPropertyItem curve_shape_items[] = { +static const EnumPropertyItem curve_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Curve", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem empty_shape_items[] = { +static const EnumPropertyItem empty_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem vortex_shape_items[] = { +static const EnumPropertyItem vortex_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Surface falloff (New)", ""}, @@ -76,14 +76,14 @@ static EnumPropertyItem vortex_shape_items[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem curve_vortex_shape_items[] = { +static const EnumPropertyItem curve_vortex_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Curve (New)", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem empty_vortex_shape_items[] = { +static const EnumPropertyItem empty_vortex_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {0, NULL, 0, NULL, NULL} @@ -736,7 +736,7 @@ static void rna_softbody_dependency_update(Main *bmain, Scene *scene, PointerRNA rna_softbody_update(bmain, scene, ptr); } -static EnumPropertyItem *rna_Effector_shape_itemf(bContext *UNUSED(C), PointerRNA *ptr, +static const EnumPropertyItem *rna_Effector_shape_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { Object *ob = NULL; @@ -795,7 +795,7 @@ static void rna_def_pointcache(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem point_cache_compress_items[] = { + static const EnumPropertyItem point_cache_compress_items[] = { {PTCACHE_COMPRESS_NO, "NO", 0, "No", "No compression"}, {PTCACHE_COMPRESS_LZO, "LIGHT", 0, "Light", "Fast but not so effective compression"}, {PTCACHE_COMPRESS_LZMA, "HEAVY", 0, "Heavy", "Effective but slow compression"}, @@ -1123,7 +1123,7 @@ static void rna_def_field(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem field_type_items[] = { + static const EnumPropertyItem field_type_items[] = { {0, "NONE", 0, "None", ""}, {PFIELD_FORCE, "FORCE", ICON_FORCE_FORCE, "Force", "Radial field toward the center of object"}, {PFIELD_WIND, "WIND", ICON_FORCE_WIND, "Wind", "Constant force along the force object's local Z axis"}, @@ -1146,28 +1146,28 @@ static void rna_def_field(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem falloff_items[] = { + static const EnumPropertyItem falloff_items[] = { {PFIELD_FALL_SPHERE, "SPHERE", 0, "Sphere", ""}, {PFIELD_FALL_TUBE, "TUBE", 0, "Tube", ""}, {PFIELD_FALL_CONE, "CONE", 0, "Cone", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem texture_items[] = { + static const EnumPropertyItem texture_items[] = { {PFIELD_TEX_RGB, "RGB", 0, "RGB", ""}, {PFIELD_TEX_GRAD, "GRADIENT", 0, "Gradient", ""}, {PFIELD_TEX_CURL, "CURL", 0, "Curl", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem zdirection_items[] = { + static const EnumPropertyItem zdirection_items[] = { {PFIELD_Z_BOTH, "BOTH", 0, "Both Z", ""}, {PFIELD_Z_POS, "POSITIVE", 0, "+Z", ""}, {PFIELD_Z_NEG, "NEGATIVE", 0, "-Z", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem guide_kink_items[] = { + static const EnumPropertyItem guide_kink_items[] = { {0, "NONE", 0, "Nothing", ""}, {1, "CURL", 0, "Curl", ""}, {2, "RADIAL", 0, "Radial", ""}, @@ -1565,7 +1565,7 @@ static void rna_def_softbody(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem collision_type_items[] = { + static const EnumPropertyItem collision_type_items[] = { {SBC_MODE_MANUAL, "MANUAL", 0, "Manual", "Manual adjust"}, {SBC_MODE_AVG, "AVERAGE", 0, "Average", "Average Spring length * Ball Size"}, {SBC_MODE_MIN, "MINIMAL", 0, "Minimal", "Minimal Spring length * Ball Size"}, @@ -1574,7 +1574,7 @@ static void rna_def_softbody(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem aerodynamics_type[] = { + static const EnumPropertyItem aerodynamics_type[] = { {0, "SIMPLE", 0, "Simple", "Edges receive a drag force from surrounding media"}, {1, "LIFT_FORCE", 0, "Lift Force", "Edges receive a lift force when passing through surrounding media"}, {0, NULL, 0, NULL, NULL} diff --git a/source/blender/makesrna/intern/rna_packedfile.c b/source/blender/makesrna/intern/rna_packedfile.c index f3da03714a1..c7891680adb 100644 --- a/source/blender/makesrna/intern/rna_packedfile.c +++ b/source/blender/makesrna/intern/rna_packedfile.c @@ -35,7 +35,7 @@ #include "rna_internal.h" -EnumPropertyItem rna_enum_unpack_method_items[] = { +const EnumPropertyItem rna_enum_unpack_method_items[] = { {PF_USE_LOCAL, "USE_LOCAL", 0, "Use Local File", ""}, {PF_WRITE_LOCAL, "WRITE_LOCAL", 0, "Write Local File (overwrite existing)", ""}, {PF_USE_ORIGINAL, "USE_ORIGINAL", 0, "Use Original File", ""}, diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 00104b8667d..7fc0ffeb747 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -55,7 +55,7 @@ #include "WM_api.h" #ifdef RNA_RUNTIME -static EnumPropertyItem part_from_items[] = { +static const EnumPropertyItem part_from_items[] = { {PART_FROM_VERT, "VERT", 0, "Verts", ""}, {PART_FROM_FACE, "FACE", 0, "Faces", ""}, {PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""}, @@ -64,7 +64,7 @@ static EnumPropertyItem part_from_items[] = { #endif #ifndef RNA_RUNTIME -static EnumPropertyItem part_reactor_from_items[] = { +static const EnumPropertyItem part_reactor_from_items[] = { {PART_FROM_VERT, "VERT", 0, "Verts", ""}, {PART_FROM_FACE, "FACE", 0, "Faces", ""}, {PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""}, @@ -72,7 +72,7 @@ static EnumPropertyItem part_reactor_from_items[] = { }; #endif -static EnumPropertyItem part_dist_items[] = { +static const EnumPropertyItem part_dist_items[] = { {PART_DISTR_JIT, "JIT", 0, "Jittered", ""}, {PART_DISTR_RAND, "RAND", 0, "Random", ""}, {PART_DISTR_GRID, "GRID", 0, "Grid", ""}, @@ -80,14 +80,14 @@ static EnumPropertyItem part_dist_items[] = { }; #ifdef RNA_RUNTIME -static EnumPropertyItem part_hair_dist_items[] = { +static const EnumPropertyItem part_hair_dist_items[] = { {PART_DISTR_JIT, "JIT", 0, "Jittered", ""}, {PART_DISTR_RAND, "RAND", 0, "Random", ""}, {0, NULL, 0, NULL, NULL} }; #endif -static EnumPropertyItem part_draw_as_items[] = { +static const EnumPropertyItem part_draw_as_items[] = { {PART_DRAW_NOT, "NONE", 0, "None", ""}, {PART_DRAW_REND, "RENDER", 0, "Rendered", ""}, {PART_DRAW_DOT, "DOT", 0, "Point", ""}, @@ -98,7 +98,7 @@ static EnumPropertyItem part_draw_as_items[] = { }; #ifdef RNA_RUNTIME -static EnumPropertyItem part_hair_draw_as_items[] = { +static const EnumPropertyItem part_hair_draw_as_items[] = { {PART_DRAW_NOT, "NONE", 0, "None", ""}, {PART_DRAW_REND, "RENDER", 0, "Rendered", ""}, {PART_DRAW_PATH, "PATH", 0, "Path", ""}, @@ -106,7 +106,7 @@ static EnumPropertyItem part_hair_draw_as_items[] = { }; #endif -static EnumPropertyItem part_ren_as_items[] = { +static const EnumPropertyItem part_ren_as_items[] = { {PART_DRAW_NOT, "NONE", 0, "None", ""}, {PART_DRAW_HALO, "HALO", 0, "Halo", ""}, {PART_DRAW_LINE, "LINE", 0, "Line", ""}, @@ -118,7 +118,7 @@ static EnumPropertyItem part_ren_as_items[] = { }; #ifdef RNA_RUNTIME -static EnumPropertyItem part_hair_ren_as_items[] = { +static const EnumPropertyItem part_hair_ren_as_items[] = { {PART_DRAW_NOT, "NONE", 0, "None", ""}, {PART_DRAW_PATH, "PATH", 0, "Path", ""}, {PART_DRAW_OB, "OBJECT", 0, "Object", ""}, @@ -397,7 +397,7 @@ static void rna_ParticleSystem_co_hair(ParticleSystem *particlesystem, Object *o } -static EnumPropertyItem *rna_Particle_Material_itemf(bContext *C, PointerRNA *UNUSED(ptr), +static const EnumPropertyItem *rna_Particle_Material_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { Object *ob = CTX_data_pointer_get(C, "object").data; @@ -1141,7 +1141,7 @@ static int rna_ParticleDupliWeight_name_length(PointerRNA *ptr) return strlen(tstr); } -static EnumPropertyItem *rna_Particle_from_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), +static const EnumPropertyItem *rna_Particle_from_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { /*if (part->type==PART_REACTOR) */ @@ -1150,7 +1150,7 @@ static EnumPropertyItem *rna_Particle_from_itemf(bContext *UNUSED(C), PointerRNA return part_from_items; } -static EnumPropertyItem *rna_Particle_dist_itemf(bContext *UNUSED(C), PointerRNA *ptr, +static const EnumPropertyItem *rna_Particle_dist_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { ParticleSettings *part = ptr->id.data; @@ -1161,7 +1161,7 @@ static EnumPropertyItem *rna_Particle_dist_itemf(bContext *UNUSED(C), PointerRNA return part_dist_items; } -static EnumPropertyItem *rna_Particle_draw_as_itemf(bContext *UNUSED(C), PointerRNA *ptr, +static const EnumPropertyItem *rna_Particle_draw_as_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { ParticleSettings *part = ptr->id.data; @@ -1172,7 +1172,7 @@ static EnumPropertyItem *rna_Particle_draw_as_itemf(bContext *UNUSED(C), Pointer return part_draw_as_items; } -static EnumPropertyItem *rna_Particle_ren_as_itemf(bContext *UNUSED(C), PointerRNA *ptr, +static const EnumPropertyItem *rna_Particle_ren_as_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { ParticleSettings *part = ptr->id.data; @@ -1426,7 +1426,7 @@ static void rna_def_particle(BlenderRNA *brna) FunctionRNA *func; PropertyRNA *parm; - static EnumPropertyItem alive_items[] = { + static const EnumPropertyItem alive_items[] = { /*{PARS_KILLED, "KILLED", 0, "Killed", ""}, */ {PARS_DEAD, "DEAD", 0, "Dead", ""}, {PARS_UNBORN, "UNBORN", 0, "Unborn", ""}, @@ -1570,7 +1570,7 @@ static void rna_def_fluid_settings(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem sph_solver_items[] = { + static const EnumPropertyItem sph_solver_items[] = { {SPH_SOLVER_DDR, "DDR", 0, "Double-Density", "An artistic solver with strong surface tension effects (original)"}, {SPH_SOLVER_CLASSICAL, "CLASSICAL", 0, "Classical", "A more physically-accurate solver"}, {0, NULL, 0, NULL, NULL} @@ -1720,7 +1720,7 @@ static void rna_def_particle_settings_mtex(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem texco_items[] = { + static const EnumPropertyItem texco_items[] = { {TEXCO_GLOB, "GLOBAL", 0, "Global", "Use global coordinates for the texture coordinates"}, {TEXCO_OBJECT, "OBJECT", 0, "Object", "Use linked object's coordinates for texture coordinates"}, {TEXCO_UV, "UV", 0, "UV", "Use UV coordinates for texture coordinates"}, @@ -1730,7 +1730,7 @@ static void rna_def_particle_settings_mtex(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_mapping_items[] = { + static const EnumPropertyItem prop_mapping_items[] = { {MTEX_FLAT, "FLAT", 0, "Flat", "Map X and Y coordinates directly"}, {MTEX_CUBE, "CUBE", 0, "Cube", "Map using the normal vector"}, {MTEX_TUBE, "TUBE", 0, "Tube", "Map with Z as central axis"}, @@ -1738,7 +1738,7 @@ static void rna_def_particle_settings_mtex(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_x_mapping_items[] = { + static const EnumPropertyItem prop_x_mapping_items[] = { {0, "NONE", 0, "None", ""}, {1, "X", 0, "X", ""}, {2, "Y", 0, "Y", ""}, @@ -1746,7 +1746,7 @@ static void rna_def_particle_settings_mtex(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_y_mapping_items[] = { + static const EnumPropertyItem prop_y_mapping_items[] = { {0, "NONE", 0, "None", ""}, {1, "X", 0, "X", ""}, {2, "Y", 0, "Y", ""}, @@ -1754,7 +1754,7 @@ static void rna_def_particle_settings_mtex(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_z_mapping_items[] = { + static const EnumPropertyItem prop_z_mapping_items[] = { {0, "NONE", 0, "None", ""}, {1, "X", 0, "X", ""}, {2, "Y", 0, "Y", ""}, @@ -1963,14 +1963,14 @@ static void rna_def_particle_settings(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem type_items[] = { + static const EnumPropertyItem type_items[] = { {PART_EMITTER, "EMITTER", 0, "Emitter", ""}, /*{PART_REACTOR, "REACTOR", 0, "Reactor", ""}, */ {PART_HAIR, "HAIR", 0, "Hair", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem phys_type_items[] = { + static const EnumPropertyItem phys_type_items[] = { {PART_PHYS_NO, "NO", 0, "No", ""}, {PART_PHYS_NEWTON, "NEWTON", 0, "Newtonian", ""}, {PART_PHYS_KEYED, "KEYED", 0, "Keyed", ""}, @@ -1979,7 +1979,7 @@ static void rna_def_particle_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem rot_mode_items[] = { + static const EnumPropertyItem rot_mode_items[] = { {0, "NONE", 0, "None", ""}, {PART_ROT_NOR, "NOR", 0, "Normal", ""}, {PART_ROT_NOR_TAN, "NOR_TAN", 0, "Normal-Tangent", ""}, @@ -1993,7 +1993,7 @@ static void rna_def_particle_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem ave_mode_items[] = { + static const EnumPropertyItem ave_mode_items[] = { {0, "NONE", 0, "None", ""}, {PART_AVE_VELOCITY, "VELOCITY", 0, "Velocity", ""}, {PART_AVE_HORIZONTAL, "HORIZONTAL", 0, "Horizontal", ""}, @@ -2005,14 +2005,14 @@ static void rna_def_particle_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem react_event_items[] = { + static const EnumPropertyItem react_event_items[] = { {PART_EVENT_DEATH, "DEATH", 0, "Death", ""}, {PART_EVENT_COLLIDE, "COLLIDE", 0, "Collision", ""}, {PART_EVENT_NEAR, "NEAR", 0, "Near", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem child_type_items[] = { + static const EnumPropertyItem child_type_items[] = { {0, "NONE", 0, "None", ""}, {PART_CHILD_PARTICLES, "SIMPLE", 0, "Simple", ""}, {PART_CHILD_FACES, "INTERPOLATED", 0, "Interpolated", ""}, @@ -2020,7 +2020,7 @@ static void rna_def_particle_settings(BlenderRNA *brna) }; /*TODO: names, tooltips */ - static EnumPropertyItem integrator_type_items[] = { + static const EnumPropertyItem integrator_type_items[] = { {PART_INT_EULER, "EULER", 0, "Euler", ""}, {PART_INT_VERLET, "VERLET", 0, "Verlet", ""}, {PART_INT_MIDPOINT, "MIDPOINT", 0, "Midpoint", ""}, @@ -2028,7 +2028,7 @@ static void rna_def_particle_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem kink_type_items[] = { + static const EnumPropertyItem kink_type_items[] = { {PART_KINK_NO, "NO", 0, "Nothing", ""}, {PART_KINK_CURL, "CURL", 0, "Curl", ""}, {PART_KINK_RADIAL, "RADIAL", 0, "Radial", ""}, @@ -2038,7 +2038,7 @@ static void rna_def_particle_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem bb_align_items[] = { + static const EnumPropertyItem bb_align_items[] = { {PART_BB_X, "X", 0, "X", ""}, {PART_BB_Y, "Y", 0, "Y", ""}, {PART_BB_Z, "Z", 0, "Z", ""}, @@ -2047,7 +2047,7 @@ static void rna_def_particle_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem bb_anim_items[] = { + static const EnumPropertyItem bb_anim_items[] = { {PART_BB_ANIM_NONE, "NONE", 0, "None", ""}, {PART_BB_ANIM_AGE, "AGE", 0, "Age", ""}, {PART_BB_ANIM_FRAME, "FRAME", 0, "Frame", ""}, @@ -2055,14 +2055,14 @@ static void rna_def_particle_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem bb_split_offset_items[] = { + static const EnumPropertyItem bb_split_offset_items[] = { {PART_BB_OFF_NONE, "NONE", 0, "None", ""}, {PART_BB_OFF_LINEAR, "LINEAR", 0, "Linear", ""}, {PART_BB_OFF_RANDOM, "RANDOM", 0, "Random", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem draw_col_items[] = { + static const EnumPropertyItem draw_col_items[] = { {PART_DRAW_COL_NONE, "NONE", 0, "None", ""}, {PART_DRAW_COL_MAT, "MATERIAL", 0, "Material", ""}, {PART_DRAW_COL_VEL, "VELOCITY", 0, "Velocity", ""}, @@ -2070,7 +2070,7 @@ static void rna_def_particle_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem part_mat_items[] = { + static const EnumPropertyItem part_mat_items[] = { {0, "DUMMY", 0, "Dummy", ""}, {0, NULL, 0, NULL, NULL} }; @@ -3174,7 +3174,7 @@ static void rna_def_particle_target(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem mode_items[] = { + static const EnumPropertyItem mode_items[] = { {PTARGET_MODE_FRIEND, "FRIEND", 0, "Friend", ""}, {PTARGET_MODE_NEUTRAL, "NEUTRAL", 0, "Neutral", ""}, {PTARGET_MODE_ENEMY, "ENEMY", 0, "Enemy", ""}, @@ -3237,7 +3237,7 @@ static void rna_def_particle_system(BlenderRNA *brna) FunctionRNA *func; PropertyRNA *parm; - static EnumPropertyItem resolution_items[] = { + static const EnumPropertyItem resolution_items[] = { {eModifierMode_Realtime, "PREVIEW", 0, "Preview", "Apply modifier preview settings"}, {eModifierMode_Render, "RENDER", 0, "Render", "Apply modifier render settings"}, {0, NULL, 0, NULL, NULL} diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index 8d161466d56..ac27a6c21a5 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -52,7 +52,7 @@ /* XXX: this RNA enum define is currently duplicated for objects, * since there is some text here which is not applicable */ -EnumPropertyItem rna_enum_posebone_rotmode_items[] = { +const EnumPropertyItem rna_enum_posebone_rotmode_items[] = { {ROT_MODE_QUAT, "QUATERNION", 0, "Quaternion (WXYZ)", "No Gimbal Lock (default)"}, {ROT_MODE_XYZ, "XYZ", 0, "XYZ Euler", "XYZ Rotation Order (prone to Gimbal Lock)"}, {ROT_MODE_XZY, "XZY", 0, "XZY Euler", "XZY Rotation Order (prone to Gimbal Lock)"}, @@ -66,7 +66,7 @@ EnumPropertyItem rna_enum_posebone_rotmode_items[] = { }; /* Bone and Group Color Sets */ -EnumPropertyItem rna_enum_color_sets_items[] = { +const EnumPropertyItem rna_enum_color_sets_items[] = { {0, "DEFAULT", 0, "Default Colors", ""}, {1, "THEME01", VICO_COLORSET_01_VEC, "01 - Theme Color Set", ""}, {2, "THEME02", VICO_COLORSET_02_VEC, "02 - Theme Color Set", ""}, @@ -729,13 +729,13 @@ static void rna_def_bone_group(BlenderRNA *brna) rna_def_actionbone_group_common(srna, NC_OBJECT | ND_POSE, "rna_Pose_update"); } -static EnumPropertyItem prop_iksolver_items[] = { +static const EnumPropertyItem prop_iksolver_items[] = { {IKSOLVER_STANDARD, "LEGACY", 0, "Standard", "Original IK solver"}, {IKSOLVER_ITASC, "ITASC", 0, "iTaSC", "Multi constraint, stateful IK solver"}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem prop_solver_items[] = { +static const EnumPropertyItem prop_solver_items[] = { {ITASC_SOLVER_SDLS, "SDLS", 0, "SDLS", "Selective Damped Least Square"}, {ITASC_SOLVER_DLS, "DLS", 0, "DLS", "Damped Least Square with Numerical Filtering"}, {0, NULL, 0, NULL, NULL} diff --git a/source/blender/makesrna/intern/rna_property.c b/source/blender/makesrna/intern/rna_property.c index fb70870f49b..7ee792b5d1f 100644 --- a/source/blender/makesrna/intern/rna_property.c +++ b/source/blender/makesrna/intern/rna_property.c @@ -43,7 +43,7 @@ #include "WM_types.h" -EnumPropertyItem rna_enum_gameproperty_type_items[] = { +const EnumPropertyItem rna_enum_gameproperty_type_items[] = { {GPROP_BOOL, "BOOL", 0, "Boolean", "Boolean Property"}, {GPROP_INT, "INT", 0, "Integer", "Integer Property"}, {GPROP_FLOAT, "FLOAT", 0, "Float", "Floating-Point Property"}, diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c index 034782cc818..cb86dd17d63 100644 --- a/source/blender/makesrna/intern/rna_render.c +++ b/source/blender/makesrna/intern/rna_render.c @@ -46,7 +46,7 @@ #include "ED_render.h" /* Deprecated, only provided for API compatibility. */ -EnumPropertyItem rna_enum_render_pass_type_items[] = { +const EnumPropertyItem rna_enum_render_pass_type_items[] = { {SCE_PASS_COMBINED, "COMBINED", 0, "Combined", ""}, {SCE_PASS_Z, "Z", 0, "Z", ""}, {SCE_PASS_RGBA, "COLOR", 0, "Color", ""}, @@ -82,7 +82,7 @@ EnumPropertyItem rna_enum_render_pass_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_bake_pass_type_items[] = { +const EnumPropertyItem rna_enum_bake_pass_type_items[] = { {SCE_PASS_COMBINED, "COMBINED", 0, "Combined", ""}, {SCE_PASS_AO, "AO", 0, "AO", ""}, {SCE_PASS_SHADOW, "SHADOW", 0, "Shadow", ""}, @@ -455,7 +455,7 @@ static void rna_def_render_engine(BlenderRNA *brna) FunctionRNA *func; PropertyRNA *parm; - static EnumPropertyItem render_pass_type_items[] = { + static const EnumPropertyItem render_pass_type_items[] = { {SOCK_FLOAT, "VALUE", 0, "Value", ""}, {SOCK_VECTOR, "VECTOR", 0, "Vector", ""}, {SOCK_RGBA, "COLOR", 0, "Color", ""}, diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c index a1a7efdaba5..335b7d31acf 100644 --- a/source/blender/makesrna/intern/rna_rigidbody.c +++ b/source/blender/makesrna/intern/rna_rigidbody.c @@ -44,13 +44,13 @@ #include "WM_types.h" /* roles of objects in RigidBody Sims */ -EnumPropertyItem rna_enum_rigidbody_object_type_items[] = { +const EnumPropertyItem rna_enum_rigidbody_object_type_items[] = { {RBO_TYPE_ACTIVE, "ACTIVE", 0, "Active", "Object is directly controlled by simulation results"}, {RBO_TYPE_PASSIVE, "PASSIVE", 0, "Passive", "Object is directly controlled by animation system"}, {0, NULL, 0, NULL, NULL}}; /* collision shapes of objects in rigid body sim */ -EnumPropertyItem rna_enum_rigidbody_object_shape_items[] = { +const EnumPropertyItem rna_enum_rigidbody_object_shape_items[] = { {RB_SHAPE_BOX, "BOX", ICON_MESH_CUBE, "Box", "Box-like shapes (i.e. cubes), including planes (i.e. ground planes)"}, {RB_SHAPE_SPHERE, "SPHERE", ICON_MESH_UVSPHERE, "Sphere", ""}, {RB_SHAPE_CAPSULE, "CAPSULE", ICON_MESH_CAPSULE, "Capsule", ""}, @@ -64,7 +64,7 @@ EnumPropertyItem rna_enum_rigidbody_object_shape_items[] = { {0, NULL, 0, NULL, NULL}}; /* collision shapes of constraints in rigid body sim */ -EnumPropertyItem rna_enum_rigidbody_constraint_type_items[] = { +const EnumPropertyItem rna_enum_rigidbody_constraint_type_items[] = { {RBC_TYPE_FIXED, "FIXED", ICON_NONE, "Fixed", "Glue rigid bodies together"}, {RBC_TYPE_POINT, "POINT", ICON_NONE, "Point", "Constrain rigid bodies to move around common pivot point"}, {RBC_TYPE_HINGE, "HINGE", ICON_NONE, "Hinge", "Restrict rigid body rotation to one axis"}, @@ -78,7 +78,7 @@ EnumPropertyItem rna_enum_rigidbody_constraint_type_items[] = { #ifndef RNA_RUNTIME /* mesh source for collision shape creation */ -static EnumPropertyItem rigidbody_mesh_source_items[] = { +static const EnumPropertyItem rigidbody_mesh_source_items[] = { {RBO_MESH_BASE, "BASE", 0, "Base", "Base mesh"}, {RBO_MESH_DEFORM, "DEFORM", 0, "Deform", "Deformations (shape keys, deform modifiers)"}, {RBO_MESH_FINAL, "FINAL", 0, "Final", "All modifiers"}, diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index 502a9c42363..1d87bdb972e 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -36,7 +36,7 @@ #include "rna_internal.h" -EnumPropertyItem rna_enum_property_type_items[] = { +const EnumPropertyItem rna_enum_property_type_items[] = { {PROP_BOOLEAN, "BOOLEAN", 0, "Boolean", ""}, {PROP_INT, "INT", 0, "Integer", ""}, {PROP_FLOAT, "FLOAT", 0, "Float", ""}, @@ -50,7 +50,7 @@ EnumPropertyItem rna_enum_property_type_items[] = { /* XXX Keep in sync with bpy_props.c's property_subtype_xxx_items ??? * Currently it is not... */ -EnumPropertyItem rna_enum_property_subtype_items[] = { +const EnumPropertyItem rna_enum_property_subtype_items[] = { {PROP_NONE, "NONE", 0, "None", ""}, /* strings */ @@ -90,7 +90,7 @@ EnumPropertyItem rna_enum_property_subtype_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_property_unit_items[] = { +const EnumPropertyItem rna_enum_property_unit_items[] = { {PROP_UNIT_NONE, "NONE", 0, "None", ""}, {PROP_UNIT_LENGTH, "LENGTH", 0, "Length", ""}, {PROP_UNIT_AREA, "AREA", 0, "Area", ""}, @@ -824,7 +824,7 @@ static int rna_StringProperty_max_length_get(PointerRNA *ptr) return ((StringPropertyRNA *)prop)->maxlength; } -static EnumPropertyItem *rna_EnumProperty_default_itemf(bContext *C, PointerRNA *ptr, +static const EnumPropertyItem *rna_EnumProperty_default_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop_parent, bool *r_free) { PropertyRNA *prop = (PropertyRNA *)ptr->data; @@ -870,7 +870,7 @@ static void rna_EnumProperty_items_begin(CollectionPropertyIterator *iter, Point { PropertyRNA *prop = (PropertyRNA *)ptr->data; /* EnumPropertyRNA *eprop; *//* UNUSED */ - EnumPropertyItem *item = NULL; + const EnumPropertyItem *item = NULL; int totitem; bool free; @@ -1118,7 +1118,7 @@ static void rna_def_property(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem subtype_items[] = { + static const EnumPropertyItem subtype_items[] = { {PROP_NONE, "NONE", 0, "None", ""}, {PROP_FILEPATH, "FILE_PATH", 0, "File Path", ""}, {PROP_DIRPATH, "DIR_PATH", 0, "Directory Path", ""}, @@ -1442,7 +1442,7 @@ static void rna_def_enum_property(BlenderRNA *brna, StructRNA *srna) PropertyRNA *prop; /* the itemf func is used instead, keep blender happy */ - static EnumPropertyItem default_dummy_items[] = { + static const EnumPropertyItem default_dummy_items[] = { {PROP_NONE, "DUMMY", 0, "Dummy", ""}, {0, NULL, 0, NULL, NULL} }; diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index cd0bcaf4cea..bc56ff251e8 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -73,7 +73,7 @@ #include "BLI_threads.h" #ifdef WITH_OPENEXR -EnumPropertyItem rna_enum_exr_codec_items[] = { +const EnumPropertyItem rna_enum_exr_codec_items[] = { {R_IMF_EXR_CODEC_NONE, "NONE", 0, "None", ""}, {R_IMF_EXR_CODEC_PXR24, "PXR24", 0, "Pxr24 (lossy)", ""}, {R_IMF_EXR_CODEC_ZIP, "ZIP", 0, "ZIP (lossless)", ""}, @@ -90,14 +90,14 @@ EnumPropertyItem rna_enum_exr_codec_items[] = { #endif #ifndef RNA_RUNTIME -static EnumPropertyItem uv_sculpt_relaxation_items[] = { +static const EnumPropertyItem uv_sculpt_relaxation_items[] = { {UV_SCULPT_TOOL_RELAX_LAPLACIAN, "LAPLACIAN", 0, "Laplacian", "Use Laplacian method for relaxation"}, {UV_SCULPT_TOOL_RELAX_HC, "HC", 0, "HC", "Use HC method for relaxation"}, {0, NULL, 0, NULL, NULL} }; #endif -EnumPropertyItem rna_enum_uv_sculpt_tool_items[] = { +const EnumPropertyItem rna_enum_uv_sculpt_tool_items[] = { {UV_SCULPT_TOOL_PINCH, "PINCH", 0, "Pinch", "Pinch UVs"}, {UV_SCULPT_TOOL_RELAX, "RELAX", 0, "Relax", "Relax UVs"}, {UV_SCULPT_TOOL_GRAB, "GRAB", 0, "Grab", "Grab UVs"}, @@ -105,7 +105,7 @@ EnumPropertyItem rna_enum_uv_sculpt_tool_items[] = { }; -EnumPropertyItem rna_enum_snap_target_items[] = { +const EnumPropertyItem rna_enum_snap_target_items[] = { {SCE_SNAP_TARGET_CLOSEST, "CLOSEST", 0, "Closest", "Snap closest point onto target"}, {SCE_SNAP_TARGET_CENTER, "CENTER", 0, "Center", "Snap center onto target"}, {SCE_SNAP_TARGET_MEDIAN, "MEDIAN", 0, "Median", "Snap median onto target"}, @@ -113,7 +113,7 @@ EnumPropertyItem rna_enum_snap_target_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_proportional_falloff_items[] = { +const EnumPropertyItem rna_enum_proportional_falloff_items[] = { {PROP_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", "Smooth falloff"}, {PROP_SPHERE, "SPHERE", ICON_SPHERECURVE, "Sphere", "Spherical falloff"}, {PROP_ROOT, "ROOT", ICON_ROOTCURVE, "Root", "Root falloff"}, @@ -126,7 +126,7 @@ EnumPropertyItem rna_enum_proportional_falloff_items[] = { }; /* subset of the enum - only curves, missing random and const */ -EnumPropertyItem rna_enum_proportional_falloff_curve_only_items[] = { +const EnumPropertyItem rna_enum_proportional_falloff_curve_only_items[] = { {PROP_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", "Smooth falloff"}, {PROP_SPHERE, "SPHERE", ICON_SPHERECURVE, "Sphere", "Spherical falloff"}, {PROP_ROOT, "ROOT", ICON_ROOTCURVE, "Root", "Root falloff"}, @@ -137,7 +137,7 @@ EnumPropertyItem rna_enum_proportional_falloff_curve_only_items[] = { }; -EnumPropertyItem rna_enum_proportional_editing_items[] = { +const EnumPropertyItem rna_enum_proportional_editing_items[] = { {PROP_EDIT_OFF, "DISABLED", ICON_PROP_OFF, "Disable", "Proportional Editing disabled"}, {PROP_EDIT_ON, "ENABLED", ICON_PROP_ON, "Enable", "Proportional Editing enabled"}, {PROP_EDIT_PROJECTED, "PROJECTED", ICON_PROP_ON, "Projected (2D)", @@ -148,14 +148,14 @@ EnumPropertyItem rna_enum_proportional_editing_items[] = { }; /* keep for operators, not used here */ -EnumPropertyItem rna_enum_mesh_select_mode_items[] = { +const EnumPropertyItem rna_enum_mesh_select_mode_items[] = { {SCE_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode"}, {SCE_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode"}, {SCE_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode"}, {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_snap_element_items[] = { +const EnumPropertyItem rna_enum_snap_element_items[] = { {SCE_SNAP_MODE_INCREMENT, "INCREMENT", ICON_SNAP_INCREMENT, "Increment", "Snap to increments of grid"}, {SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices"}, {SCE_SNAP_MODE_EDGE, "EDGE", ICON_SNAP_EDGE, "Edge", "Snap to edges"}, @@ -164,7 +164,7 @@ EnumPropertyItem rna_enum_snap_element_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_snap_node_element_items[] = { +const EnumPropertyItem rna_enum_snap_node_element_items[] = { {SCE_SNAP_MODE_GRID, "GRID", ICON_SNAP_GRID, "Grid", "Snap to grid"}, {SCE_SNAP_MODE_NODE_X, "NODE_X", ICON_SNAP_EDGE, "Node X", "Snap to left/right node border"}, {SCE_SNAP_MODE_NODE_Y, "NODE_Y", ICON_SNAP_EDGE, "Node Y", "Snap to top/bottom node border"}, @@ -173,14 +173,14 @@ EnumPropertyItem rna_enum_snap_node_element_items[] = { }; #ifndef RNA_RUNTIME -static EnumPropertyItem snap_uv_element_items[] = { +static const EnumPropertyItem snap_uv_element_items[] = { {SCE_SNAP_MODE_INCREMENT, "INCREMENT", ICON_SNAP_INCREMENT, "Increment", "Snap to increments of grid"}, {SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices"}, {0, NULL, 0, NULL, NULL} }; #endif -EnumPropertyItem rna_enum_curve_fit_method_items[] = { +const EnumPropertyItem rna_enum_curve_fit_method_items[] = { {CURVE_PAINT_FIT_METHOD_REFIT, "REFIT", 0, "Refit", "Incrementally re-fit the curve (high quality)"}, {CURVE_PAINT_FIT_METHOD_SPLIT, "SPLIT", 0, "Split", "Split the curve until the tolerance is met (fast)"}, {0, NULL, 0, NULL, NULL}}; @@ -265,7 +265,7 @@ EnumPropertyItem rna_enum_curve_fit_method_items[] = { #ifdef RNA_RUNTIME -static EnumPropertyItem image_only_type_items[] = { +static const EnumPropertyItem image_only_type_items[] = { IMAGE_TYPE_ITEMS_IMAGE_ONLY @@ -273,7 +273,7 @@ static EnumPropertyItem image_only_type_items[] = { }; #endif -EnumPropertyItem rna_enum_image_type_items[] = { +const EnumPropertyItem rna_enum_image_type_items[] = { {0, "", 0, N_("Image"), NULL}, IMAGE_TYPE_ITEMS_IMAGE_ONLY @@ -290,7 +290,7 @@ EnumPropertyItem rna_enum_image_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_image_color_mode_items[] = { +const EnumPropertyItem rna_enum_image_color_mode_items[] = { {R_IMF_PLANES_BW, "BW", 0, "BW", "Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)"}, {R_IMF_PLANES_RGB, "RGB", 0, "RGB", "Images are saved with RGB (color) data"}, {R_IMF_PLANES_RGBA, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"}, @@ -303,7 +303,7 @@ EnumPropertyItem rna_enum_image_color_mode_items[] = { #define IMAGE_COLOR_MODE_RGBA rna_enum_image_color_mode_items[2] #endif -EnumPropertyItem rna_enum_image_color_depth_items[] = { +const EnumPropertyItem rna_enum_image_color_depth_items[] = { /* 1 (monochrome) not used */ {R_IMF_CHAN_DEPTH_8, "8", 0, "8", "8 bit color channels"}, {R_IMF_CHAN_DEPTH_10, "10", 0, "10", "10 bit color channels"}, @@ -314,13 +314,13 @@ EnumPropertyItem rna_enum_image_color_depth_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_normal_space_items[] = { +const EnumPropertyItem rna_enum_normal_space_items[] = { {R_BAKE_SPACE_OBJECT, "OBJECT", 0, "Object", "Bake the normals in object space"}, {R_BAKE_SPACE_TANGENT, "TANGENT", 0, "Tangent", "Bake the normals in tangent space"}, {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_normal_swizzle_items[] = { +const EnumPropertyItem rna_enum_normal_swizzle_items[] = { {R_BAKE_POSX, "POS_X", 0, "+X", ""}, {R_BAKE_POSY, "POS_Y", 0, "+Y", ""}, {R_BAKE_POSZ, "POS_Z", 0, "+Z", ""}, @@ -330,7 +330,7 @@ EnumPropertyItem rna_enum_normal_swizzle_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_bake_save_mode_items[] = { +const EnumPropertyItem rna_enum_bake_save_mode_items[] = { {R_BAKE_SAVE_INTERNAL, "INTERNAL", 0, "Internal", "Save the baking map in an internal image data-block"}, {R_BAKE_SAVE_EXTERNAL, "EXTERNAL", 0, "External", "Save the baking map in an external file"}, {0, NULL, 0, NULL, NULL} @@ -342,19 +342,19 @@ EnumPropertyItem rna_enum_bake_save_mode_items[] = { "Single file with an encoded stereo pair"}, #define R_IMF_VIEWS_ENUM_MV {R_IMF_VIEWS_MULTIVIEW, "MULTIVIEW", 0, "Multi-View", "Single file with all the views"}, -EnumPropertyItem rna_enum_views_format_items[] = { +const EnumPropertyItem rna_enum_views_format_items[] = { R_IMF_VIEWS_ENUM_IND R_IMF_VIEWS_ENUM_S3D {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_views_format_multilayer_items[] = { +const EnumPropertyItem rna_enum_views_format_multilayer_items[] = { R_IMF_VIEWS_ENUM_IND R_IMF_VIEWS_ENUM_MV {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_views_format_multiview_items[] = { +const EnumPropertyItem rna_enum_views_format_multiview_items[] = { R_IMF_VIEWS_ENUM_IND R_IMF_VIEWS_ENUM_S3D R_IMF_VIEWS_ENUM_MV @@ -365,7 +365,7 @@ EnumPropertyItem rna_enum_views_format_multiview_items[] = { #undef R_IMF_VIEWS_ENUM_S3D #undef R_IMF_VIEWS_ENUM_MV -EnumPropertyItem rna_enum_stereo3d_display_items[] = { +const EnumPropertyItem rna_enum_stereo3d_display_items[] = { {S3D_DISPLAY_ANAGLYPH, "ANAGLYPH", 0, "Anaglyph", "Render views for left and right eyes as two differently filtered colors in a single image " "(anaglyph glasses are required)"}, @@ -378,21 +378,21 @@ EnumPropertyItem rna_enum_stereo3d_display_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_stereo3d_anaglyph_type_items[] = { +const EnumPropertyItem rna_enum_stereo3d_anaglyph_type_items[] = { {S3D_ANAGLYPH_REDCYAN, "RED_CYAN", 0, "Red-Cyan", ""}, {S3D_ANAGLYPH_GREENMAGENTA, "GREEN_MAGENTA", 0, "Green-Magenta", ""}, {S3D_ANAGLYPH_YELLOWBLUE, "YELLOW_BLUE", 0, "Yellow-Blue", ""}, {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_stereo3d_interlace_type_items[] = { +const EnumPropertyItem rna_enum_stereo3d_interlace_type_items[] = { {S3D_INTERLACE_ROW, "ROW_INTERLEAVED", 0, "Row Interleaved", ""}, {S3D_INTERLACE_COLUMN, "COLUMN_INTERLEAVED", 0, "Column Interleaved", ""}, {S3D_INTERLACE_CHECKERBOARD, "CHECKERBOARD_INTERLEAVED", 0, "Checkerboard Interleaved", ""}, {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_bake_pass_filter_type_items[] = { +const EnumPropertyItem rna_enum_bake_pass_filter_type_items[] = { {R_BAKE_PASS_FILTER_NONE, "NONE", 0, "None", ""}, {R_BAKE_PASS_FILTER_AO, "AO", 0, "AO", ""}, {R_BAKE_PASS_FILTER_EMIT, "EMIT", 0, "Emit", ""}, @@ -407,7 +407,7 @@ EnumPropertyItem rna_enum_bake_pass_filter_type_items[] = { }; #ifndef RNA_RUNTIME -static EnumPropertyItem rna_enum_gpencil_interpolation_mode_items[] = { +static const EnumPropertyItem rna_enum_gpencil_interpolation_mode_items[] = { /* interpolation */ {0, "", 0, N_("Interpolation"), "Standard transitions between keyframes"}, {GP_IPO_LINEAR, "LINEAR", ICON_IPO_LINEAR, "Linear", "Straight-line interpolation between A and B (i.e. no ease in/out)"}, @@ -1122,7 +1122,7 @@ static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value) } } -static EnumPropertyItem *rna_ImageFormatSettings_file_format_itemf( +static const EnumPropertyItem *rna_ImageFormatSettings_file_format_itemf( bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { ID *id = ptr->id.data; @@ -1134,7 +1134,7 @@ static EnumPropertyItem *rna_ImageFormatSettings_file_format_itemf( } } -static EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf( +static const EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf( bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { ImageFormatData *imf = (ImageFormatData *)ptr->data; @@ -1179,7 +1179,7 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf( } } -static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf( +static const EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf( bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { ImageFormatData *imf = (ImageFormatData *)ptr->data; @@ -1191,11 +1191,11 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf( const int depth_ok = BKE_imtype_valid_depths(imf->imtype); const int is_float = ELEM(imf->imtype, R_IMF_IMTYPE_RADHDR, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER); - EnumPropertyItem *item_8bit = &rna_enum_image_color_depth_items[0]; - EnumPropertyItem *item_10bit = &rna_enum_image_color_depth_items[1]; - EnumPropertyItem *item_12bit = &rna_enum_image_color_depth_items[2]; - EnumPropertyItem *item_16bit = &rna_enum_image_color_depth_items[3]; - EnumPropertyItem *item_32bit = &rna_enum_image_color_depth_items[4]; + const EnumPropertyItem *item_8bit = &rna_enum_image_color_depth_items[0]; + const EnumPropertyItem *item_10bit = &rna_enum_image_color_depth_items[1]; + const EnumPropertyItem *item_12bit = &rna_enum_image_color_depth_items[2]; + const EnumPropertyItem *item_16bit = &rna_enum_image_color_depth_items[3]; + const EnumPropertyItem *item_32bit = &rna_enum_image_color_depth_items[4]; int totitem = 0; EnumPropertyItem *item = NULL; @@ -1242,7 +1242,7 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf( } } -static EnumPropertyItem *rna_ImageFormatSettings_views_format_itemf( +static const EnumPropertyItem *rna_ImageFormatSettings_views_format_itemf( bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { ImageFormatData *imf = (ImageFormatData *)ptr->data; @@ -1264,7 +1264,7 @@ static EnumPropertyItem *rna_ImageFormatSettings_views_format_itemf( #ifdef WITH_OPENEXR /* OpenEXR */ -static EnumPropertyItem *rna_ImageFormatSettings_exr_codec_itemf( +static const EnumPropertyItem *rna_ImageFormatSettings_exr_codec_itemf( bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { ImageFormatData *imf = (ImageFormatData *)ptr->data; @@ -1469,7 +1469,7 @@ static void rna_RenderSettings_engine_set(PointerRNA *ptr, int value) BLI_strncpy_utf8(rd->engine, type->idname, sizeof(rd->engine)); } -static EnumPropertyItem *rna_RenderSettings_engine_itemf( +static const EnumPropertyItem *rna_RenderSettings_engine_itemf( bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { RenderEngineType *type; @@ -2445,7 +2445,7 @@ static void rna_def_tool_settings(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem uv_select_mode_items[] = { + static const EnumPropertyItem uv_select_mode_items[] = { {UV_SELECT_VERTEX, "VERTEX", ICON_UV_VERTEXSEL, "Vertex", "Vertex selection mode"}, {UV_SELECT_EDGE, "EDGE", ICON_UV_EDGESEL, "Edge", "Edge selection mode"}, {UV_SELECT_FACE, "FACE", ICON_UV_FACESEL, "Face", "Face selection mode"}, @@ -2457,20 +2457,20 @@ static void rna_def_tool_settings(BlenderRNA *brna) * with 1st position only for for on/off (and exposed as boolean), while others are mutually * exclusive options but which will only have any effect when autokey is enabled */ - static EnumPropertyItem auto_key_items[] = { + static const EnumPropertyItem auto_key_items[] = { {AUTOKEY_MODE_NORMAL & ~AUTOKEY_ON, "ADD_REPLACE_KEYS", 0, "Add & Replace", ""}, {AUTOKEY_MODE_EDITKEYS & ~AUTOKEY_ON, "REPLACE_KEYS", 0, "Replace", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem retarget_roll_items[] = { + static const EnumPropertyItem retarget_roll_items[] = { {SK_RETARGET_ROLL_NONE, "NONE", 0, "None", "Don't adjust roll"}, {SK_RETARGET_ROLL_VIEW, "VIEW", 0, "View", "Roll bones to face the view"}, {SK_RETARGET_ROLL_JOINT, "JOINT", 0, "Joint", "Roll bone to original joint plane offset"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem sketch_convert_items[] = { + static const EnumPropertyItem sketch_convert_items[] = { {SK_CONVERT_CUT_FIXED, "FIXED", 0, "Fixed", "Subdivide stroke in fixed number of bones"}, {SK_CONVERT_CUT_LENGTH, "LENGTH", 0, "Length", "Subdivide stroke in bones of specific length"}, {SK_CONVERT_CUT_ADAPTATIVE, "ADAPTIVE", 0, "Adaptive", @@ -2479,7 +2479,7 @@ static void rna_def_tool_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem edge_tag_items[] = { + static const EnumPropertyItem edge_tag_items[] = { {EDGE_MODE_SELECT, "SELECT", 0, "Select", ""}, {EDGE_MODE_TAG_SEAM, "SEAM", 0, "Tag Seam", ""}, {EDGE_MODE_TAG_SHARP, "SHARP", 0, "Tag Sharp", ""}, @@ -2489,21 +2489,21 @@ static void rna_def_tool_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem draw_groupuser_items[] = { + static const EnumPropertyItem draw_groupuser_items[] = { {OB_DRAW_GROUPUSER_NONE, "NONE", 0, "None", ""}, {OB_DRAW_GROUPUSER_ACTIVE, "ACTIVE", 0, "Active", "Show vertices with no weights in the active group"}, {OB_DRAW_GROUPUSER_ALL, "ALL", 0, "All", "Show vertices with no weights in any group"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem vertex_group_select_items[] = { + static const EnumPropertyItem vertex_group_select_items[] = { {WT_VGROUP_ALL, "ALL", 0, "All", "All Vertex Groups"}, {WT_VGROUP_BONE_DEFORM, "BONE_DEFORM", 0, "Deform", "Vertex Groups assigned to Deform Bones"}, {WT_VGROUP_BONE_DEFORM_OFF, "OTHER_DEFORM", 0, "Other", "Vertex Groups assigned to non Deform Bones"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem gpencil_source_3d_items[] = { + static const EnumPropertyItem gpencil_source_3d_items[] = { {GP_TOOL_SOURCE_SCENE, "SCENE", 0, "Scene", "Grease Pencil data attached to the current scene is used, " "unless the active object already has Grease Pencil data (i.e. for old files)"}, @@ -2513,7 +2513,7 @@ static void rna_def_tool_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem gpencil_stroke_placement_items[] = { + static const EnumPropertyItem gpencil_stroke_placement_items[] = { {GP_PROJECT_VIEWSPACE, "CURSOR", 0, "Cursor", "Draw stroke at the 3D cursor"}, {0, "VIEW", 0, "View", "Stick stroke to the view "}, /* weird, GP_PROJECT_VIEWALIGN is inverted */ {GP_PROJECT_VIEWSPACE | GP_PROJECT_DEPTH_VIEW, "SURFACE", 0, "Surface", "Stick stroke to surfaces"}, @@ -3063,7 +3063,7 @@ static void rna_def_curve_paint_settings(BlenderRNA *brna) RNA_def_struct_path_func(srna, "rna_CurvePaintSettings_path"); RNA_def_struct_ui_text(srna, "Curve Paint Settings", ""); - static EnumPropertyItem curve_type_items[] = { + static const EnumPropertyItem curve_type_items[] = { {CU_POLY, "POLY", 0, "Poly", ""}, {CU_BEZIER, "BEZIER", 0, "Bezier", ""}, {0, NULL, 0, NULL, NULL}}; @@ -3130,7 +3130,7 @@ static void rna_def_curve_paint_settings(BlenderRNA *brna) RNA_def_property_ui_range(prop, -1.0f, 1.0, 1, 2); RNA_def_property_ui_text(prop, "Offset", "Offset the stroke from the surface"); - static EnumPropertyItem depth_mode_items[] = { + static const EnumPropertyItem depth_mode_items[] = { {CURVE_PAINT_PROJECT_CURSOR, "CURSOR", 0, "Cursor", ""}, {CURVE_PAINT_PROJECT_SURFACE, "SURFACE", 0, "Surface", ""}, {0, NULL, 0, NULL, NULL}}; @@ -3140,7 +3140,7 @@ static void rna_def_curve_paint_settings(BlenderRNA *brna) RNA_def_property_enum_items(prop, depth_mode_items); RNA_def_property_ui_text(prop, "Depth", "Method of projecting depth"); - static EnumPropertyItem surface_plane_items[] = { + static const EnumPropertyItem surface_plane_items[] = { {CURVE_PAINT_SURFACE_PLANE_NORMAL_VIEW, "NORMAL_VIEW", 0, "Normal/View", "Draw perpendicular to the surface"}, {CURVE_PAINT_SURFACE_PLANE_NORMAL_SURFACE, "NORMAL_SURFACE", 0, "Normal/Surface", "Draw aligned to the surface"}, {CURVE_PAINT_SURFACE_PLANE_VIEW, "VIEW", 0, "View", "Draw aligned to the viewport"}, @@ -3157,7 +3157,7 @@ static void rna_def_statvis(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem stat_type[] = { + static const EnumPropertyItem stat_type[] = { {SCE_STATVIS_OVERHANG, "OVERHANG", 0, "Overhang", ""}, {SCE_STATVIS_THICKNESS, "THICKNESS", 0, "Thickness", ""}, {SCE_STATVIS_INTERSECT, "INTERSECT", 0, "Intersect", ""}, @@ -3262,14 +3262,14 @@ static void rna_def_unit_settings(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem unit_systems[] = { + static const EnumPropertyItem unit_systems[] = { {USER_UNIT_NONE, "NONE", 0, "None", ""}, {USER_UNIT_METRIC, "METRIC", 0, "Metric", ""}, {USER_UNIT_IMPERIAL, "IMPERIAL", 0, "Imperial", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem rotation_units[] = { + static const EnumPropertyItem rotation_units[] = { {0, "DEGREES", 0, "Degrees", "Use degrees for measuring angles and rotations"}, {USER_UNIT_ROT_RADIANS, "RADIANS", 0, "Radians", ""}, {0, NULL, 0, NULL, NULL} @@ -3752,42 +3752,42 @@ static void rna_def_freestyle_settings(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem edge_type_negation_items[] = { + static const EnumPropertyItem edge_type_negation_items[] = { {0, "INCLUSIVE", 0, "Inclusive", "Select feature edges satisfying the given edge type conditions"}, {FREESTYLE_LINESET_FE_NOT, "EXCLUSIVE", 0, "Exclusive", "Select feature edges not satisfying the given edge type conditions"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem edge_type_combination_items[] = { + static const EnumPropertyItem edge_type_combination_items[] = { {0, "OR", 0, "Logical OR", "Select feature edges satisfying at least one of edge type conditions"}, {FREESTYLE_LINESET_FE_AND, "AND", 0, "Logical AND", "Select feature edges satisfying all edge type conditions"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem group_negation_items[] = { + static const EnumPropertyItem group_negation_items[] = { {0, "INCLUSIVE", 0, "Inclusive", "Select feature edges belonging to some object in the group"}, {FREESTYLE_LINESET_GR_NOT, "EXCLUSIVE", 0, "Exclusive", "Select feature edges not belonging to any object in the group"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem face_mark_negation_items[] = { + static const EnumPropertyItem face_mark_negation_items[] = { {0, "INCLUSIVE", 0, "Inclusive", "Select feature edges satisfying the given face mark conditions"}, {FREESTYLE_LINESET_FM_NOT, "EXCLUSIVE", 0, "Exclusive", "Select feature edges not satisfying the given face mark conditions"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem face_mark_condition_items[] = { + static const EnumPropertyItem face_mark_condition_items[] = { {0, "ONE", 0, "One Face", "Select a feature edge if either of its adjacent faces is marked"}, {FREESTYLE_LINESET_FM_BOTH, "BOTH", 0, "Both Faces", "Select a feature edge if both of its adjacent faces are marked"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem freestyle_ui_mode_items[] = { + static const EnumPropertyItem freestyle_ui_mode_items[] = { {FREESTYLE_CONTROL_SCRIPT_MODE, "SCRIPT", 0, "Python Scripting Mode", "Advanced mode for using style modules written in Python"}, {FREESTYLE_CONTROL_EDITOR_MODE, "EDITOR", 0, "Parameter Editor Mode", @@ -3795,7 +3795,7 @@ static void rna_def_freestyle_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem visibility_items[] = { + static const EnumPropertyItem visibility_items[] = { {FREESTYLE_QI_VISIBLE, "VISIBLE", 0, "Visible", "Select visible feature edges"}, {FREESTYLE_QI_HIDDEN, "HIDDEN", 0, "Hidden", "Select hidden feature edges"}, {FREESTYLE_QI_RANGE, "RANGE", 0, "QI Range", @@ -4122,7 +4122,7 @@ static void rna_def_scene_game_recast_data(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem rna_enum_partitioning_items[] = { + static const EnumPropertyItem rna_enum_partitioning_items[] = { {RC_PARTITION_WATERSHED, "WATERSHED", 0, "Watershed", "Classic Recast partitioning method generating the nicest tessellation"}, {RC_PARTITION_MONOTONE, "MONOTONE", 0, "Monotone", "Fastest navmesh generation method, may create long thin polygons"}, {RC_PARTITION_LAYERS, "LAYERS", 0, "Layers", "Reasonably fast method that produces better triangles than monotone partitioning"}, @@ -4402,7 +4402,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem aasamples_items[] = { + static const EnumPropertyItem aasamples_items[] = { {0, "SAMPLES_0", 0, "Off", ""}, {2, "SAMPLES_2", 0, "2x", ""}, {4, "SAMPLES_4", 0, "4x", ""}, @@ -4411,7 +4411,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem framing_types_items[] = { + static const EnumPropertyItem framing_types_items[] = { {SCE_GAMEFRAMING_BARS, "LETTERBOX", 0, "Letterbox", "Show the entire viewport in the display window, using bar horizontally or vertically"}, {SCE_GAMEFRAMING_EXTEND, "EXTEND", 0, "Extend", @@ -4421,7 +4421,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem dome_modes_items[] = { + static const EnumPropertyItem dome_modes_items[] = { {DOME_FISHEYE, "FISHEYE", 0, "Fisheye", ""}, {DOME_TRUNCATED_FRONT, "TRUNCATED_FRONT", 0, "Front-Truncated", ""}, {DOME_TRUNCATED_REAR, "TRUNCATED_REAR", 0, "Rear-Truncated", ""}, @@ -4430,7 +4430,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem stereo_modes_items[] = { + static const EnumPropertyItem stereo_modes_items[] = { {STEREO_QUADBUFFERED, "QUADBUFFERED", 0, "Quad-Buffer", ""}, {STEREO_ABOVEBELOW, "ABOVEBELOW", 0, "Above-Below", ""}, {STEREO_INTERLACED, "INTERLACED", 0, "Interlaced", ""}, @@ -4441,40 +4441,40 @@ static void rna_def_scene_game_data(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem stereo_items[] = { + static const EnumPropertyItem stereo_items[] = { {STEREO_NOSTEREO, "NONE", 0, "None", "Disable Stereo and Dome environments"}, {STEREO_ENABLED, "STEREO", 0, "Stereo", "Enable Stereo environment"}, {STEREO_DOME, "DOME", 0, "Dome", "Enable Dome environment"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem physics_engine_items[] = { + static const EnumPropertyItem physics_engine_items[] = { {WOPHY_NONE, "NONE", 0, "None", "Don't use a physics engine"}, {WOPHY_BULLET, "BULLET", 0, "Bullet", "Use the Bullet physics engine"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem material_items[] = { + static const EnumPropertyItem material_items[] = { {GAME_MAT_MULTITEX, "MULTITEXTURE", 0, "Multitexture", "Multitexture materials"}, {GAME_MAT_GLSL, "GLSL", 0, "GLSL", "OpenGL shading language shaders"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem obstacle_simulation_items[] = { + static const EnumPropertyItem obstacle_simulation_items[] = { {OBSTSIMULATION_NONE, "NONE", 0, "None", ""}, {OBSTSIMULATION_TOI_rays, "RVO_RAYS", 0, "RVO (rays)", ""}, {OBSTSIMULATION_TOI_cells, "RVO_CELLS", 0, "RVO (cells)", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem vsync_items[] = { + static const EnumPropertyItem vsync_items[] = { {VSYNC_OFF, "OFF", 0, "Off", "Disable vsync"}, {VSYNC_ON, "ON", 0, "On", "Enable vsync"}, {VSYNC_ADAPTIVE, "ADAPTIVE", 0, "Adaptive", "Enable adaptive vsync (if supported)"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem storage_items[] = { + static const EnumPropertyItem storage_items[] = { {RAS_STORE_AUTO, "AUTO", 0, "Auto Select", "Choose the best supported mode"}, {RAS_STORE_VA, "VERTEX_ARRAY", 0, "Vertex Arrays", "Usually the best choice (good performance with display lists)"}, {RAS_STORE_VBO, "VERTEX_BUFFER_OBJECT", 0, "Vertex Buffer Objects", @@ -5175,7 +5175,7 @@ static void rna_def_image_format_stereo3d_format(BlenderRNA *brna) PropertyRNA *prop; /* rna_enum_stereo3d_display_items, without (S3D_DISPLAY_PAGEFLIP) */ - static EnumPropertyItem stereo3d_display_items[] = { + static const EnumPropertyItem stereo3d_display_items[] = { {S3D_DISPLAY_ANAGLYPH, "ANAGLYPH", 0, "Anaglyph", "Render views for left and right eyes as two differently filtered colors in a single image " "(anaglyph glasses are required)"}, @@ -5232,7 +5232,7 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna) { #ifdef WITH_OPENJPEG - static EnumPropertyItem jp2_codec_items[] = { + static const EnumPropertyItem jp2_codec_items[] = { {R_IMF_JP2_CODEC_JP2, "JP2", 0, "JP2", ""}, {R_IMF_JP2_CODEC_J2K, "J2K", 0, "J2K", ""}, {0, NULL, 0, NULL, NULL} @@ -5240,7 +5240,7 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna) #endif #ifdef WITH_TIFF - static EnumPropertyItem tiff_codec_items[] = { + static const EnumPropertyItem tiff_codec_items[] = { {R_IMF_TIFF_CODEC_NONE, "NONE", 0, "None", ""}, {R_IMF_TIFF_CODEC_DEFLATE, "DEFLATE", 0, "Deflate", ""}, {R_IMF_TIFF_CODEC_LZW, "LZW", 0, "LZW", ""}, @@ -5415,7 +5415,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna) #ifdef WITH_FFMPEG /* Container types */ - static EnumPropertyItem ffmpeg_format_items[] = { + static const EnumPropertyItem ffmpeg_format_items[] = { {FFMPEG_MPEG1, "MPEG1", 0, "MPEG-1", ""}, {FFMPEG_MPEG2, "MPEG2", 0, "MPEG-2", ""}, {FFMPEG_MPEG4, "MPEG4", 0, "MPEG-4", ""}, @@ -5430,7 +5430,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem ffmpeg_codec_items[] = { + static const EnumPropertyItem ffmpeg_codec_items[] = { {AV_CODEC_ID_NONE, "NONE", 0, "None", ""}, {AV_CODEC_ID_MPEG1VIDEO, "MPEG1", 0, "MPEG-1", ""}, {AV_CODEC_ID_MPEG2VIDEO, "MPEG2", 0, "MPEG-2", ""}, @@ -5447,7 +5447,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem ffmpeg_preset_items[] = { + static const EnumPropertyItem ffmpeg_preset_items[] = { {FFM_PRESET_ULTRAFAST, "ULTRAFAST", 0, "Ultra fast; biggest file", ""}, {FFM_PRESET_SUPERFAST, "SUPERFAST", 0, "Super fast", ""}, {FFM_PRESET_VERYFAST, "VERYFAST", 0, "Very fast", ""}, @@ -5460,7 +5460,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem ffmpeg_crf_items[] = { + static const EnumPropertyItem ffmpeg_crf_items[] = { {FFM_CRF_NONE, "NONE", 0, "None; use constant bit-rate", "Use constant bit rate, rather than constant output quality"}, {FFM_CRF_LOSSLESS, "LOSSLESS", 0, "Lossless", ""}, @@ -5473,7 +5473,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem ffmpeg_audio_codec_items[] = { + static const EnumPropertyItem ffmpeg_audio_codec_items[] = { {AV_CODEC_ID_NONE, "NONE", 0, "None", ""}, {AV_CODEC_ID_MP2, "MP2", 0, "MP2", ""}, {AV_CODEC_ID_MP3, "MP3", 0, "MP3", ""}, @@ -5486,7 +5486,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna) }; #endif - static EnumPropertyItem audio_channel_items[] = { + static const EnumPropertyItem audio_channel_items[] = { {1, "MONO", 0, "Mono", "Set audio channels to mono"}, {2, "STEREO", 0, "Stereo", "Set audio channels to stereo"}, {4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels"}, @@ -5654,7 +5654,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem pixel_filter_items[] = { + static const EnumPropertyItem pixel_filter_items[] = { {R_FILTER_BOX, "BOX", 0, "Box", "Use a box filter for anti-aliasing"}, {R_FILTER_TENT, "TENT", 0, "Tent", "Use a tent filter for anti-aliasing"}, {R_FILTER_QUAD, "QUADRATIC", 0, "Quadratic", "Use a quadratic filter for anti-aliasing"}, @@ -5665,13 +5665,13 @@ static void rna_def_scene_render_data(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem alpha_mode_items[] = { + static const EnumPropertyItem alpha_mode_items[] = { {R_ADDSKY, "SKY", 0, "Sky", "Transparent pixels are filled with sky color"}, {R_ALPHAPREMUL, "TRANSPARENT", 0, "Transparent", "World background is transparent with premultiplied alpha"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem display_mode_items[] = { + static const EnumPropertyItem display_mode_items[] = { {R_OUTPUT_SCREEN, "SCREEN", 0, "Full Screen", "Images are rendered in full Screen"}, {R_OUTPUT_AREA, "AREA", 0, "Image Editor", "Images are rendered in Image Editor"}, {R_OUTPUT_WINDOW, "WINDOW", 0, "New Window", "Images are rendered in new Window"}, @@ -5680,7 +5680,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna) }; /* Bake */ - static EnumPropertyItem bake_mode_items[] = { + static const EnumPropertyItem bake_mode_items[] = { {RE_BAKE_ALL, "FULL", 0, "Full Render", "Bake everything"}, {RE_BAKE_AO, "AO", 0, "Ambient Occlusion", "Bake ambient occlusion"}, {RE_BAKE_SHADOW, "SHADOW", 0, "Shadow", "Bake shadows"}, @@ -5698,7 +5698,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem bake_normal_space_items[] = { + static const EnumPropertyItem bake_normal_space_items[] = { {R_BAKE_SPACE_CAMERA, "CAMERA", 0, "Camera", "Bake the normals in camera space"}, {R_BAKE_SPACE_WORLD, "WORLD", 0, "World", "Bake the normals in world space"}, {R_BAKE_SPACE_OBJECT, "OBJECT", 0, "Object", "Bake the normals in object space"}, @@ -5706,14 +5706,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem bake_qyad_split_items[] = { + static const EnumPropertyItem bake_qyad_split_items[] = { {0, "AUTO", 0, "Automatic", "Split quads to give the least distortion while baking"}, {1, "FIXED", 0, "Fixed", "Split quads predictably (0,1,2) (0,2,3)"}, {2, "FIXED_ALT", 0, "Fixed Alternate", "Split quads predictably (1,2,3) (1,3,0)"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem pixel_size_items[] = { + static const EnumPropertyItem pixel_size_items[] = { {0, "AUTO", 0, "Automatic", "Automatic pixel size, depends on the UI scale"}, {1, "1", 0, "1x", "Render at full resolution"}, {2, "2", 0, "2x", "Render at 50% resolution"}, @@ -5722,7 +5722,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem octree_resolution_items[] = { + static const EnumPropertyItem octree_resolution_items[] = { {64, "64", 0, "64", ""}, {128, "128", 0, "128", ""}, {256, "256", 0, "256", ""}, @@ -5730,7 +5730,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem raytrace_structure_items[] = { + static const EnumPropertyItem raytrace_structure_items[] = { {R_RAYSTRUCTURE_AUTO, "AUTO", 0, "Auto", "Automatically select acceleration structure"}, {R_RAYSTRUCTURE_OCTREE, "OCTREE", 0, "Octree", "Use old Octree structure"}, {R_RAYSTRUCTURE_VBVH, "VBVH", 0, "vBVH", "Use vBVH"}, @@ -5739,7 +5739,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem fixed_oversample_items[] = { + static const EnumPropertyItem fixed_oversample_items[] = { {5, "5", 0, "5", ""}, {8, "8", 0, "8", ""}, {11, "11", 0, "11", ""}, @@ -5747,31 +5747,31 @@ static void rna_def_scene_render_data(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem field_order_items[] = { + static const EnumPropertyItem field_order_items[] = { {0, "EVEN_FIRST", 0, "Upper First", "Upper field first"}, {R_ODDFIELD, "ODD_FIRST", 0, "Lower First", "Lower field first"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem threads_mode_items[] = { + static const EnumPropertyItem threads_mode_items[] = { {0, "AUTO", 0, "Auto-detect", "Automatically determine the number of threads, based on CPUs"}, {R_FIXED_THREADS, "FIXED", 0, "Fixed", "Manually determine the number of threads"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem engine_items[] = { + static const EnumPropertyItem engine_items[] = { {0, "BLENDER_RENDER", 0, "Blender Render", "Use the Blender internal rendering engine for rendering"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem freestyle_thickness_items[] = { + static const EnumPropertyItem freestyle_thickness_items[] = { {R_LINE_THICKNESS_ABSOLUTE, "ABSOLUTE", 0, "Absolute", "Specify unit line thickness in pixels"}, {R_LINE_THICKNESS_RELATIVE, "RELATIVE", 0, "Relative", "Unit line thickness is scaled by the proportion of the present vertical image " "resolution to 480 pixels"}, {0, NULL, 0, NULL, NULL}}; - static EnumPropertyItem views_format_items[] = { + static const EnumPropertyItem views_format_items[] = { {SCE_VIEWS_FORMAT_STEREO_3D, "STEREO_3D", 0, "Stereo 3D", "Single stereo camera system, adjust the stereo settings in the camera panel"}, {SCE_VIEWS_FORMAT_MULTIVIEW, "MULTIVIEW", 0, "Multi-View", @@ -6853,7 +6853,7 @@ void RNA_def_scene(BlenderRNA *brna) FunctionRNA *func; PropertyRNA *parm; - static EnumPropertyItem audio_distance_model_items[] = { + static const EnumPropertyItem audio_distance_model_items[] = { {0, "NONE", 0, "None", "No distance attenuation"}, {1, "INVERSE", 0, "Inverse", "Inverse distance model"}, {2, "INVERSE_CLAMPED", 0, "Inverse Clamped", "Inverse distance model with clamping"}, @@ -6864,7 +6864,7 @@ void RNA_def_scene(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem sync_mode_items[] = { + static const EnumPropertyItem sync_mode_items[] = { {0, "NONE", 0, "No Sync", "Do not sync, play every frame"}, {SCE_FRAME_DROP, "FRAME_DROP", 0, "Frame Dropping", "Drop frames if playback is too slow"}, {AUDIO_SYNC, "AUDIO_SYNC", 0, "AV-sync", "Sync to audio playback, dropping frames"}, diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index 16d91a4964b..e39ab6319d7 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -49,7 +49,7 @@ # include "../../alembic/ABC_alembic.h" #endif -EnumPropertyItem rna_enum_abc_compression_items[] = { +const EnumPropertyItem rna_enum_abc_compression_items[] = { #ifdef WITH_ALEMBIC { ABC_ARCHIVE_OGAWA, "OGAWA", 0, "Ogawa", "" }, { ABC_ARCHIVE_HDF5, "HDF5", 0, "HDF5", "" }, diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index b44e404c364..ce6d60a4ae7 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -36,7 +36,7 @@ #include "DNA_screen_types.h" #include "DNA_scene_types.h" -EnumPropertyItem rna_enum_region_type_items[] = { +const EnumPropertyItem rna_enum_region_type_items[] = { {RGN_TYPE_WINDOW, "WINDOW", 0, "Window", ""}, {RGN_TYPE_HEADER, "HEADER", 0, "Header", ""}, {RGN_TYPE_CHANNELS, "CHANNELS", 0, "Channels", ""}, @@ -123,7 +123,7 @@ static int rna_Screen_fullscreen_get(PointerRNA *ptr) /* UI compatible list: should not be needed, but for now we need to keep EMPTY * at least in the static version of this enum for python scripts. */ -static EnumPropertyItem *rna_Area_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), +static const EnumPropertyItem *rna_Area_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { /* +1 to skip SPACE_EMPTY */ diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index 422be83a7f6..28bd0f1b07f 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -49,7 +49,7 @@ #include "BLI_utildefines.h" #include "bmesh.h" -static EnumPropertyItem particle_edit_hair_brush_items[] = { +static const EnumPropertyItem particle_edit_hair_brush_items[] = { {PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush"}, {PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb hairs"}, {PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth hairs"}, @@ -61,7 +61,7 @@ static EnumPropertyItem particle_edit_hair_brush_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_gpencil_sculpt_brush_items[] = { +const EnumPropertyItem rna_enum_gpencil_sculpt_brush_items[] = { {GP_EDITBRUSH_TYPE_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth stroke points"}, {GP_EDITBRUSH_TYPE_THICKNESS, "THICKNESS", 0, "Thickness", "Adjust thickness of strokes"}, { GP_EDITBRUSH_TYPE_STRENGTH, "STRENGTH", 0, "Strength", "Adjust color strength of strokes" }, @@ -77,7 +77,7 @@ EnumPropertyItem rna_enum_gpencil_sculpt_brush_items[] = { }; #ifndef RNA_RUNTIME -static EnumPropertyItem rna_enum_gpencil_lockaxis_items[] = { +static const EnumPropertyItem rna_enum_gpencil_lockaxis_items[] = { { GP_LOCKAXIS_NONE, "GP_LOCKAXIS_NONE", 0, "None", "" }, { GP_LOCKAXIS_X, "GP_LOCKAXIS_X", 0, "X", "Project strokes to plane locked to X" }, { GP_LOCKAXIS_Y, "GP_LOCKAXIS_Y", 0, "Y", "Project strokes to plane locked to Y" }, @@ -86,7 +86,7 @@ static EnumPropertyItem rna_enum_gpencil_lockaxis_items[] = { }; #endif -EnumPropertyItem rna_enum_symmetrize_direction_items[] = { +const EnumPropertyItem rna_enum_symmetrize_direction_items[] = { {BMO_SYMMETRIZE_NEGATIVE_X, "NEGATIVE_X", 0, "-X to +X", ""}, {BMO_SYMMETRIZE_POSITIVE_X, "POSITIVE_X", 0, "+X to -X", ""}, @@ -117,7 +117,7 @@ static void rna_GPencil_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Pointe WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL); } -static EnumPropertyItem particle_edit_disconnected_hair_brush_items[] = { +static const EnumPropertyItem particle_edit_disconnected_hair_brush_items[] = { {PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush"}, {PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb hairs"}, {PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth hairs"}, @@ -127,7 +127,7 @@ static EnumPropertyItem particle_edit_disconnected_hair_brush_items[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem particle_edit_cache_brush_items[] = { +static const EnumPropertyItem particle_edit_cache_brush_items[] = { {PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush"}, {PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb paths"}, {PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth paths"}, @@ -183,7 +183,7 @@ static void rna_ParticleEdit_tool_set(PointerRNA *ptr, int value) pset->brushtype = value; } -static EnumPropertyItem *rna_ParticleEdit_tool_itemf(bContext *C, PointerRNA *UNUSED(ptr), +static const EnumPropertyItem *rna_ParticleEdit_tool_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { Scene *scene = CTX_data_scene(C); @@ -524,7 +524,7 @@ static void rna_def_paint(BlenderRNA *brna) static void rna_def_sculpt(BlenderRNA *brna) { - static EnumPropertyItem detail_refine_items[] = { + static const EnumPropertyItem detail_refine_items[] = { {SCULPT_DYNTOPO_SUBDIVIDE, "SUBDIVIDE", 0, "Subdivide Edges", "Subdivide long edges to add mesh detail where needed"}, {SCULPT_DYNTOPO_COLLAPSE, "COLLAPSE", 0, @@ -534,7 +534,7 @@ static void rna_def_sculpt(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem detail_type_items[] = { + static const EnumPropertyItem detail_type_items[] = { {0, "RELATIVE", 0, "Relative Detail", "Mesh detail is relative to the brush size and detail size"}, {SCULPT_DYNTOPO_DETAIL_CONSTANT, "CONSTANT", 0, @@ -693,7 +693,7 @@ static void rna_def_image_paint(BlenderRNA *brna) PropertyRNA *prop; FunctionRNA *func; - static EnumPropertyItem paint_type_items[] = { + static const EnumPropertyItem paint_type_items[] = { {IMAGEPAINT_MODE_MATERIAL, "MATERIAL", 0, "Material", "Detect image slots from the material"}, {IMAGEPAINT_MODE_IMAGE, "IMAGE", 0, @@ -823,26 +823,26 @@ static void rna_def_particle_edit(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem select_mode_items[] = { + static const EnumPropertyItem select_mode_items[] = { {SCE_SELECT_PATH, "PATH", ICON_PARTICLE_PATH, "Path", "Path edit mode"}, {SCE_SELECT_POINT, "POINT", ICON_PARTICLE_POINT, "Point", "Point select mode"}, {SCE_SELECT_END, "TIP", ICON_PARTICLE_TIP, "Tip", "Tip select mode"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem puff_mode[] = { + static const EnumPropertyItem puff_mode[] = { {0, "ADD", 0, "Add", "Make hairs more puffy"}, {1, "SUB", 0, "Sub", "Make hairs less puffy"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem length_mode[] = { + static const EnumPropertyItem length_mode[] = { {0, "GROW", 0, "Grow", "Make hairs longer"}, {1, "SHRINK", 0, "Shrink", "Make hairs shorter"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem edit_type_items[] = { + static const EnumPropertyItem edit_type_items[] = { {PE_TYPE_PARTICLES, "PARTICLES", 0, "Particles", ""}, {PE_TYPE_SOFTBODY, "SOFT_BODY", 0, "Soft body", ""}, {PE_TYPE_CLOTH, "CLOTH", 0, "Cloth", ""}, @@ -1002,7 +1002,7 @@ static void rna_def_particle_edit(BlenderRNA *brna) static void rna_def_gpencil_sculpt(BlenderRNA *brna) { - static EnumPropertyItem prop_direction_items[] = { + static const EnumPropertyItem prop_direction_items[] = { {0, "ADD", 0, "Add", "Add effect of brush"}, {GP_EDITBRUSH_FLAG_INVERT, "SUBTRACT", 0, "Subtract", "Subtract effect of brush"}, {0, NULL, 0, NULL, NULL}}; diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c index d0afab7a1e3..735df471721 100644 --- a/source/blender/makesrna/intern/rna_sensor.c +++ b/source/blender/makesrna/intern/rna_sensor.c @@ -45,7 +45,7 @@ #include "WM_types.h" /* Always keep in alphabetical order */ -static EnumPropertyItem sensor_type_items[] = { +static const EnumPropertyItem sensor_type_items[] = { {SENS_ACTUATOR, "ACTUATOR", 0, "Actuator", ""}, {SENS_ALWAYS, "ALWAYS", 0, "Always", ""}, {SENS_ARMATURE, "ARMATURE", 0, "Armature", ""}, @@ -137,7 +137,7 @@ static int rna_Sensor_controllers_length(PointerRNA *ptr) return (int) sens->totlinks; } -EnumPropertyItem *rna_Sensor_type_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) +const EnumPropertyItem *rna_Sensor_type_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { EnumPropertyItem *item = NULL; Object *ob = NULL; @@ -392,7 +392,7 @@ static void rna_def_mouse_sensor(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem mouse_event_items[] = { + static const EnumPropertyItem mouse_event_items[] = { {BL_SENS_MOUSE_LEFT_BUTTON, "LEFTCLICK", 0, "Left Button", ""}, {BL_SENS_MOUSE_MIDDLE_BUTTON, "MIDDLECLICK", 0, "Middle Button", ""}, {BL_SENS_MOUSE_RIGHT_BUTTON, "RIGHTCLICK", 0, "Right Button", ""}, @@ -501,7 +501,7 @@ static void rna_def_property_sensor(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {SENS_PROP_EQUAL, "PROPEQUAL", 0, "Equal", ""}, {SENS_PROP_NEQUAL, "PROPNEQUAL", 0, "Not Equal", ""}, {SENS_PROP_INTERVAL, "PROPINTERVAL", 0, "Interval", ""}, @@ -547,7 +547,7 @@ static void rna_def_armature_sensor(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_type_items[] = { + static const EnumPropertyItem prop_type_items[] = { {SENS_ARM_STATE_CHANGED, "STATECHG", 0, "State Changed", ""}, {SENS_ARM_LIN_ERROR_BELOW, "LINERRORBELOW", 0, "Lin error below", ""}, {SENS_ARM_LIN_ERROR_ABOVE, "LINERRORABOVE", 0, "Lin error above", ""}, @@ -675,7 +675,7 @@ static void rna_def_radar_sensor(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem axis_items[] = { + static const EnumPropertyItem axis_items[] = { {SENS_RADAR_X_AXIS, "XAXIS", 0, "+X axis", ""}, {SENS_RADAR_Y_AXIS, "YAXIS", 0, "+Y axis", ""}, {SENS_RADAR_Z_AXIS, "ZAXIS", 0, "+Z axis", ""}, @@ -731,7 +731,7 @@ static void rna_def_ray_sensor(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem axis_items[] = { + static const EnumPropertyItem axis_items[] = { {SENS_RAY_X_AXIS, "XAXIS", 0, "+X axis", ""}, {SENS_RAY_Y_AXIS, "YAXIS", 0, "+Y axis", ""}, {SENS_RAY_Z_AXIS, "ZAXIS", 0, "+Z axis", ""}, @@ -817,7 +817,7 @@ static void rna_def_joystick_sensor(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem event_type_joystick_items[] = { + static const EnumPropertyItem event_type_joystick_items[] = { {SENS_JOY_BUTTON, "BUTTON", 0, "Button", ""}, {SENS_JOY_AXIS, "AXIS", 0, "Axis", ""}, {SENS_JOY_HAT, "HAT", 0, "Hat", ""}, @@ -825,7 +825,7 @@ static void rna_def_joystick_sensor(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem axis_direction_items[] = { + static const EnumPropertyItem axis_direction_items[] = { {SENS_JOY_X_AXIS, "RIGHTAXIS", 0, "Right Axis", ""}, {SENS_JOY_Y_AXIS, "UPAXIS", 0, "Up Axis", ""}, {SENS_JOY_NEG_X_AXIS, "LEFTAXIS", 0, "Left Axis", ""}, @@ -833,7 +833,7 @@ static void rna_def_joystick_sensor(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem hat_direction_items[] = { + static const EnumPropertyItem hat_direction_items[] = { {SENS_JOY_HAT_UP, "UP", 0, "Up", ""}, {SENS_JOY_HAT_DOWN, "DOWN", 0, "Down", ""}, {SENS_JOY_HAT_LEFT, "LEFT", 0, "Left", ""}, diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index 520a1c2f730..fbc29039539 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -60,7 +60,7 @@ typedef struct EffectInfo { int inputs; } EffectInfo; -EnumPropertyItem rna_enum_sequence_modifier_type_items[] = { +const EnumPropertyItem rna_enum_sequence_modifier_type_items[] = { {seqModifierType_ColorBalance, "COLOR_BALANCE", ICON_NONE, "Color Balance", ""}, {seqModifierType_Curves, "CURVES", ICON_NONE, "Curves", ""}, {seqModifierType_HueCorrect, "HUE_CORRECT", ICON_NONE, "Hue Correct", ""}, @@ -1328,7 +1328,7 @@ static void rna_def_strip_color_balance(BlenderRNA *brna) RNA_def_struct_sdna(srna, "StripColorBalance"); } -static EnumPropertyItem blend_mode_items[] = { +static const EnumPropertyItem blend_mode_items[] = { {SEQ_BLEND_REPLACE, "REPLACE", 0, "Replace", ""}, {SEQ_TYPE_CROSS, "CROSS", 0, "Cross", ""}, {SEQ_TYPE_ADD, "ADD", 0, "Add", ""}, @@ -2308,13 +2308,13 @@ static void rna_def_gaussian_blur(StructRNA *srna) static void rna_def_text(StructRNA *srna) { - static EnumPropertyItem text_align_x_items[] = { + static const EnumPropertyItem text_align_x_items[] = { {SEQ_TEXT_ALIGN_X_LEFT, "LEFT", 0, "Left", ""}, {SEQ_TEXT_ALIGN_X_CENTER, "CENTER", 0, "Center", ""}, {SEQ_TEXT_ALIGN_X_RIGHT, "RIGHT", 0, "Right", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem text_align_y_items[] = { + static const EnumPropertyItem text_align_y_items[] = { {SEQ_TEXT_ALIGN_Y_TOP, "TOP", 0, "Top", ""}, {SEQ_TEXT_ALIGN_Y_CENTER, "CENTER", 0, "Center", ""}, {SEQ_TEXT_ALIGN_Y_BOTTOM, "BOTTOM", 0, "Bottom", ""}, @@ -2592,7 +2592,7 @@ static void rna_def_tonemap_modifier(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem type_items[] = { + static const EnumPropertyItem type_items[] = { {SEQ_TONEMAP_RD_PHOTORECEPTOR, "RD_PHOTORECEPTOR", 0, "R/D Photoreceptor", ""}, {SEQ_TONEMAP_RH_SIMPLE, "RH_SIMPLE", 0, "Rh Simple", ""}, {0, NULL, 0, NULL, NULL} diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c index 76f5a4934cf..e1d3f3958a5 100644 --- a/source/blender/makesrna/intern/rna_sequencer_api.c +++ b/source/blender/makesrna/intern/rna_sequencer_api.c @@ -457,7 +457,7 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop) PropertyRNA *parm; FunctionRNA *func; - static EnumPropertyItem seq_effect_items[] = { + static const EnumPropertyItem seq_effect_items[] = { {SEQ_TYPE_CROSS, "CROSS", 0, "Cross", ""}, {SEQ_TYPE_ADD, "ADD", 0, "Add", ""}, {SEQ_TYPE_SUB, "SUBTRACT", 0, "Subtract", ""}, diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c index c12937bd2bf..8e54c708c05 100644 --- a/source/blender/makesrna/intern/rna_smoke.c +++ b/source/blender/makesrna/intern/rna_smoke.c @@ -403,7 +403,7 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_noise_type_items[] = { + static const EnumPropertyItem prop_noise_type_items[] = { {MOD_SMOKE_NOISEWAVE, "NOISEWAVE", 0, "Wavelet", ""}, #ifdef WITH_FFTW3 {MOD_SMOKE_NOISEFFT, "NOISEFFT", 0, "FFT", ""}, @@ -412,7 +412,7 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_compression_items[] = { + static const EnumPropertyItem prop_compression_items[] = { { VDB_COMPRESSION_ZIP, "ZIP", 0, "Zip", "Effective but slow compression" }, #ifdef WITH_OPENVDB_BLOSC { VDB_COMPRESSION_BLOSC, "BLOSC", 0, "Blosc", "Multithreaded compression, similar in size and quality as 'Zip'" }, @@ -421,26 +421,26 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna) { 0, NULL, 0, NULL, NULL } }; - static EnumPropertyItem smoke_cache_comp_items[] = { + static const EnumPropertyItem smoke_cache_comp_items[] = { {SM_CACHE_LIGHT, "CACHELIGHT", 0, "Light", "Fast but not so effective compression"}, {SM_CACHE_HEAVY, "CACHEHEAVY", 0, "Heavy", "Effective but slow compression"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem smoke_highres_sampling_items[] = { + static const EnumPropertyItem smoke_highres_sampling_items[] = { {SM_HRES_FULLSAMPLE, "FULLSAMPLE", 0, "Full Sample", ""}, {SM_HRES_LINEAR, "LINEAR", 0, "Linear", ""}, {SM_HRES_NEAREST, "NEAREST", 0, "Nearest", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem smoke_data_depth_items[] = { + static const EnumPropertyItem smoke_data_depth_items[] = { {16, "16", 0, "Float (Half)", "Half float (16 bit data)"}, {0, "32", 0, "Float (Full)", "Full float (32 bit data)"}, /* default */ {0, NULL, 0, NULL, NULL}, }; - static EnumPropertyItem smoke_domain_colli_items[] = { + static const EnumPropertyItem smoke_domain_colli_items[] = { {SM_BORDER_OPEN, "BORDEROPEN", 0, "Open", "Smoke doesn't collide with any border"}, {SM_BORDER_VERTICAL, "BORDERVERTICAL", 0, "Vertically Open", "Smoke doesn't collide with top and bottom sides"}, @@ -448,7 +448,7 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem cache_file_type_items[] = { + static const EnumPropertyItem cache_file_type_items[] = { {PTCACHE_FILE_PTCACHE, "POINTCACHE", 0, "Point Cache", "Blender specific point cache file format"}, #ifdef WITH_OPENVDB {PTCACHE_FILE_OPENVDB, "OPENVDB", 0, "OpenVDB", "OpenVDB file format"}, @@ -456,19 +456,19 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem smoke_view_items[] = { + static const EnumPropertyItem smoke_view_items[] = { {MOD_SMOKE_SLICE_VIEW_ALIGNED, "VIEW_ALIGNED", 0, "View", "Slice volume parallel to the view plane"}, {MOD_SMOKE_SLICE_AXIS_ALIGNED, "AXIS_ALIGNED", 0, "Axis", "Slice volume parallel to the major axis"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem axis_slice_method_items[] = { + static const EnumPropertyItem axis_slice_method_items[] = { {AXIS_SLICE_FULL, "FULL", 0, "Full", "Slice the whole domain object"}, {AXIS_SLICE_SINGLE, "SINGLE", 0, "Single", "Perform a single slice of the domain object"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem axis_slice_position_items[] = { + static const EnumPropertyItem axis_slice_position_items[] = { {SLICE_AXIS_AUTO, "AUTO", 0, "Auto", "Adjust slice direction according to the view direction"}, {SLICE_AXIS_X, "X", 0, "X", "Slice along the X axis"}, {SLICE_AXIS_Y, "Y", 0, "Y", "Slice along the Y axis"}, @@ -476,7 +476,7 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem vector_draw_items[] = { + static const EnumPropertyItem vector_draw_items[] = { {VECTOR_DRAW_NEEDLE, "NEEDLE", 0, "Needle", "Draw vectors as needles"}, {VECTOR_DRAW_STREAMLINE, "STREAMLINE", 0, "Streamlines", "Draw vectors as streamlines"}, {0, NULL, 0, NULL, NULL} @@ -828,7 +828,7 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna) "Render a simulation field while mapping its voxels values to the colors of a ramp"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); - static EnumPropertyItem coba_field_items[] = { + static const EnumPropertyItem coba_field_items[] = { {FLUID_FIELD_COLOR_R, "COLOR_R", 0, "Red", "Red component of the color field"}, {FLUID_FIELD_COLOR_G, "COLOR_G", 0, "Green", "Green component of the color field"}, {FLUID_FIELD_COLOR_B, "COLOR_B", 0, "Blue", "Blue component of the color field"}, @@ -860,7 +860,7 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem smoke_flow_types[] = { + static const EnumPropertyItem smoke_flow_types[] = { {MOD_SMOKE_FLOW_TYPE_OUTFLOW, "OUTFLOW", 0, "Outflow", "Delete smoke from simulation"}, {MOD_SMOKE_FLOW_TYPE_SMOKE, "SMOKE", 0, "Smoke", "Add smoke"}, {MOD_SMOKE_FLOW_TYPE_SMOKEFIRE, "BOTH", 0, "Fire + Smoke", "Add fire and smoke"}, @@ -868,13 +868,13 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem smoke_flow_sources[] = { + static const EnumPropertyItem smoke_flow_sources[] = { {MOD_SMOKE_FLOW_SOURCE_PARTICLES, "PARTICLES", ICON_PARTICLES, "Particle System", "Emit smoke from particles"}, {MOD_SMOKE_FLOW_SOURCE_MESH, "MESH", ICON_META_CUBE, "Mesh", "Emit smoke from mesh surface or volume"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem smoke_flow_texture_types[] = { + static const EnumPropertyItem smoke_flow_texture_types[] = { {MOD_SMOKE_FLOW_TEXTURE_MAP_AUTO, "AUTO", 0, "Generated", "Generated coordinates centered to flow object"}, {MOD_SMOKE_FLOW_TEXTURE_MAP_UV, "UV", 0, "UV", "Use UV layer for texture coordinates"}, {0, NULL, 0, NULL, NULL} @@ -1035,7 +1035,7 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna) static void rna_def_smoke_coll_settings(BlenderRNA *brna) { - static EnumPropertyItem smoke_coll_type_items[] = { + static const EnumPropertyItem smoke_coll_type_items[] = { {SM_COLL_STATIC, "COLLSTATIC", 0, "Static", "Non moving obstacle"}, {SM_COLL_RIGID, "COLLRIGID", 0, "Rigid", "Rigid obstacle"}, {SM_COLL_ANIMATED, "COLLANIMATED", 0, "Animated", "Animated obstacle"}, diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 724eeccd108..ebbebb32974 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -60,7 +60,7 @@ #include "RNA_enum_types.h" -EnumPropertyItem rna_enum_space_type_items[] = { +const EnumPropertyItem rna_enum_space_type_items[] = { /* empty must be here for python, is skipped for UI */ {SPACE_EMPTY, "EMPTY", ICON_NONE, "Empty", ""}, {SPACE_VIEW3D, "VIEW_3D", ICON_VIEW3D, "3D View", "3D viewport"}, @@ -95,7 +95,7 @@ EnumPropertyItem rna_enum_space_type_items[] = { #define V3D_S3D_CAMERA_VIEWS {STEREO_MONO_ID, "MONO", ICON_RESTRICT_RENDER_OFF, "Views", ""}, #endif -static EnumPropertyItem stereo3d_camera_items[] = { +static const EnumPropertyItem stereo3d_camera_items[] = { V3D_S3D_CAMERA_LEFT V3D_S3D_CAMERA_RIGHT V3D_S3D_CAMERA_S3D @@ -103,7 +103,7 @@ static EnumPropertyItem stereo3d_camera_items[] = { }; #ifdef RNA_RUNTIME -static EnumPropertyItem multiview_camera_items[] = { +static const EnumPropertyItem multiview_camera_items[] = { V3D_S3D_CAMERA_VIEWS V3D_S3D_CAMERA_S3D {0, NULL, 0, NULL, NULL} @@ -116,14 +116,14 @@ static EnumPropertyItem multiview_camera_items[] = { #undef V3D_S3D_CAMERA_VIEWS #ifndef RNA_RUNTIME -static EnumPropertyItem stereo3d_eye_items[] = { +static const EnumPropertyItem stereo3d_eye_items[] = { {STEREO_LEFT_ID, "LEFT_EYE", ICON_NONE, "Left Eye"}, {STEREO_RIGHT_ID, "RIGHT_EYE", ICON_NONE, "Right Eye"}, {0, NULL, 0, NULL, NULL} }; #endif -static EnumPropertyItem pivot_items_full[] = { +static const EnumPropertyItem pivot_items_full[] = { {V3D_AROUND_CENTER_BOUNDS, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center", "Pivot around bounding box center of selected object(s)"}, {V3D_AROUND_CURSOR, "CURSOR", ICON_CURSOR, "3D Cursor", "Pivot around the 3D cursor"}, @@ -135,7 +135,7 @@ static EnumPropertyItem pivot_items_full[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem draw_channels_items[] = { +static const EnumPropertyItem draw_channels_items[] = { {SI_USE_ALPHA, "COLOR_ALPHA", ICON_IMAGE_RGB_ALPHA, "Color and Alpha", "Draw image with RGB colors and alpha transparency"}, {0, "COLOR", ICON_IMAGE_RGB, "Color", "Draw image with RGB colors"}, @@ -148,7 +148,7 @@ static EnumPropertyItem draw_channels_items[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem transform_orientation_items[] = { +static const EnumPropertyItem transform_orientation_items[] = { {V3D_MANIP_GLOBAL, "GLOBAL", 0, "Global", "Align the transformation axes to world space"}, {V3D_MANIP_LOCAL, "LOCAL", 0, "Local", "Align the transformation axes to the selected objects' local space"}, {V3D_MANIP_NORMAL, "NORMAL", 0, "Normal", @@ -161,7 +161,7 @@ static EnumPropertyItem transform_orientation_items[] = { }; #ifndef RNA_RUNTIME -static EnumPropertyItem autosnap_items[] = { +static const EnumPropertyItem autosnap_items[] = { {SACTSNAP_OFF, "NONE", 0, "No Auto-Snap", ""}, /* {-1, "", 0, "", ""}, */ {SACTSNAP_STEP, "STEP", 0, "Frame Step", "Snap to 1.0 frame intervals"}, @@ -175,7 +175,7 @@ static EnumPropertyItem autosnap_items[] = { }; #endif -EnumPropertyItem rna_enum_viewport_shade_items[] = { +const EnumPropertyItem rna_enum_viewport_shade_items[] = { {OB_BOUNDBOX, "BOUNDBOX", ICON_BBOX, "Bounding Box", "Display the object's local bounding boxes only"}, {OB_WIRE, "WIREFRAME", ICON_WIRE, "Wireframe", "Display the object as wire edges"}, {OB_SOLID, "SOLID", ICON_SOLID, "Solid", "Display the object solid, lit with default OpenGL lights"}, @@ -186,14 +186,14 @@ EnumPropertyItem rna_enum_viewport_shade_items[] = { }; -EnumPropertyItem rna_enum_clip_editor_mode_items[] = { +const EnumPropertyItem rna_enum_clip_editor_mode_items[] = { {SC_MODE_TRACKING, "TRACKING", ICON_ANIM_DATA, "Tracking", "Show tracking and solving tools"}, {SC_MODE_MASKEDIT, "MASK", ICON_MOD_MASK, "Mask", "Show mask editing tools"}, {0, NULL, 0, NULL, NULL} }; /* Actually populated dynamically trough a function, but helps for context-less access (e.g. doc, i18n...). */ -static EnumPropertyItem buttons_context_items[] = { +static const EnumPropertyItem buttons_context_items[] = { {BCONTEXT_SCENE, "SCENE", ICON_SCENE_DATA, "Scene", "Scene"}, {BCONTEXT_RENDER, "RENDER", ICON_SCENE, "Render", "Render"}, {BCONTEXT_RENDER_LAYER, "RENDER_LAYER", ICON_RENDERLAYERS, "Render Layers", "Render layers"}, @@ -212,7 +212,7 @@ static EnumPropertyItem buttons_context_items[] = { }; /* Actually populated dynamically trough a function, but helps for context-less access (e.g. doc, i18n...). */ -static EnumPropertyItem buttons_texture_context_items[] = { +static const EnumPropertyItem buttons_texture_context_items[] = { {SB_TEXC_MATERIAL, "MATERIAL", ICON_MATERIAL, "", "Show material textures"}, {SB_TEXC_WORLD, "WORLD", ICON_WORLD, "", "Show world textures"}, {SB_TEXC_LAMP, "LAMP", ICON_LAMP, "", "Show lamp textures"}, @@ -223,7 +223,7 @@ static EnumPropertyItem buttons_texture_context_items[] = { }; -static EnumPropertyItem fileselectparams_recursion_level_items[] = { +static const EnumPropertyItem fileselectparams_recursion_level_items[] = { {0, "NONE", 0, "None", "Only list current directory's content, with no recursion"}, {1, "BLEND", 0, "Blend File", "List .blend files' content"}, {2, "ALL_1", 0, "One Level", "List all sub-directories' content, one level of recursion"}, @@ -232,7 +232,7 @@ static EnumPropertyItem fileselectparams_recursion_level_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_file_sort_items[] = { +const EnumPropertyItem rna_enum_file_sort_items[] = { {FILE_SORT_ALPHA, "FILE_SORT_ALPHA", ICON_SORTALPHA, "Sort alphabetically", "Sort the file list alphabetically"}, {FILE_SORT_EXTENSION, "FILE_SORT_EXTENSION", ICON_SORTBYEXT, "Sort by extension", "Sort the file list by extension/type"}, {FILE_SORT_TIME, "FILE_SORT_TIME", ICON_SORTTIME, "Sort by time", "Sort files by modification time"}, @@ -415,7 +415,8 @@ static PointerRNA rna_CurrentOrientation_get(PointerRNA *ptr) BLI_findlink(&scene->transform_spaces, v3d->twmode - V3D_MANIP_CUSTOM)); } -EnumPropertyItem *rna_TransformOrientation_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) +const EnumPropertyItem *rna_TransformOrientation_itemf( + bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { Scene *scene = NULL; ListBase *transform_spaces; @@ -714,7 +715,7 @@ static void rna_SpaceView3D_viewport_shade_set(PointerRNA *ptr, int value) v3d->drawtype = value; } -static EnumPropertyItem *rna_SpaceView3D_viewport_shade_itemf(bContext *UNUSED(C), PointerRNA *ptr, +static const EnumPropertyItem *rna_SpaceView3D_viewport_shade_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { Scene *scene = ((bScreen *)ptr->id.data)->scene; @@ -738,7 +739,7 @@ static EnumPropertyItem *rna_SpaceView3D_viewport_shade_itemf(bContext *UNUSED(C return item; } -static EnumPropertyItem *rna_SpaceView3D_stereo3d_camera_itemf(bContext *UNUSED(C), PointerRNA *ptr, +static const EnumPropertyItem *rna_SpaceView3D_stereo3d_camera_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { Scene *scene = ((bScreen *)ptr->id.data)->scene; @@ -834,7 +835,7 @@ static void rna_SpaceImageEditor_mask_set(PointerRNA *ptr, PointerRNA value) ED_space_image_set_mask(NULL, sima, (Mask *)value.data); } -static EnumPropertyItem *rna_SpaceImageEditor_draw_channels_itemf(bContext *UNUSED(C), PointerRNA *ptr, +static const EnumPropertyItem *rna_SpaceImageEditor_draw_channels_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { SpaceImage *sima = (SpaceImage *)ptr->data; @@ -956,10 +957,10 @@ static void rna_SpaceImageEditor_scopes_update(struct bContext *C, struct Pointe ED_space_image_release_buffer(sima, ibuf, lock); } -static EnumPropertyItem *rna_SpaceImageEditor_pivot_itemf(bContext *UNUSED(C), PointerRNA *ptr, +static const EnumPropertyItem *rna_SpaceImageEditor_pivot_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { - static EnumPropertyItem pivot_items[] = { + static const EnumPropertyItem pivot_items[] = { {V3D_AROUND_CENTER_BOUNDS, "CENTER", ICON_ROTATE, "Bounding Box Center", ""}, {V3D_AROUND_CENTER_MEAN, "MEDIAN", ICON_ROTATECENTER, "Median Point", ""}, {V3D_AROUND_CURSOR, "CURSOR", ICON_CURSOR, "2D Cursor", ""}, @@ -1059,7 +1060,7 @@ static void rna_SpaceProperties_context_set(PointerRNA *ptr, int value) sbuts->mainbuser = value; } -static EnumPropertyItem *rna_SpaceProperties_context_itemf(bContext *UNUSED(C), PointerRNA *ptr, +static const EnumPropertyItem *rna_SpaceProperties_context_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { SpaceButs *sbuts = (SpaceButs *)(ptr->data); @@ -1146,7 +1147,7 @@ static void rna_SpaceProperties_align_set(PointerRNA *ptr, int value) sbuts->re_align = 1; } -static EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C, PointerRNA *UNUSED(ptr), +static const EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { EnumPropertyItem *item = NULL; @@ -1496,7 +1497,7 @@ static int rna_SpaceNodeEditor_tree_type_poll(void *Cv, bNodeTreeType *type) else return true; } -static EnumPropertyItem *rna_SpaceNodeEditor_tree_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), +static const EnumPropertyItem *rna_SpaceNodeEditor_tree_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { return rna_node_tree_type_itemf(C, rna_SpaceNodeEditor_tree_type_poll, r_free); @@ -1598,7 +1599,7 @@ static int rna_FileSelectParams_use_lib_get(PointerRNA *ptr) return params && (params->type == FILE_LOADLIB); } -static EnumPropertyItem *rna_FileSelectParams_recursion_level_itemf( +static const EnumPropertyItem *rna_FileSelectParams_recursion_level_itemf( bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { FileSelectParams *params = ptr->data; @@ -1887,7 +1888,7 @@ static void rna_FileBrowser_FSMenuRecent_active_range(PointerRNA *ptr, int *min, #else -static EnumPropertyItem dt_uv_items[] = { +static const EnumPropertyItem dt_uv_items[] = { {SI_UVDT_OUTLINE, "OUTLINE", 0, "Outline", "Draw white edges with black outline"}, {SI_UVDT_DASH, "DASH", 0, "Dash", "Draw dashed black-white edges"}, {SI_UVDT_BLACK, "BLACK", 0, "Black", "Draw black edges"}, @@ -1923,7 +1924,7 @@ static void rna_def_space_mask_info(StructRNA *srna, int noteflag, const char *m { PropertyRNA *prop; - static EnumPropertyItem overlay_mode_items[] = { + static const EnumPropertyItem overlay_mode_items[] = { {MASK_OVERLAY_ALPHACHANNEL, "ALPHACHANNEL", ICON_NONE, "Alpha Channel", "Show alpha channel of the mask"}, {MASK_OVERLAY_COMBINED, "COMBINED", ICON_NONE, "Combined", "Combine space background image with the mask"}, {0, NULL, 0, NULL, NULL} @@ -1965,7 +1966,7 @@ static void rna_def_space_image_uv(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem sticky_mode_items[] = { + static const EnumPropertyItem sticky_mode_items[] = { {SI_STICKY_DISABLE, "DISABLED", ICON_STICKY_UVS_DISABLE, "Disabled", "Sticky vertex selection disabled"}, {SI_STICKY_LOC, "SHARED_LOCATION", ICON_STICKY_UVS_LOC, "Shared Location", "Select UVs that are at the same location and share a mesh vertex"}, @@ -1974,13 +1975,13 @@ static void rna_def_space_image_uv(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem dt_uvstretch_items[] = { + static const EnumPropertyItem dt_uvstretch_items[] = { {SI_UVDT_STRETCH_ANGLE, "ANGLE", 0, "Angle", "Angular distortion between UV and 3D angles"}, {SI_UVDT_STRETCH_AREA, "AREA", 0, "Area", "Area distortion between UV and 3D faces"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem other_uv_filter_items[] = { + static const EnumPropertyItem other_uv_filter_items[] = { {SI_FILTER_ALL, "ALL", 0, "All", "No filter, show all islands from other objects"}, {SI_FILTER_SAME_IMAGE, "SAME_IMAGE", ICON_IMAGE_DATA, "Same Image", "Only show others' UV islands whose active image matches image of the active face"}, @@ -2088,7 +2089,7 @@ static void rna_def_space_outliner(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem display_mode_items[] = { + static const EnumPropertyItem display_mode_items[] = { {SO_ALL_SCENES, "ALL_SCENES", 0, "All Scenes", "Display data-blocks in all scenes"}, {SO_CUR_SCENE, "CURRENT_SCENE", 0, "Current Scene", "Display data-blocks in current scene"}, {SO_VISIBLE, "VISIBLE_LAYERS", 0, "Visible Layers", "Display data-blocks in visible layers"}, @@ -2149,7 +2150,7 @@ static void rna_def_background_image(BlenderRNA *brna) PropertyRNA *prop; /* note: combinations work but don't flip so arnt that useful */ - static EnumPropertyItem bgpic_axis_items[] = { + static const EnumPropertyItem bgpic_axis_items[] = { {0, "", 0, N_("X Axis"), ""}, {(1 << RV3D_VIEW_LEFT), "LEFT", 0, "Left", "Show background image while looking to the left"}, {(1 << RV3D_VIEW_RIGHT), "RIGHT", 0, "Right", "Show background image while looking to the right"}, @@ -2168,7 +2169,7 @@ static void rna_def_background_image(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem bgpic_source_items[] = { + static const EnumPropertyItem bgpic_source_items[] = { {V3D_BGPIC_IMAGE, "IMAGE", 0, "Image", ""}, {V3D_BGPIC_MOVIE, "MOVIE_CLIP", 0, "Movie Clip", ""}, {0, NULL, 0, NULL, NULL} @@ -2336,7 +2337,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem manipulators_items[] = { + static const EnumPropertyItem manipulators_items[] = { {V3D_MANIP_TRANSLATE, "TRANSLATE", ICON_MAN_TRANS, "Translate", "Use the manipulator for movement transformations"}, {V3D_MANIP_ROTATE, "ROTATE", ICON_MAN_ROT, "Rotate", @@ -2346,14 +2347,14 @@ static void rna_def_space_view3d(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem rv3d_persp_items[] = { + static const EnumPropertyItem rv3d_persp_items[] = { {RV3D_PERSP, "PERSP", 0, "Perspective", ""}, {RV3D_ORTHO, "ORTHO", 0, "Orthographic", ""}, {RV3D_CAMOB, "CAMERA", 0, "Camera", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem bundle_drawtype_items[] = { + static const EnumPropertyItem bundle_drawtype_items[] = { {OB_PLAINAXES, "PLAIN_AXES", 0, "Plain Axes", ""}, {OB_ARROWS, "ARROWS", 0, "Arrows", ""}, {OB_SINGLE_ARROW, "SINGLE_ARROW", 0, "Single Arrow", ""}, @@ -2364,7 +2365,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem view3d_matcap_items[] = { + static const EnumPropertyItem view3d_matcap_items[] = { {ICON_MATCAP_01, "01", ICON_MATCAP_01, "", ""}, {ICON_MATCAP_02, "02", ICON_MATCAP_02, "", ""}, {ICON_MATCAP_03, "03", ICON_MATCAP_03, "", ""}, @@ -2897,7 +2898,7 @@ static void rna_def_space_buttons(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem align_items[] = { + static const EnumPropertyItem align_items[] = { {BUT_HORIZONTAL, "HORIZONTAL", 0, "Horizontal", ""}, {BUT_VERTICAL, "VERTICAL", 0, "Vertical", ""}, {0, NULL, 0, NULL, NULL} @@ -2950,7 +2951,7 @@ static void rna_def_space_buttons(BlenderRNA *brna) static void rna_def_space_image(BlenderRNA *brna) { - static EnumPropertyItem image_space_mode_items[] = { + static const EnumPropertyItem image_space_mode_items[] = { {SI_MODE_VIEW, "VIEW", ICON_FILE_IMAGE, "View", "View the image and UV edit in mesh editmode"}, {SI_MODE_PAINT, "PAINT", ICON_TPAINT_HLT, "Paint", "2D image painting mode"}, {SI_MODE_MASK, "MASK", ICON_MOD_MASK, "Mask", "Mask editing"}, @@ -3103,14 +3104,14 @@ static void rna_def_space_sequencer(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem view_type_items[] = { + static const EnumPropertyItem view_type_items[] = { {SEQ_VIEW_SEQUENCE, "SEQUENCER", ICON_SEQ_SEQUENCER, "Sequencer", ""}, {SEQ_VIEW_PREVIEW, "PREVIEW", ICON_SEQ_PREVIEW, "Image Preview", ""}, {SEQ_VIEW_SEQUENCE_PREVIEW, "SEQUENCER_PREVIEW", ICON_SEQ_SPLITVIEW, "Sequencer and Image Preview", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem display_mode_items[] = { + static const EnumPropertyItem display_mode_items[] = { {SEQ_DRAW_IMG_IMBUF, "IMAGE", ICON_SEQ_PREVIEW, "Image Preview", ""}, {SEQ_DRAW_IMG_WAVEFORM, "WAVEFORM", ICON_SEQ_LUMA_WAVEFORM, "Luma Waveform", ""}, {SEQ_DRAW_IMG_VECTORSCOPE, "VECTOR_SCOPE", ICON_SEQ_CHROMA_SCOPE, "Chroma Vectorscope", ""}, @@ -3118,7 +3119,7 @@ static void rna_def_space_sequencer(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem proxy_render_size_items[] = { + static const EnumPropertyItem proxy_render_size_items[] = { {SEQ_PROXY_RENDER_SIZE_NONE, "NONE", 0, "No display", ""}, {SEQ_PROXY_RENDER_SIZE_SCENE, "SCENE", 0, "Scene render size", ""}, {SEQ_PROXY_RENDER_SIZE_25, "PROXY_25", 0, "Proxy size 25%", ""}, @@ -3129,21 +3130,21 @@ static void rna_def_space_sequencer(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem overlay_type_items[] = { + static const EnumPropertyItem overlay_type_items[] = { {SEQ_DRAW_OVERLAY_RECT, "RECTANGLE", 0, "Rectangle", "Show rectangle area overlay"}, {SEQ_DRAW_OVERLAY_REFERENCE, "REFERENCE", 0, "Reference", "Show reference frame only"}, {SEQ_DRAW_OVERLAY_CURRENT, "CURRENT", 0, "Current", "Show current frame only"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem preview_channels_items[] = { + static const EnumPropertyItem preview_channels_items[] = { {SEQ_USE_ALPHA, "COLOR_ALPHA", ICON_IMAGE_RGB_ALPHA, "Color and Alpha", "Draw image with RGB colors and alpha transparency"}, {0, "COLOR", ICON_IMAGE_RGB, "Color", "Draw image with RGB colors"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem waveform_type_draw_items[] = { + static const EnumPropertyItem waveform_type_draw_items[] = { {SEQ_NO_WAVEFORMS, "NO_WAVEFORMS", 0, "Waveforms Off", "No waveforms drawn for any sound strips"}, {SEQ_ALL_WAVEFORMS, "ALL_WAVEFORMS", 0, "Waveforms On", @@ -3397,7 +3398,7 @@ static void rna_def_space_dopesheet(BlenderRNA *brna) PropertyRNA *prop; /* XXX: action-editor is currently for object-level only actions, so show that using object-icon hint */ - static EnumPropertyItem mode_items[] = { + static const EnumPropertyItem mode_items[] = { {SACTCONT_DOPESHEET, "DOPESHEET", ICON_OOPS, "Dope Sheet", "Edit all keyframes in scene"}, {SACTCONT_ACTION, "ACTION", ICON_OBJECT_DATA, "Action Editor", "Edit keyframes in active object's Object-level action"}, {SACTCONT_SHAPEKEY, "SHAPEKEY", ICON_SHAPEKEY_DATA, "Shape Key Editor", "Edit keyframes in active object's Shape Keys action"}, @@ -3493,7 +3494,7 @@ static void rna_def_space_graph(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem mode_items[] = { + static const EnumPropertyItem mode_items[] = { {SIPO_MODE_ANIMATION, "FCURVES", ICON_IPO, "F-Curve", "Edit animation/keyframes displayed as 2D curves"}, {SIPO_MODE_DRIVERS, "DRIVERS", ICON_DRIVER, "Drivers", "Edit drivers"}, @@ -3501,7 +3502,7 @@ static void rna_def_space_graph(BlenderRNA *brna) }; /* this is basically the same as the one for the 3D-View, but with some entries omitted */ - static EnumPropertyItem gpivot_items[] = { + static const EnumPropertyItem gpivot_items[] = { {V3D_AROUND_CENTER_BOUNDS, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center", ""}, {V3D_AROUND_CURSOR, "CURSOR", ICON_CURSOR, "2D Cursor", ""}, {V3D_AROUND_LOCAL_ORIGINS, "INDIVIDUAL_ORIGINS", ICON_ROTATECOLLECTION, "Individual Centers", ""}, @@ -3749,7 +3750,7 @@ static void rna_def_space_time(BlenderRNA *brna) static void rna_def_console_line(BlenderRNA *brna) { - static EnumPropertyItem console_line_type_items[] = { + static const EnumPropertyItem console_line_type_items[] = { {CONSOLE_LINE_OUTPUT, "OUTPUT", 0, "Output", ""}, {CONSOLE_LINE_INPUT, "INPUT", 0, "Input", ""}, {CONSOLE_LINE_INFO, "INFO", 0, "Info", ""}, @@ -3828,14 +3829,14 @@ static void rna_def_fileselect_params(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem file_display_items[] = { + static const EnumPropertyItem file_display_items[] = { {FILE_SHORTDISPLAY, "LIST_SHORT", ICON_SHORTDISPLAY, "Short List", "Display files as short list"}, {FILE_LONGDISPLAY, "LIST_LONG", ICON_LONGDISPLAY, "Long List", "Display files as a detailed list"}, {FILE_IMGDISPLAY, "THUMBNAIL", ICON_IMGDISPLAY, "Thumbnails", "Display files as thumbnails"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem display_size_items[] = { + static const EnumPropertyItem display_size_items[] = { {32, "TINY", 0, "Tiny", ""}, {64, "SMALL", 0, "Small", ""}, {128, "NORMAL", 0, "Normal", ""}, @@ -3843,7 +3844,7 @@ static void rna_def_fileselect_params(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem file_filter_idtypes_items[] = { + static const EnumPropertyItem file_filter_idtypes_items[] = { {FILTER_ID_AC, "ACTION", ICON_ANIM_DATA, "Actions", "Show/hide Action data-blocks"}, {FILTER_ID_AR, "ARMATURE", ICON_ARMATURE_DATA, "Armatures", "Show/hide Armature data-blocks"}, {FILTER_ID_BR, "BRUSH", ICON_BRUSH_DATA, "Brushes", "Show/hide Brushes data-blocks"}, @@ -3878,7 +3879,7 @@ static void rna_def_fileselect_params(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem file_filter_idcategories_items[] = { + static const EnumPropertyItem file_filter_idcategories_items[] = { {FILTER_ID_SCE, "SCENE", ICON_SCENE_DATA, "Scenes", "Show/hide scenes"}, {FILTER_ID_AC, @@ -4202,7 +4203,7 @@ static void rna_def_space_info(BlenderRNA *brna) static void rna_def_space_userpref(BlenderRNA *brna) { - static EnumPropertyItem filter_type_items[] = { + static const EnumPropertyItem filter_type_items[] = { {0, "NAME", 0, "Name", "Filter based on the operator name"}, {1, "KEY", 0, "Key-Binding", "Filter based on key bindings"}, {0, NULL, 0, NULL, NULL}}; @@ -4286,7 +4287,7 @@ static void rna_def_space_node(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem texture_id_type_items[] = { + static const EnumPropertyItem texture_id_type_items[] = { {SNODE_TEX_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Edit texture nodes from Object"}, {SNODE_TEX_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit texture nodes from World"}, {SNODE_TEX_BRUSH, "BRUSH", ICON_BRUSH_DATA, "Brush", "Edit texture nodes from Brush"}, @@ -4296,7 +4297,7 @@ static void rna_def_space_node(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem shader_type_items[] = { + static const EnumPropertyItem shader_type_items[] = { {SNODE_SHADER_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Edit shader nodes from Object"}, {SNODE_SHADER_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit shader nodes from World"}, #ifdef WITH_FREESTYLE @@ -4305,7 +4306,7 @@ static void rna_def_space_node(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem backdrop_channels_items[] = { + static const EnumPropertyItem backdrop_channels_items[] = { {SNODE_USE_ALPHA, "COLOR_ALPHA", ICON_IMAGE_RGB_ALPHA, "Color and Alpha", "Draw image with RGB colors and alpha transparency"}, {0, "COLOR", ICON_IMAGE_RGB, "Color", "Draw image with RGB colors"}, @@ -4316,13 +4317,13 @@ static void rna_def_space_node(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem insert_ofs_dir_items[] = { + static const EnumPropertyItem insert_ofs_dir_items[] = { {SNODE_INSERTOFS_DIR_RIGHT, "RIGHT", 0, "Right"}, {SNODE_INSERTOFS_DIR_LEFT, "LEFT", 0, "Left"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem dummy_items[] = { + static const EnumPropertyItem dummy_items[] = { {0, "DUMMY", 0, "", ""}, {0, NULL, 0, NULL, NULL}}; @@ -4521,20 +4522,20 @@ static void rna_def_space_clip(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem view_items[] = { + static const EnumPropertyItem view_items[] = { {SC_VIEW_CLIP, "CLIP", ICON_SEQUENCE, "Clip", "Show editing clip preview"}, {SC_VIEW_GRAPH, "GRAPH", ICON_IPO, "Graph", "Show graph view for active element"}, {SC_VIEW_DOPESHEET, "DOPESHEET", ICON_ACTION, "Dopesheet", "Dopesheet view for tracking data"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem gpencil_source_items[] = { + static const EnumPropertyItem gpencil_source_items[] = { {SC_GPENCIL_SRC_CLIP, "CLIP", 0, "Clip", "Show grease pencil data-block which belongs to movie clip"}, {SC_GPENCIL_SRC_TRACK, "TRACK", 0, "Track", "Show grease pencil data-block which belongs to active track"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem pivot_items[] = { + static const EnumPropertyItem pivot_items[] = { {V3D_AROUND_CENTER_BOUNDS, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center", "Pivot around bounding box center of selected object(s)"}, {V3D_AROUND_CURSOR, "CURSOR", ICON_CURSOR, "2D Cursor", "Pivot around the 2D cursor"}, diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index 4ad2832b953..a78b3242a66 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -52,7 +52,7 @@ #include "WM_types.h" #ifndef RNA_RUNTIME -static EnumPropertyItem texture_filter_items[] = { +static const EnumPropertyItem texture_filter_items[] = { {TXF_BOX, "BOX", 0, "Box", ""}, {TXF_EWA, "EWA", 0, "EWA", ""}, {TXF_FELINE, "FELINE", 0, "FELINE", ""}, @@ -61,7 +61,7 @@ static EnumPropertyItem texture_filter_items[] = { }; #endif -EnumPropertyItem rna_enum_texture_type_items[] = { +const EnumPropertyItem rna_enum_texture_type_items[] = { {0, "NONE", 0, "None", ""}, {TEX_BLEND, "BLEND", ICON_TEXTURE, "Blend", "Procedural - create a ramp texture"}, {TEX_CLOUDS, "CLOUDS", ICON_TEXTURE, "Clouds", "Procedural - create a cloud-like fractal noise texture"}, @@ -85,7 +85,7 @@ EnumPropertyItem rna_enum_texture_type_items[] = { }; #ifndef RNA_RUNTIME -static EnumPropertyItem blend_type_items[] = { +static const EnumPropertyItem blend_type_items[] = { {MTEX_BLEND, "MIX", 0, "Mix", ""}, {MTEX_ADD, "ADD", 0, "Add", ""}, {MTEX_SUB, "SUBTRACT", 0, "Subtract", ""}, @@ -359,8 +359,9 @@ static int rna_TextureSlot_output_node_get(PointerRNA *ptr) } -static EnumPropertyItem *rna_TextureSlot_output_node_itemf(bContext *UNUSED(C), PointerRNA *ptr, - PropertyRNA *UNUSED(prop), bool *r_free) +static const EnumPropertyItem *rna_TextureSlot_output_node_itemf( + bContext *UNUSED(C), PointerRNA *ptr, + PropertyRNA *UNUSED(prop), bool *r_free) { MTex *mtex = ptr->data; Tex *tex = mtex->tex; @@ -480,7 +481,7 @@ static char *rna_OceanTex_path(PointerRNA *UNUSED(ptr)) static void rna_def_texmapping(BlenderRNA *brna) { - static EnumPropertyItem prop_mapping_items[] = { + static const EnumPropertyItem prop_mapping_items[] = { {MTEX_FLAT, "FLAT", 0, "Flat", "Map X and Y coordinates directly"}, {MTEX_CUBE, "CUBE", 0, "Cube", "Map using the normal vector"}, {MTEX_TUBE, "TUBE", 0, "Tube", "Map with Z as central axis"}, @@ -488,7 +489,7 @@ static void rna_def_texmapping(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_vect_type_items[] = { + static const EnumPropertyItem prop_vect_type_items[] = { {TEXMAP_TYPE_TEXTURE, "TEXTURE", 0, "Texture", "Transform a texture by inverse mapping the texture coordinate"}, {TEXMAP_TYPE_POINT, "POINT", 0, "Point", "Transform a point"}, {TEXMAP_TYPE_VECTOR, "VECTOR", 0, "Vector", "Transform a direction vector"}, @@ -496,7 +497,7 @@ static void rna_def_texmapping(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_xyz_mapping_items[] = { + static const EnumPropertyItem prop_xyz_mapping_items[] = { {0, "NONE", 0, "None", ""}, {1, "X", 0, "X", ""}, {2, "Y", 0, "Y", ""}, @@ -633,7 +634,7 @@ static void rna_def_mtex(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem output_node_items[] = { + static const EnumPropertyItem output_node_items[] = { {0, "DUMMY", 0, "Dummy", ""}, {0, NULL, 0, NULL, NULL} }; @@ -770,14 +771,14 @@ static void rna_def_environment_map(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_source_items[] = { + static const EnumPropertyItem prop_source_items[] = { {ENV_STATIC, "STATIC", 0, "Static", "Calculate environment map only once"}, {ENV_ANIM, "ANIMATED", 0, "Animated", "Calculate environment map at each rendering"}, {ENV_LOAD, "IMAGE_FILE", 0, "Image File", "Load a saved environment map image from disk"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_mapping_items[] = { + static const EnumPropertyItem prop_mapping_items[] = { {ENV_CUBE, "CUBE", 0, "Cube", "Use environment map with six cube sides"}, {ENV_PLANE, "PLANE", 0, "Plane", "Only one side is rendered, with Z axis pointing in direction of image"}, {0, NULL, 0, NULL, NULL} @@ -853,7 +854,7 @@ static void rna_def_environment_map(BlenderRNA *brna) RNA_api_environment_map(srna); } -static EnumPropertyItem prop_noise_basis_items[] = { +static const EnumPropertyItem prop_noise_basis_items[] = { {TEX_BLENDER, "BLENDER_ORIGINAL", 0, "Blender Original", "Noise algorithm - Blender original: Smooth interpolated noise"}, {TEX_STDPERLIN, "ORIGINAL_PERLIN", 0, "Original Perlin", @@ -876,7 +877,7 @@ static EnumPropertyItem prop_noise_basis_items[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem prop_noise_type[] = { +static const EnumPropertyItem prop_noise_type[] = { {TEX_NOISESOFT, "SOFT_NOISE", 0, "Soft", "Generate soft noise (smooth transitions)"}, {TEX_NOISEPERL, "HARD_NOISE", 0, "Hard", "Generate hard noise (sharp transitions)"}, {0, NULL, 0, NULL, NULL} @@ -888,7 +889,7 @@ static void rna_def_texture_clouds(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_clouds_stype[] = { + static const EnumPropertyItem prop_clouds_stype[] = { {TEX_DEFAULT, "GRAYSCALE", 0, "Grayscale", ""}, {TEX_COLOR, "COLOR", 0, "Color", ""}, {0, NULL, 0, NULL, NULL} @@ -942,7 +943,7 @@ static void rna_def_texture_wood(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_wood_stype[] = { + static const EnumPropertyItem prop_wood_stype[] = { {TEX_BAND, "BANDS", 0, "Bands", "Use standard wood texture in bands"}, {TEX_RING, "RINGS", 0, "Rings", "Use wood texture in rings"}, {TEX_BANDNOISE, "BANDNOISE", 0, "Band Noise", "Add noise to standard wood"}, @@ -950,7 +951,7 @@ static void rna_def_texture_wood(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_wood_noisebasis2[] = { + static const EnumPropertyItem prop_wood_noisebasis2[] = { {TEX_SIN, "SIN", 0, "Sine", "Use a sine wave to produce bands"}, {TEX_SAW, "SAW", 0, "Saw", "Use a saw wave to produce bands"}, {TEX_TRI, "TRI", 0, "Tri", "Use a triangle wave to produce bands"}, @@ -1012,14 +1013,14 @@ static void rna_def_texture_marble(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_marble_stype[] = { + static const EnumPropertyItem prop_marble_stype[] = { {TEX_SOFT, "SOFT", 0, "Soft", "Use soft marble"}, {TEX_SHARP, "SHARP", 0, "Sharp", "Use more clearly defined marble"}, {TEX_SHARPER, "SHARPER", 0, "Sharper", "Use very clearly defined marble"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_marble_noisebasis2[] = { + static const EnumPropertyItem prop_marble_noisebasis2[] = { {TEX_SIN, "SIN", 0, "Sin", "Use a sine wave to produce bands"}, {TEX_SAW, "SAW", 0, "Saw", "Use a saw wave to produce bands"}, {TEX_TRI, "TRI", 0, "Tri", "Use a triangle wave to produce bands"}, @@ -1112,7 +1113,7 @@ static void rna_def_texture_blend(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_blend_progression[] = { + static const EnumPropertyItem prop_blend_progression[] = { {TEX_LIN, "LINEAR", 0, "Linear", "Create a linear progression"}, {TEX_QUAD, "QUADRATIC", 0, "Quadratic", "Create a quadratic progression"}, {TEX_EASE, "EASING", 0, "Easing", "Create a progression easing from one step to the next"}, @@ -1153,7 +1154,7 @@ static void rna_def_texture_stucci(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_stucci_stype[] = { + static const EnumPropertyItem prop_stucci_stype[] = { {TEX_PLASTIC, "PLASTIC", 0, "Plastic", "Use standard stucci"}, {TEX_WALLIN, "WALL_IN", 0, "Wall in", "Create Dimples"}, {TEX_WALLOUT, "WALL_OUT", 0, "Wall out", "Create Ridges"}, @@ -1211,7 +1212,7 @@ static void rna_def_texture_image(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_image_extension[] = { + static const EnumPropertyItem prop_image_extension[] = { {TEX_EXTEND, "EXTEND", 0, "Extend", "Extend by repeating edge pixels of the image"}, {TEX_CLIP, "CLIP", 0, "Clip", "Clip to image size and set exterior pixels as transparent"}, {TEX_CLIPCUBE, "CLIP_CUBE", 0, "Clip Cube", @@ -1402,7 +1403,7 @@ static void rna_def_texture_musgrave(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_musgrave_type[] = { + static const EnumPropertyItem prop_musgrave_type[] = { {TEX_MFRACTAL, "MULTIFRACTAL", 0, "Multifractal", "Use Perlin noise as a basis"}, {TEX_RIDGEDMF, "RIDGED_MULTIFRACTAL", 0, "Ridged Multifractal", "Use Perlin noise with inflection as a basis"}, @@ -1484,7 +1485,7 @@ static void rna_def_texture_voronoi(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_distance_metric_items[] = { + static const EnumPropertyItem prop_distance_metric_items[] = { {TEX_DISTANCE, "DISTANCE", 0, "Actual Distance", "sqrt(x*x+y*y+z*z)"}, {TEX_DISTANCE_SQUARED, "DISTANCE_SQUARED", 0, "Distance Squared", "(x*x+y*y+z*z)"}, {TEX_MANHATTAN, "MANHATTAN", 0, "Manhattan", @@ -1501,7 +1502,7 @@ static void rna_def_texture_voronoi(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_coloring_items[] = { + static const EnumPropertyItem prop_coloring_items[] = { /* XXX: OK names / descriptions? */ {TEX_INTENSITY, "INTENSITY", 0, "Intensity", "Only calculate intensity"}, {TEX_COL1, "POSITION", 0, "Position", "Color cells by position"}, @@ -1624,28 +1625,28 @@ static void rna_def_texture_pointdensity(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem point_source_items[] = { + static const EnumPropertyItem point_source_items[] = { {TEX_PD_PSYS, "PARTICLE_SYSTEM", 0, "Particle System", "Generate point density from a particle system"}, {TEX_PD_OBJECT, "OBJECT", 0, "Object Vertices", "Generate point density from an object's vertices"}, /*{TEX_PD_FILE, "FILE", 0, "File", ""}, */ {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem particle_cache_items[] = { + static const EnumPropertyItem particle_cache_items[] = { {TEX_PD_OBJECTLOC, "OBJECT_LOCATION", 0, "Emit Object Location", ""}, {TEX_PD_OBJECTSPACE, "OBJECT_SPACE", 0, "Emit Object Space", ""}, {TEX_PD_WORLDSPACE, "WORLD_SPACE", 0, "Global Space", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem vertex_cache_items[] = { + static const EnumPropertyItem vertex_cache_items[] = { {TEX_PD_OBJECTLOC, "OBJECT_LOCATION", 0, "Object Location", ""}, {TEX_PD_OBJECTSPACE, "OBJECT_SPACE", 0, "Object Space", ""}, {TEX_PD_WORLDSPACE, "WORLD_SPACE", 0, "Global Space", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem falloff_items[] = { + static const EnumPropertyItem falloff_items[] = { {TEX_PD_FALLOFF_STD, "STANDARD", 0, "Standard", ""}, {TEX_PD_FALLOFF_SMOOTH, "SMOOTH", 0, "Smooth", ""}, {TEX_PD_FALLOFF_SOFT, "SOFT", 0, "Soft", ""}, @@ -1656,7 +1657,7 @@ static void rna_def_texture_pointdensity(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem particle_color_source_items[] = { + static const EnumPropertyItem particle_color_source_items[] = { {TEX_PD_COLOR_CONSTANT, "CONSTANT", 0, "Constant", ""}, {TEX_PD_COLOR_PARTAGE, "PARTICLE_AGE", 0, "Particle Age", "Lifetime mapped as 0.0 - 1.0 intensity"}, {TEX_PD_COLOR_PARTSPEED, "PARTICLE_SPEED", 0, "Particle Speed", @@ -1665,7 +1666,7 @@ static void rna_def_texture_pointdensity(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem vertex_color_source_items[] = { + static const EnumPropertyItem vertex_color_source_items[] = { {TEX_PD_COLOR_CONSTANT, "CONSTANT", 0, "Constant", ""}, {TEX_PD_COLOR_VERTCOL, "VERTEX_COLOR", 0, "Vertex Color", "Vertex color layer"}, {TEX_PD_COLOR_VERTWEIGHT, "VERTEX_WEIGHT", 0, "Vertex Weight", "Vertex group weight"}, @@ -1673,7 +1674,7 @@ static void rna_def_texture_pointdensity(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem turbulence_influence_items[] = { + static const EnumPropertyItem turbulence_influence_items[] = { {TEX_PD_NOISE_STATIC, "STATIC", 0, "Static", "Noise patterns will remain unchanged, faster and suitable for stills"}, {TEX_PD_NOISE_VEL, "PARTICLE_VELOCITY", 0, "Particle Velocity", @@ -1837,7 +1838,7 @@ static void rna_def_texture_voxeldata(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem interpolation_type_items[] = { + static const EnumPropertyItem interpolation_type_items[] = { {TEX_VD_NEARESTNEIGHBOR, "NEREASTNEIGHBOR", 0, "Nearest Neighbor", "No interpolation, fast but blocky and low quality"}, {TEX_VD_LINEAR, "TRILINEAR", 0, "Linear", "Good smoothness and speed"}, @@ -1848,7 +1849,7 @@ static void rna_def_texture_voxeldata(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem file_format_items[] = { + static const EnumPropertyItem file_format_items[] = { {TEX_VD_BLENDERVOXEL, "BLENDER_VOXEL", 0, "Blender Voxel", "Default binary voxel file format"}, {TEX_VD_RAW_8BIT, "RAW_8BIT", 0, "8 bit RAW", "8 bit grayscale binary data"}, /*{TEX_VD_RAW_16BIT, "RAW_16BIT", 0, "16 bit RAW", ""}, */ @@ -1859,14 +1860,14 @@ static void rna_def_texture_voxeldata(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem voxeldata_extension[] = { + static const EnumPropertyItem voxeldata_extension[] = { {TEX_EXTEND, "EXTEND", 0, "Extend", "Extend by repeating edge pixels of the image"}, {TEX_CLIP, "CLIP", 0, "Clip", "Clip to image size and set exterior pixels as transparent"}, {TEX_REPEAT, "REPEAT", 0, "Repeat", "Cause the image to repeat horizontally and vertically"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem smoked_type_items[] = { + static const EnumPropertyItem smoked_type_items[] = { {TEX_VD_SMOKEDENSITY, "SMOKEDENSITY", 0, "Smoke", "Use smoke density and color as texture data"}, {TEX_VD_SMOKEFLAME, "SMOKEFLAME", 0, "Flame", "Use flame temperature as texture data"}, {TEX_VD_SMOKEHEAT, "SMOKEHEAT", 0, "Heat", "Use smoke heat as texture data. Values from -2.0 to 2.0 are used"}, @@ -1874,7 +1875,7 @@ static void rna_def_texture_voxeldata(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem hair_type_items[] = { + static const EnumPropertyItem hair_type_items[] = { {TEX_VD_HAIRDENSITY, "HAIRDENSITY", 0, "Density", "Use hair density as texture data"}, {TEX_VD_HAIRRESTDENSITY, "HAIRRESTDENSITY", 0, "Rest Density", "Use hair rest density as texture data"}, {TEX_VD_HAIRVELOCITY, "HAIRVELOCITY", 0, "Velocity", "Use hair velocity as texture data"}, @@ -1981,7 +1982,7 @@ static void rna_def_texture_ocean(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem ocean_output_items[] = { + static const EnumPropertyItem ocean_output_items[] = { {TEX_OCN_DISPLACEMENT, "DISPLACEMENT", 0, "Displacement", "Output XYZ displacement in RGB channels"}, /*{TEX_OCN_NORMALS, "NORMALS", 0, "Normals", "Outputs wave normals"}, *//* these are in nor channel now */ {TEX_OCN_FOAM, "FOAM", 0, "Foam", "Output Foam (wave overlap) amount in single channel"}, diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index 7a01e3a4f6b..b0f6879656a 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -826,7 +826,7 @@ static void rna_trackingCameras_matrix_from_frame(ID *id, MovieTrackingReconstru #else -static EnumPropertyItem tracker_motion_model[] = { +static const EnumPropertyItem tracker_motion_model[] = { {TRACK_MOTION_MODEL_HOMOGRAPHY, "Perspective", 0, "Perspective", "Search for markers that are perspectively deformed (homography) between frames"}, {TRACK_MOTION_MODEL_AFFINE, "Affine", 0, "Affine", @@ -842,7 +842,7 @@ static EnumPropertyItem tracker_motion_model[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem pattern_match_items[] = { +static const EnumPropertyItem pattern_match_items[] = { {TRACK_MATCH_KEYFRAME, "KEYFRAME", 0, "Keyframe", "Track pattern from keyframe to next frame"}, {TRACK_MATCH_PREVFRAME, "PREV_FRAME", 0, "Previous frame", "Track pattern from current frame to next frame"}, {0, NULL, 0, NULL, NULL} @@ -853,7 +853,7 @@ static void rna_def_trackingSettings(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem speed_items[] = { + static const EnumPropertyItem speed_items[] = { {0, "FASTEST", 0, "Fastest", "Track as fast as it's possible"}, {TRACKING_SPEED_DOUBLE, "DOUBLE", 0, "Double", "Track with double speed"}, {TRACKING_SPEED_REALTIME, "REALTIME", 0, "Realtime", "Track with realtime speed"}, @@ -862,14 +862,14 @@ static void rna_def_trackingSettings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem cleanup_items[] = { + static const EnumPropertyItem cleanup_items[] = { {TRACKING_CLEAN_SELECT, "SELECT", 0, "Select", "Select unclean tracks"}, {TRACKING_CLEAN_DELETE_TRACK, "DELETE_TRACK", 0, "Delete Track", "Delete unclean tracks"}, {TRACKING_CLEAN_DELETE_SEGMENT, "DELETE_SEGMENTS", 0, "Delete Segments", "Delete unclean segments of tracks"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem refine_items[] = { + static const EnumPropertyItem refine_items[] = { {0, "NONE", 0, "Nothing", "Do not refine camera intrinsics"}, {REFINE_FOCAL_LENGTH, "FOCAL_LENGTH", 0, "Focal Length", "Refine focal length"}, {REFINE_FOCAL_LENGTH | REFINE_RADIAL_DISTORTION_K1, "FOCAL_LENGTH_RADIAL_K1", 0, "Focal length, K1", @@ -1085,14 +1085,14 @@ static void rna_def_trackingCamera(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem distortion_model_items[] = { + static const EnumPropertyItem distortion_model_items[] = { {TRACKING_DISTORTION_MODEL_POLYNOMIAL, "POLYNOMIAL", 0, "Polynomial", "Radial distortion model which fits common cameras"}, {TRACKING_DISTORTION_MODEL_DIVISION, "DIVISION", 0, "Divisions", "Division distortion model which " "better represents wide-angle cameras"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem camera_units_items[] = { + static const EnumPropertyItem camera_units_items[] = { {CAMERA_UNITS_PX, "PIXELS", 0, "px", "Use pixels for units of focal length"}, {CAMERA_UNITS_MM, "MILLIMETERS", 0, "mm", "Use millimeters for units of focal length"}, {0, NULL, 0, NULL, NULL} @@ -1673,7 +1673,7 @@ static void rna_def_trackingStabilization(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem filter_items[] = { + static const EnumPropertyItem filter_items[] = { {TRACKING_FILTER_NEAREST, "NEAREST", 0, "Nearest", "No interpolation, use nearest neighbor pixel"}, {TRACKING_FILTER_BILINEAR, "BILINEAR", 0, "Bilinear", "Simple interpolation between adjacent pixels"}, {TRACKING_FILTER_BICUBIC, "BICUBIC", 0, "Bicubic", "High quality pixel interpolation"}, @@ -2124,7 +2124,7 @@ static void rna_def_trackingDopesheet(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem sort_items[] = { + static const EnumPropertyItem sort_items[] = { {TRACKING_DOPE_SORT_NAME, "NAME", 0, "Name", "Sort channels by their names"}, {TRACKING_DOPE_SORT_LONGEST, "LONGEST", 0, "Longest", "Sort channels by longest tracked segment"}, {TRACKING_DOPE_SORT_TOTAL, "TOTAL", 0, "Total", "Sort channels by overall amount of tracked segments"}, diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index 08038b0b1ff..f2527a8a5e9 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -43,7 +43,7 @@ #include "WM_types.h" /* see WM_types.h */ -EnumPropertyItem rna_enum_operator_context_items[] = { +const EnumPropertyItem rna_enum_operator_context_items[] = { {WM_OP_INVOKE_DEFAULT, "INVOKE_DEFAULT", 0, "Invoke Default", ""}, {WM_OP_INVOKE_REGION_WIN, "INVOKE_REGION_WIN", 0, "Invoke Region Window", ""}, {WM_OP_INVOKE_REGION_CHANNELS, "INVOKE_REGION_CHANNELS", 0, "Invoke Region Channels", ""}, @@ -59,7 +59,7 @@ EnumPropertyItem rna_enum_operator_context_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_uilist_layout_type_items[] = { +const EnumPropertyItem rna_enum_uilist_layout_type_items[] = { {UILST_LAYOUT_DEFAULT, "DEFAULT", 0, "Default Layout", "Use the default, multi-rows layout"}, {UILST_LAYOUT_COMPACT, "COMPACT", 0, "Compact Layout", "Use the compact, single-row layout"}, {UILST_LAYOUT_GRID, "GRID", 0, "Grid Layout", "Use the grid-based layout"}, @@ -896,7 +896,7 @@ static void rna_def_ui_layout(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem alignment_items[] = { + static const EnumPropertyItem alignment_items[] = { {UI_LAYOUT_ALIGN_EXPAND, "EXPAND", 0, "Expand", ""}, {UI_LAYOUT_ALIGN_LEFT, "LEFT", 0, "Left", ""}, {UI_LAYOUT_ALIGN_CENTER, "CENTER", 0, "Center", ""}, @@ -950,7 +950,7 @@ static void rna_def_panel(BlenderRNA *brna) PropertyRNA *parm; FunctionRNA *func; - static EnumPropertyItem panel_flag_items[] = { + static const EnumPropertyItem panel_flag_items[] = { {PNL_DEFAULT_CLOSED, "DEFAULT_CLOSED", 0, "Default Closed", "Defines if the panel has to be open or collapsed at the time of its creation"}, {PNL_NO_HEADER, "HIDE_HEADER", 0, "Hide Header", diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index 7d8d24670a7..88897c859e2 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -50,7 +50,7 @@ #define DEF_ICON_BLANK_SKIP #define DEF_ICON(name) {ICON_##name, (#name), 0, (#name), ""}, #define DEF_VICO(name) {VICO_##name, (#name), 0, (#name), ""}, -EnumPropertyItem rna_enum_icon_items[] = { +const EnumPropertyItem rna_enum_icon_items[] = { #include "UI_icons.h" {0, NULL, 0, NULL, NULL} }; @@ -285,7 +285,7 @@ static int rna_ui_get_rnaptr_icon(bContext *C, PointerRNA *ptr_icon) static const char *rna_ui_get_enum_name(bContext *C, PointerRNA *ptr, const char *propname, const char *identifier) { PropertyRNA *prop = NULL; - EnumPropertyItem *items = NULL, *item; + const EnumPropertyItem *items = NULL, *item; bool free; const char *name = ""; @@ -305,7 +305,7 @@ static const char *rna_ui_get_enum_name(bContext *C, PointerRNA *ptr, const char } } if (free) { - MEM_freeN(items); + MEM_freeN((void *)items); } } @@ -316,7 +316,7 @@ static const char *rna_ui_get_enum_description(bContext *C, PointerRNA *ptr, con const char *identifier) { PropertyRNA *prop = NULL; - EnumPropertyItem *items = NULL, *item; + const EnumPropertyItem *items = NULL, *item; bool free; const char *desc = ""; @@ -336,7 +336,7 @@ static const char *rna_ui_get_enum_description(bContext *C, PointerRNA *ptr, con } } if (free) { - MEM_freeN(items); + MEM_freeN((void *)items); } } @@ -346,7 +346,7 @@ static const char *rna_ui_get_enum_description(bContext *C, PointerRNA *ptr, con static int rna_ui_get_enum_icon(bContext *C, PointerRNA *ptr, const char *propname, const char *identifier) { PropertyRNA *prop = NULL; - EnumPropertyItem *items = NULL, *item; + const EnumPropertyItem *items = NULL, *item; bool free; int icon = ICON_NONE; @@ -366,7 +366,7 @@ static int rna_ui_get_enum_icon(bContext *C, PointerRNA *ptr, const char *propna } } if (free) { - MEM_freeN(items); + MEM_freeN((void *)items); } } @@ -421,7 +421,7 @@ void RNA_api_ui_layout(StructRNA *srna) FunctionRNA *func; PropertyRNA *parm; - static EnumPropertyItem curve_type_items[] = { + static const EnumPropertyItem curve_type_items[] = { {0, "NONE", 0, "None", ""}, {'v', "VECTOR", 0, "Vector", ""}, {'c', "COLOR", 0, "Color", ""}, diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index b50cbee4885..f0313601c3a 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -53,7 +53,7 @@ #include "GPU_buffers.h" #ifdef WITH_OPENSUBDIV -static EnumPropertyItem opensubdiv_compute_type_items[] = { +static const EnumPropertyItem opensubdiv_compute_type_items[] = { {USER_OPENSUBDIV_COMPUTE_NONE, "NONE", 0, "None", ""}, {USER_OPENSUBDIV_COMPUTE_CPU, "CPU", 0, "CPU", ""}, {USER_OPENSUBDIV_COMPUTE_OPENMP, "OPENMP", 0, "OpenMP", ""}, @@ -65,7 +65,7 @@ static EnumPropertyItem opensubdiv_compute_type_items[] = { }; #endif -static EnumPropertyItem audio_device_items[] = { +static const EnumPropertyItem audio_device_items[] = { {0, "NONE", 0, "None", "Null device - there will be no audio output"}, #ifdef WITH_SDL {1, "SDL", 0, "SDL", "SDL device - simple direct media layer, recommended for sequencer usage"}, @@ -79,14 +79,14 @@ static EnumPropertyItem audio_device_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_navigation_mode_items[] = { +const EnumPropertyItem rna_enum_navigation_mode_items[] = { {VIEW_NAVIGATION_WALK, "WALK", 0, "Walk", "Interactively walk or free navigate around the scene"}, {VIEW_NAVIGATION_FLY, "FLY", 0, "Fly", "Use fly dynamics to navigate the scene"}, {0, NULL, 0, NULL, NULL} }; #if defined(WITH_INTERNATIONAL) || !defined(RNA_RUNTIME) -static EnumPropertyItem rna_enum_language_default_items[] = { +static const EnumPropertyItem rna_enum_language_default_items[] = { {0, "DEFAULT", 0, "Default (Default)", ""}, {0, NULL, 0, NULL, NULL} }; @@ -462,7 +462,7 @@ static PointerRNA rna_Theme_space_list_generic_get(PointerRNA *ptr) #ifdef WITH_OPENSUBDIV -static EnumPropertyItem *rna_userdef_opensubdiv_compute_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), +static const EnumPropertyItem *rna_userdef_opensubdiv_compute_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { EnumPropertyItem *item = NULL; @@ -509,7 +509,7 @@ static void rna_userdef_opensubdiv_update(Main *bmain, Scene *UNUSED(scene), Poi #endif -static EnumPropertyItem *rna_userdef_audio_device_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), +static const EnumPropertyItem *rna_userdef_audio_device_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { int index = 0; @@ -561,10 +561,10 @@ static EnumPropertyItem *rna_userdef_audio_device_itemf(bContext *UNUSED(C), Poi } #ifdef WITH_INTERNATIONAL -static EnumPropertyItem *rna_lang_enum_properties_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), +static const EnumPropertyItem *rna_lang_enum_properties_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { - EnumPropertyItem *items = BLT_lang_RNA_enum_properties(); + const EnumPropertyItem *items = BLT_lang_RNA_enum_properties(); if (items == NULL) { items = rna_enum_language_default_items; } @@ -675,7 +675,7 @@ static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem font_kerning_style[] = { + static const EnumPropertyItem font_kerning_style[] = { {0, "UNFITTED", 0, "Unfitted", "Use scaled but un-grid-fitted kerning distances"}, {1, "FITTED", 0, "Fitted", "Use scaled and grid-fitted kerning distances"}, {0, NULL, 0, NULL, NULL} @@ -2948,7 +2948,7 @@ static void rna_def_userdef_themes(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem active_theme_area[] = { + static const EnumPropertyItem active_theme_area[] = { {0, "USER_INTERFACE", ICON_UI, "User Interface", ""}, {19, "STYLE", ICON_FONTPREVIEW, "Text Style", ""}, {18, "BONE_COLOR_SETS", ICON_COLOR, "Bone Color Sets", ""}, @@ -3280,7 +3280,7 @@ static void rna_def_userdef_walk_navigation(BlenderRNA *brna) static void rna_def_userdef_view(BlenderRNA *brna) { - static EnumPropertyItem timecode_styles[] = { + static const EnumPropertyItem timecode_styles[] = { {USER_TIMECODE_MINIMAL, "MINIMAL", 0, "Minimal Info", "Most compact representation, uses '+' as separator for sub-second frame numbers, " "with left and right truncation of the timecode as necessary"}, @@ -3296,14 +3296,14 @@ static void rna_def_userdef_view(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem zoom_frame_modes[] = { + static const EnumPropertyItem zoom_frame_modes[] = { {ZOOM_FRAME_MODE_KEEP_RANGE, "KEEP_RANGE", 0, "Keep Range", ""}, {ZOOM_FRAME_MODE_SECONDS, "SECONDS", 0, "Seconds", ""}, {ZOOM_FRAME_MODE_KEYFRAMES, "KEYFRAMES", 0, "Keyframes", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem line_width[] = { + static const EnumPropertyItem line_width[] = { {-1, "THIN", 0, "Thin", "Thinner lines than the default"}, { 0, "AUTO", 0, "Auto", "Automatic line width based on UI scale"}, { 1, "THICK", 0, "Thick", "Thicker lines than the default"}, @@ -3586,7 +3586,7 @@ static void rna_def_userdef_edit(BlenderRNA *brna) PropertyRNA *prop; StructRNA *srna; - static EnumPropertyItem auto_key_modes[] = { + static const EnumPropertyItem auto_key_modes[] = { {AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add/Replace", ""}, {AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace", ""}, {0, NULL, 0, NULL, NULL} @@ -3816,7 +3816,7 @@ static void rna_def_userdef_system(BlenderRNA *brna) PropertyRNA *prop; StructRNA *srna; - static EnumPropertyItem gl_texture_clamp_items[] = { + static const EnumPropertyItem gl_texture_clamp_items[] = { {0, "CLAMP_OFF", 0, "Off", ""}, {8192, "CLAMP_8192", 0, "8192", ""}, {4096, "CLAMP_4096", 0, "4096", ""}, @@ -3828,7 +3828,7 @@ static void rna_def_userdef_system(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem anisotropic_items[] = { + static const EnumPropertyItem anisotropic_items[] = { {1, "FILTER_0", 0, "Off", ""}, {2, "FILTER_2", 0, "2x", ""}, {4, "FILTER_4", 0, "4x", ""}, @@ -3837,7 +3837,7 @@ static void rna_def_userdef_system(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem audio_mixing_samples_items[] = { + static const EnumPropertyItem audio_mixing_samples_items[] = { {256, "SAMPLES_256", 0, "256", "Set audio mixing buffer size to 256 samples"}, {512, "SAMPLES_512", 0, "512", "Set audio mixing buffer size to 512 samples"}, {1024, "SAMPLES_1024", 0, "1024", "Set audio mixing buffer size to 1024 samples"}, @@ -3849,7 +3849,7 @@ static void rna_def_userdef_system(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem audio_rate_items[] = { + static const EnumPropertyItem audio_rate_items[] = { /* {8000, "RATE_8000", 0, "8 kHz", "Set audio sampling rate to 8000 samples per second"}, */ /* {11025, "RATE_11025", 0, "11.025 kHz", "Set audio sampling rate to 11025 samples per second"}, */ /* {16000, "RATE_16000", 0, "16 kHz", "Set audio sampling rate to 16000 samples per second"}, */ @@ -3863,7 +3863,7 @@ static void rna_def_userdef_system(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem audio_format_items[] = { + static const EnumPropertyItem audio_format_items[] = { {0x01, "U8", 0, "8-bit Unsigned", "Set audio sample format to 8 bit unsigned integer"}, {0x12, "S16", 0, "16-bit Signed", "Set audio sample format to 16 bit signed integer"}, {0x13, "S24", 0, "24-bit Signed", "Set audio sample format to 24 bit signed integer"}, @@ -3873,7 +3873,7 @@ static void rna_def_userdef_system(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem audio_channel_items[] = { + static const EnumPropertyItem audio_channel_items[] = { {1, "MONO", 0, "Mono", "Set audio channels to mono"}, {2, "STEREO", 0, "Stereo", "Set audio channels to stereo"}, {4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels"}, @@ -3882,7 +3882,7 @@ static void rna_def_userdef_system(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem draw_method_items[] = { + static const EnumPropertyItem draw_method_items[] = { {USER_DRAW_AUTOMATIC, "AUTOMATIC", 0, "Automatic", "Automatically set based on graphics card and driver"}, {USER_DRAW_TRIPLE, "TRIPLE_BUFFER", 0, "Triple Buffer", "Use a third buffer for minimal redraws at the cost of more memory"}, @@ -3896,7 +3896,7 @@ static void rna_def_userdef_system(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem color_picker_types[] = { + static const EnumPropertyItem color_picker_types[] = { {USER_CP_CIRCLE_HSV, "CIRCLE_HSV", 0, "Circle (HSV)", "A circular Hue/Saturation color wheel, with Value slider"}, {USER_CP_CIRCLE_HSL, "CIRCLE_HSL", 0, "Circle (HSL)", "A circular Hue/Saturation color wheel, with Lightness slider"}, {USER_CP_SQUARE_SV, "SQUARE_SV", 0, "Square (SV + H)", "A square showing Saturation/Value, with Hue slider"}, @@ -3905,7 +3905,7 @@ static void rna_def_userdef_system(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem multi_sample_levels[] = { + static const EnumPropertyItem multi_sample_levels[] = { {USER_MULTISAMPLE_NONE, "NONE", 0, "No MultiSample", "Do not use OpenGL MultiSample"}, {USER_MULTISAMPLE_2, "2", 0, "MultiSample: 2", "Use 2x OpenGL MultiSample (requires restart)"}, {USER_MULTISAMPLE_4, "4", 0, "MultiSample: 4", "Use 4x OpenGL MultiSample (requires restart)"}, @@ -3914,14 +3914,14 @@ static void rna_def_userdef_system(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem image_draw_methods[] = { + static const EnumPropertyItem image_draw_methods[] = { {IMAGE_DRAW_METHOD_2DTEXTURE, "2DTEXTURE", 0, "2D Texture", "Use CPU for display transform and draw image with 2D texture"}, {IMAGE_DRAW_METHOD_GLSL, "GLSL", 0, "GLSL", "Use GLSL shaders for display transform and draw image with 2D texture"}, {IMAGE_DRAW_METHOD_DRAWPIXELS, "DRAWPIXELS", 0, "DrawPixels", "Use CPU for display transform and draw image using DrawPixels"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem gpu_select_method_items[] = { + static const EnumPropertyItem gpu_select_method_items[] = { {USER_SELECT_AUTO, "AUTO", 0, "Automatic", ""}, {USER_SELECT_USE_SELECT_RENDERMODE, "GL_SELECT", 0, "OpenGL Select", ""}, {USER_SELECT_USE_OCCLUSION_QUERY, "GL_QUERY", 0, "OpenGL Occlusion Queries", ""}, @@ -4220,33 +4220,33 @@ static void rna_def_userdef_input(BlenderRNA *brna) PropertyRNA *prop; StructRNA *srna; - static EnumPropertyItem select_mouse_items[] = { + static const EnumPropertyItem select_mouse_items[] = { {USER_LMOUSESELECT, "LEFT", 0, "Left", "Use left Mouse Button for selection"}, {0, "RIGHT", 0, "Right", "Use Right Mouse Button for selection"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem view_rotation_items[] = { + static const EnumPropertyItem view_rotation_items[] = { {0, "TURNTABLE", 0, "Turntable", "Use turntable style rotation in the viewport"}, {USER_TRACKBALL, "TRACKBALL", 0, "Trackball", "Use trackball style rotation in the viewport"}, {0, NULL, 0, NULL, NULL} }; #ifdef WITH_INPUT_NDOF - static EnumPropertyItem ndof_view_navigation_items[] = { + static const EnumPropertyItem ndof_view_navigation_items[] = { {0, "FREE", 0, "Free", "Use full 6 degrees of freedom by default"}, {NDOF_MODE_ORBIT, "ORBIT", 0, "Orbit", "Orbit about the view center by default"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem ndof_view_rotation_items[] = { + static const EnumPropertyItem ndof_view_rotation_items[] = { {NDOF_TURNTABLE, "TURNTABLE", 0, "Turntable", "Use turntable style rotation in the viewport"}, {0, "TRACKBALL", 0, "Trackball", "Use trackball style rotation in the viewport"}, {0, NULL, 0, NULL, NULL} }; #endif /* WITH_INPUT_NDOF */ - static EnumPropertyItem view_zoom_styles[] = { + static const EnumPropertyItem view_zoom_styles[] = { {USER_ZOOM_CONT, "CONTINUE", 0, "Continue", "Old style zoom, continues while moving mouse up or down"}, {USER_ZOOM_DOLLY, "DOLLY", 0, "Dolly", "Zoom in and out based on vertical mouse movement"}, {USER_ZOOM_SCALE, "SCALE", 0, "Scale", @@ -4254,7 +4254,7 @@ static void rna_def_userdef_input(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem view_zoom_axes[] = { + static const EnumPropertyItem view_zoom_axes[] = { {0, "VERTICAL", 0, "Vertical", "Zoom in and out based on vertical mouse movement"}, {USER_ZOOM_HORIZ, "HORIZONTAL", 0, "Horizontal", "Zoom in and out based on horizontal mouse movement"}, {0, NULL, 0, NULL, NULL} @@ -4455,7 +4455,7 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna) PropertyRNA *prop; StructRNA *srna; - static EnumPropertyItem anim_player_presets[] = { + static const EnumPropertyItem anim_player_presets[] = { {0, "INTERNAL", 0, "Internal", "Built-in animation player"}, {2, "DJV", 0, "Djv", "Open source frame player: http://djv.sourceforge.net"}, {3, "FRAMECYCLER", 0, "FrameCycler", "Frame player from IRIDAS"}, @@ -4650,7 +4650,7 @@ void RNA_def_userdef(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem user_pref_sections[] = { + static const EnumPropertyItem user_pref_sections[] = { {USER_SECTION_INTERFACE, "INTERFACE", 0, "Interface", ""}, {USER_SECTION_EDIT, "EDITING", 0, "Editing", ""}, {USER_SECTION_INPUT, "INPUT", 0, "Input", ""}, diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index df3eae4f221..23ad51be343 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -45,7 +45,7 @@ #include "WM_types.h" #ifdef RNA_RUNTIME -static EnumPropertyItem event_keymouse_value_items[] = { +static const EnumPropertyItem event_keymouse_value_items[] = { {KM_ANY, "ANY", 0, "Any", ""}, {KM_PRESS, "PRESS", 0, "Press", ""}, {KM_RELEASE, "RELEASE", 0, "Release", ""}, @@ -54,7 +54,7 @@ static EnumPropertyItem event_keymouse_value_items[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem event_tweak_value_items[] = { +static const EnumPropertyItem event_tweak_value_items[] = { {KM_ANY, "ANY", 0, "Any", ""}, {EVT_GESTURE_N, "NORTH", 0, "North", ""}, {EVT_GESTURE_NE, "NORTH_EAST", 0, "North-East", ""}, @@ -67,7 +67,7 @@ static EnumPropertyItem event_tweak_value_items[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem event_tweak_type_items[] = { +static const EnumPropertyItem event_tweak_type_items[] = { {EVT_TWEAK_L, "EVT_TWEAK_L", 0, "Left", ""}, {EVT_TWEAK_M, "EVT_TWEAK_M", 0, "Middle", ""}, {EVT_TWEAK_R, "EVT_TWEAK_R", 0, "Right", ""}, @@ -76,7 +76,7 @@ static EnumPropertyItem event_tweak_type_items[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem event_mouse_type_items[] = { +static const EnumPropertyItem event_mouse_type_items[] = { {LEFTMOUSE, "LEFTMOUSE", 0, "Left", ""}, {MIDDLEMOUSE, "MIDDLEMOUSE", 0, "Middle", ""}, {RIGHTMOUSE, "RIGHTMOUSE", 0, "Right", ""}, @@ -102,7 +102,7 @@ static EnumPropertyItem event_mouse_type_items[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem event_timer_type_items[] = { +static const EnumPropertyItem event_timer_type_items[] = { {TIMER, "TIMER", 0, "Timer", ""}, {TIMER0, "TIMER0", 0, "Timer 0", ""}, {TIMER1, "TIMER1", 0, "Timer 1", ""}, @@ -114,12 +114,12 @@ static EnumPropertyItem event_timer_type_items[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem event_textinput_type_items[] = { +static const EnumPropertyItem event_textinput_type_items[] = { {KM_TEXTINPUT, "TEXTINPUT", 0, "Text Input", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem event_ndof_type_items[] = { +static const EnumPropertyItem event_ndof_type_items[] = { {NDOF_MOTION, "NDOF_MOTION", 0, "Motion", ""}, /* buttons on all 3dconnexion devices */ {NDOF_BUTTON_MENU, "NDOF_BUTTON_MENU", 0, "Menu", ""}, @@ -171,7 +171,7 @@ static EnumPropertyItem event_ndof_type_items[] = { #endif /* RNA_RUNTIME */ /* not returned: CAPSLOCKKEY, UNKNOWNKEY */ -EnumPropertyItem rna_enum_event_type_items[] = { +const EnumPropertyItem rna_enum_event_type_items[] = { /* Note we abuse 'tooltip' message here to store a 'compact' form of some (too) long names. */ {0, "NONE", 0, "", ""}, {LEFTMOUSE, "LEFTMOUSE", 0, "Left Mouse", "LMB"}, @@ -382,7 +382,7 @@ EnumPropertyItem rna_enum_event_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_event_value_items[] = { +const EnumPropertyItem rna_enum_event_value_items[] = { {KM_ANY, "ANY", 0, "Any", ""}, {KM_NOTHING, "NOTHING", 0, "Nothing", ""}, {KM_PRESS, "PRESS", 0, "Press", ""}, @@ -400,13 +400,13 @@ EnumPropertyItem rna_enum_event_value_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem rna_enum_keymap_propvalue_items[] = { +const EnumPropertyItem rna_enum_keymap_propvalue_items[] = { {0, "NONE", 0, "", ""}, {0, NULL, 0, NULL, NULL} }; #if 0 -static EnumPropertyItem keymap_modifiers_items[] = { +static const EnumPropertyItem keymap_modifiers_items[] = { {KM_ANY, "ANY", 0, "Any", ""}, {0, "NONE", 0, "None", ""}, {1, "FIRST", 0, "First", ""}, @@ -417,7 +417,7 @@ static EnumPropertyItem keymap_modifiers_items[] = { #ifndef RNA_RUNTIME -static EnumPropertyItem operator_flag_items[] = { +static const EnumPropertyItem operator_flag_items[] = { {OPTYPE_REGISTER, "REGISTER", 0, "Register", "Display in the info window and support the redo toolbar panel"}, {OPTYPE_UNDO, "UNDO", 0, "Undo", "Push an undo event (needed for operator redo)"}, {OPTYPE_UNDO_GROUPED, "UNDO_GROUPED", 0, "Grouped Undo", "Push a single undo event for repetead instances of this operator"}, @@ -432,7 +432,7 @@ static EnumPropertyItem operator_flag_items[] = { }; #endif -EnumPropertyItem rna_enum_operator_return_items[] = { +const EnumPropertyItem rna_enum_operator_return_items[] = { {OPERATOR_RUNNING_MODAL, "RUNNING_MODAL", 0, "Running Modal", "Keep the operator running with blender"}, {OPERATOR_CANCELLED, "CANCELLED", 0, "Cancelled", "When no action has been taken, operator exits"}, {OPERATOR_FINISHED, "FINISHED", 0, "Finished", "When the operator is complete, operator exits"}, @@ -443,7 +443,7 @@ EnumPropertyItem rna_enum_operator_return_items[] = { }; /* flag/enum */ -EnumPropertyItem rna_enum_wm_report_items[] = { +const EnumPropertyItem rna_enum_wm_report_items[] = { {RPT_DEBUG, "DEBUG", 0, "Debug", ""}, {RPT_INFO, "INFO", 0, "Info", ""}, {RPT_OPERATOR, "OPERATOR", 0, "Operator", ""}, @@ -732,7 +732,7 @@ static void rna_wmKeyMapItem_keymodifier_set(PointerRNA *ptr, int value) } -static EnumPropertyItem *rna_KeyMapItem_type_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), +static const EnumPropertyItem *rna_KeyMapItem_type_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { int map_type = rna_wmKeyMapItem_map_type_get(ptr); @@ -745,7 +745,7 @@ static EnumPropertyItem *rna_KeyMapItem_type_itemf(bContext *UNUSED(C), PointerR else return rna_enum_event_type_items; } -static EnumPropertyItem *rna_KeyMapItem_value_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), +static const EnumPropertyItem *rna_KeyMapItem_value_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { int map_type = rna_wmKeyMapItem_map_type_get(ptr); @@ -758,7 +758,7 @@ static EnumPropertyItem *rna_KeyMapItem_value_itemf(bContext *UNUSED(C), Pointer return rna_enum_event_value_items; } -static EnumPropertyItem *rna_KeyMapItem_propvalue_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), +static const EnumPropertyItem *rna_KeyMapItem_propvalue_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { wmWindowManager *wm = CTX_wm_manager(C); @@ -2041,7 +2041,7 @@ static void rna_def_keyconfig(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem map_type_items[] = { + static const EnumPropertyItem map_type_items[] = { {KMI_TYPE_KEYBOARD, "KEYBOARD", 0, "Keyboard", ""}, {KMI_TYPE_TWEAK, "TWEAK", 0, "Tweak", ""}, {KMI_TYPE_MOUSE, "MOUSE", 0, "Mouse", ""}, diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c index 677ea92aea1..089504e342a 100644 --- a/source/blender/makesrna/intern/rna_wm_api.c +++ b/source/blender/makesrna/intern/rna_wm_api.c @@ -46,7 +46,7 @@ #include "rna_internal.h" /* own include */ /* confusingm 2 enums mixed up here */ -EnumPropertyItem rna_enum_window_cursor_items[] = { +const EnumPropertyItem rna_enum_window_cursor_items[] = { {CURSOR_STD, "DEFAULT", 0, "Default", ""}, {CURSOR_NONE, "NONE", 0, "None", ""}, {CURSOR_WAIT, "WAIT", 0, "Wait", ""}, diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c index 7c1ef6b0d87..925bc52d06f 100644 --- a/source/blender/makesrna/intern/rna_world.c +++ b/source/blender/makesrna/intern/rna_world.c @@ -128,7 +128,7 @@ static void rna_def_world_mtex(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem texco_items[] = { + static const EnumPropertyItem texco_items[] = { {TEXCO_VIEW, "VIEW", 0, "View", "Use view vector for the texture coordinates"}, {TEXCO_GLOB, "GLOBAL", 0, "Global", "Use global coordinates for the texture coordinates (interior mist)"}, {TEXCO_ANGMAP, "ANGMAP", 0, "AngMap", "Use 360 degree angular coordinates, e.g. for spherical light probes"}, @@ -208,27 +208,27 @@ static void rna_def_lighting(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem blend_mode_items[] = { + static const EnumPropertyItem blend_mode_items[] = { {WO_AOMUL, "MULTIPLY", 0, "Multiply", "Multiply direct lighting with ambient occlusion, darkening the result"}, {WO_AOADD, "ADD", 0, "Add", "Add light and shadow"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_color_items[] = { + static const EnumPropertyItem prop_color_items[] = { {WO_AOPLAIN, "PLAIN", 0, "White", "Plain diffuse energy (white.)"}, {WO_AOSKYCOL, "SKY_COLOR", 0, "Sky Color", "Use horizon and zenith color for diffuse energy"}, {WO_AOSKYTEX, "SKY_TEXTURE", 0, "Sky Texture", "Does full Sky texture render for diffuse energy"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_sample_method_items[] = { + static const EnumPropertyItem prop_sample_method_items[] = { {WO_AOSAMP_CONSTANT, "CONSTANT_JITTERED", 0, "Constant Jittered", "Fastest and gives the most noise"}, {WO_AOSAMP_HALTON, "ADAPTIVE_QMC", 0, "Adaptive QMC", "Fast in high-contrast areas"}, {WO_AOSAMP_HAMMERSLEY, "CONSTANT_QMC", 0, "Constant QMC", "Best quality"}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_gather_method_items[] = { + static const EnumPropertyItem prop_gather_method_items[] = { {WO_AOGATHER_RAYTRACE, "RAYTRACE", 0, "Raytrace", "Accurate, but slow when noise-free results are required"}, {WO_AOGATHER_APPROX, "APPROXIMATE", 0, "Approximate", "Inaccurate, but faster and without noise"}, {0, NULL, 0, NULL, NULL} @@ -389,7 +389,7 @@ static void rna_def_world_mist(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem falloff_items[] = { + static const EnumPropertyItem falloff_items[] = { {0, "QUADRATIC", 0, "Quadratic", "Use quadratic progression"}, {1, "LINEAR", 0, "Linear", "Use linear progression"}, {2, "INVERSE_QUADRATIC", 0, "Inverse Quadratic", "Use inverse quadratic progression"}, -- cgit v1.2.3