Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-01-13 11:58:57 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-01-13 11:58:57 +0300
commit7b68d0679e98b3b4ef981d00df0293940675fed8 (patch)
tree411733ea133493e5ec952d25db96250413cfa3fc /source
parent7af8271c34ac07a0ea50aafbde7cc72262a8c451 (diff)
Cleanup: rename enum for event value items
This contains all value items (with overlapping values), name this to make it clear it contains all items.
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/RNA_enum_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_wm.c10
-rw-r--r--source/blender/makesrna/intern/rna_wm_api.c6
-rw-r--r--source/blender/windowmanager/intern/wm_event_query.c2
4 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index 00326afa4a3..2436b1f50d4 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -118,7 +118,7 @@ extern const EnumPropertyItem rna_enum_nla_mode_blend_items[];
extern const EnumPropertyItem rna_enum_motionpath_bake_location_items[];
-extern const EnumPropertyItem rna_enum_event_value_items[];
+extern const EnumPropertyItem rna_enum_event_value_all_items[];
extern const EnumPropertyItem rna_enum_event_value_keymouse_items[];
extern const EnumPropertyItem rna_enum_event_value_tweak_items[];
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index f4b9c8fd8c2..d67d62d7af9 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -373,7 +373,7 @@ const EnumPropertyItem rna_enum_event_type_items[] = {
* This is needed for `km.keymap_items.new` value argument,
* to accept values from different types.
*/
-const EnumPropertyItem rna_enum_event_value_items[] = {
+const EnumPropertyItem rna_enum_event_value_all_items[] = {
{KM_ANY, "ANY", 0, "Any", ""},
{KM_PRESS, "PRESS", 0, "Press", ""},
{KM_RELEASE, "RELEASE", 0, "Release", ""},
@@ -623,7 +623,7 @@ static const EnumPropertyItem *rna_Event_value_itemf(bContext *UNUSED(C),
if (ISTWEAK(event->type)) {
return rna_enum_event_value_tweak_items;
}
- return rna_enum_event_value_items;
+ return rna_enum_event_value_all_items;
}
static void rna_Event_ascii_get(PointerRNA *ptr, char *value)
@@ -990,7 +990,7 @@ static const EnumPropertyItem *rna_KeyMapItem_value_itemf(bContext *UNUSED(C),
return rna_enum_event_value_tweak_items;
}
else {
- return rna_enum_event_value_items;
+ return rna_enum_event_value_all_items;
}
}
@@ -2132,7 +2132,7 @@ static void rna_def_event(BlenderRNA *brna)
/* enums */
prop = RNA_def_property(srna, "value", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "val");
- RNA_def_property_enum_items(prop, rna_enum_event_value_items);
+ RNA_def_property_enum_items(prop, rna_enum_event_value_all_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Event_value_itemf");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Value", "The type of event, only applies to some");
@@ -2697,7 +2697,7 @@ static void rna_def_keyconfig(BlenderRNA *brna)
prop = RNA_def_property(srna, "value", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "val");
- RNA_def_property_enum_items(prop, rna_enum_event_value_items);
+ RNA_def_property_enum_items(prop, rna_enum_event_value_all_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_KeyMapItem_value_itemf");
RNA_def_property_ui_text(prop, "Value", "");
RNA_def_property_update(prop, 0, "rna_KeyMapItem_update");
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c
index 2c373eb8d46..3ebcb09a65d 100644
--- a/source/blender/makesrna/intern/rna_wm_api.c
+++ b/source/blender/makesrna/intern/rna_wm_api.c
@@ -722,7 +722,7 @@ void RNA_api_window(StructRNA *srna)
RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm = RNA_def_enum(func, "type", rna_enum_event_type_items, 0, "Type", "");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
- parm = RNA_def_enum(func, "value", rna_enum_event_value_items, 0, "Value", "");
+ parm = RNA_def_enum(func, "value", rna_enum_event_value_all_items, 0, "Value", "");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_string(func, "unicode", NULL, 0, "", "");
RNA_def_parameter_clear_flags(parm, PROP_NEVER_NULL, 0);
@@ -1127,7 +1127,7 @@ void RNA_api_keymapitems(StructRNA *srna)
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_enum(func, "type", rna_enum_event_type_items, 0, "Type", "");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
- parm = RNA_def_enum(func, "value", rna_enum_event_value_items, 0, "Value", "");
+ parm = RNA_def_enum(func, "value", rna_enum_event_value_all_items, 0, "Value", "");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
RNA_def_boolean(func, "any", 0, "Any", "");
RNA_def_boolean(func, "shift", 0, "Shift", "");
@@ -1151,7 +1151,7 @@ void RNA_api_keymapitems(StructRNA *srna)
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_enum(func, "type", rna_enum_event_type_items, 0, "Type", "");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
- parm = RNA_def_enum(func, "value", rna_enum_event_value_items, 0, "Value", "");
+ parm = RNA_def_enum(func, "value", rna_enum_event_value_all_items, 0, "Value", "");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
RNA_def_boolean(func, "any", 0, "Any", "");
RNA_def_boolean(func, "shift", 0, "Shift", "");
diff --git a/source/blender/windowmanager/intern/wm_event_query.c b/source/blender/windowmanager/intern/wm_event_query.c
index 9d23617d5b4..ab8f37548b7 100644
--- a/source/blender/windowmanager/intern/wm_event_query.c
+++ b/source/blender/windowmanager/intern/wm_event_query.c
@@ -67,7 +67,7 @@ static void event_ids_from_type_and_value(const short type,
RNA_enum_identifier(rna_enum_event_value_tweak_items, val, r_val_id);
}
else {
- RNA_enum_identifier(rna_enum_event_value_items, val, r_val_id);
+ RNA_enum_identifier(rna_enum_event_value_all_items, val, r_val_id);
}
}