Cleanup: use const EnumPropertyItem pointers
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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};
|
||||
|
||||
@@ -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[];
|
||||
|
||||
/* -------- */
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
/**
|
||||
|
||||
@@ -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", ""},
|
||||
|
||||
@@ -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"},
|
||||
|
||||
@@ -190,8 +190,8 @@ blender::VectorSet<Sequence *> 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. */
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user