diff --git a/source/blender/blentranslation/BLT_lang.hh b/source/blender/blentranslation/BLT_lang.hh index 6f11f77d2b9..054df9174d8 100644 --- a/source/blender/blentranslation/BLT_lang.hh +++ b/source/blender/blentranslation/BLT_lang.hh @@ -46,4 +46,4 @@ void BLT_lang_locale_explode(const char *locale, char **language_variant); /* Get EnumPropertyItem's for translations menu. */ -EnumPropertyItem *BLT_lang_RNA_enum_properties(); +const EnumPropertyItem *BLT_lang_RNA_enum_properties(); diff --git a/source/blender/blentranslation/intern/blt_lang.cc b/source/blender/blentranslation/intern/blt_lang.cc index efdf8f09848..26f0d0cf02a 100644 --- a/source/blender/blentranslation/intern/blt_lang.cc +++ b/source/blender/blentranslation/intern/blt_lang.cc @@ -171,7 +171,7 @@ static void fill_locales() } #endif /* WITH_INTERNATIONAL */ -EnumPropertyItem *BLT_lang_RNA_enum_properties() +const EnumPropertyItem *BLT_lang_RNA_enum_properties() { #ifdef WITH_INTERNATIONAL return locales_menu; diff --git a/source/blender/editors/animation/drivers.cc b/source/blender/editors/animation/drivers.cc index bc5fc73ff47..63754a82b58 100644 --- a/source/blender/editors/animation/drivers.cc +++ b/source/blender/editors/animation/drivers.cc @@ -835,7 +835,7 @@ void ANIM_copy_as_driver(ID *target_id, const char *target_path, const char *var /* Add Driver - Enum Defines ------------------------- */ -EnumPropertyItem prop_driver_create_mapping_types[] = { +const EnumPropertyItem prop_driver_create_mapping_types[] = { /* XXX: These names need reviewing. */ {CREATEDRIVER_MAPPING_1_N, "SINGLE_MANY", @@ -873,7 +873,7 @@ static const EnumPropertyItem *driver_mapping_type_itemf(bContext *C, PropertyRNA * /*owner_prop*/, bool *r_free) { - EnumPropertyItem *input = prop_driver_create_mapping_types; + const EnumPropertyItem *input = prop_driver_create_mapping_types; EnumPropertyItem *item = nullptr; PointerRNA ptr = {nullptr}; diff --git a/source/blender/editors/include/ED_keyframing.hh b/source/blender/editors/include/ED_keyframing.hh index e41df62832c..d44c88eafee 100644 --- a/source/blender/editors/include/ED_keyframing.hh +++ b/source/blender/editors/include/ED_keyframing.hh @@ -299,7 +299,7 @@ enum eCreateDriver_MappingTypes { * Mapping Types enum for operators. * \note Used by #ANIM_OT_driver_button_add and #UI_OT_eyedropper_driver. */ -extern EnumPropertyItem prop_driver_create_mapping_types[]; +extern const EnumPropertyItem prop_driver_create_mapping_types[]; /* -------- */ diff --git a/source/blender/editors/include/ED_object.hh b/source/blender/editors/include/ED_object.hh index 3cae06adcb2..93a453dcf8f 100644 --- a/source/blender/editors/include/ED_object.hh +++ b/source/blender/editors/include/ED_object.hh @@ -184,9 +184,9 @@ enum eObClearParentTypes { #ifdef __RNA_TYPES_H__ /** Operator Property: `OBJECT_OT_parent_clear`. */ -extern EnumPropertyItem prop_clear_parent_types[]; +extern const EnumPropertyItem prop_clear_parent_types[]; /** Operator Property: `OBJECT_OT_parent_set`. */ -extern EnumPropertyItem prop_make_parent_types[]; +extern const EnumPropertyItem prop_make_parent_types[]; #endif /** diff --git a/source/blender/editors/object/object_relations.cc b/source/blender/editors/object/object_relations.cc index 84a067b1f23..2d959c97e2c 100644 --- a/source/blender/editors/object/object_relations.cc +++ b/source/blender/editors/object/object_relations.cc @@ -309,7 +309,7 @@ void OBJECT_OT_vertex_parent_set(wmOperatorType *ot) /** \name Clear Parent Operator * \{ */ -EnumPropertyItem prop_clear_parent_types[] = { +const EnumPropertyItem prop_clear_parent_types[] = { {CLEAR_PARENT_ALL, "CLEAR", 0, @@ -475,7 +475,7 @@ void parent_set(Object *ob, Object *par, const int type, const char *substr) STRNCPY(ob->parsubstr, substr); } -EnumPropertyItem prop_make_parent_types[] = { +const EnumPropertyItem prop_make_parent_types[] = { {PAR_OBJECT, "OBJECT", 0, "Object", ""}, {PAR_ARMATURE, "ARMATURE", 0, "Armature Deform", ""}, {PAR_ARMATURE_NAME, "ARMATURE_NAME", 0, " With Empty Groups", ""}, diff --git a/source/blender/editors/space_sequencer/sequencer_edit.cc b/source/blender/editors/space_sequencer/sequencer_edit.cc index fa34983a0f5..ad8cf09c88f 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.cc +++ b/source/blender/editors/space_sequencer/sequencer_edit.cc @@ -1337,7 +1337,7 @@ static const EnumPropertyItem prop_split_types[] = { {0, nullptr, 0, nullptr, nullptr}, }; -EnumPropertyItem prop_side_types[] = { +const EnumPropertyItem prop_side_types[] = { {SEQ_SIDE_MOUSE, "MOUSE", 0, "Mouse Position", ""}, {SEQ_SIDE_LEFT, "LEFT", 0, "Left", ""}, {SEQ_SIDE_RIGHT, "RIGHT", 0, "Right", ""}, @@ -2617,7 +2617,7 @@ void SEQUENCER_OT_change_effect_input(wmOperatorType *ot) /** \name Change Effect Type Operator * \{ */ -EnumPropertyItem sequencer_prop_effect_types[] = { +const EnumPropertyItem sequencer_prop_effect_types[] = { {SEQ_TYPE_CROSS, "CROSS", 0, "Crossfade", "Crossfade effect strip type"}, {SEQ_TYPE_ADD, "ADD", 0, "Add", "Add effect strip type"}, {SEQ_TYPE_SUB, "SUBTRACT", 0, "Subtract", "Subtract effect strip type"}, diff --git a/source/blender/editors/space_sequencer/sequencer_intern.hh b/source/blender/editors/space_sequencer/sequencer_intern.hh index cb8d9c71069..fd74384edad 100644 --- a/source/blender/editors/space_sequencer/sequencer_intern.hh +++ b/source/blender/editors/space_sequencer/sequencer_intern.hh @@ -190,8 +190,8 @@ blender::VectorSet selected_strips_from_context(bContext *C); /* Externals. */ -extern EnumPropertyItem sequencer_prop_effect_types[]; -extern EnumPropertyItem prop_side_types[]; +extern const EnumPropertyItem sequencer_prop_effect_types[]; +extern const EnumPropertyItem prop_side_types[]; /* Operators. */ diff --git a/source/blender/python/intern/bpy_app_translations.cc b/source/blender/python/intern/bpy_app_translations.cc index 958c3c8b33b..57d52a568c7 100644 --- a/source/blender/python/intern/bpy_app_translations.cc +++ b/source/blender/python/intern/bpy_app_translations.cc @@ -512,7 +512,7 @@ PyDoc_STRVAR( static PyObject *app_translations_locales_get(PyObject * /*self*/, void * /*userdata*/) { PyObject *ret; - EnumPropertyItem *it, *items = BLT_lang_RNA_enum_properties(); + const EnumPropertyItem *it, *items = BLT_lang_RNA_enum_properties(); int num_locales = 0, pos = 0; if (items) {