diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-14 01:50:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-14 01:54:55 +0300 |
commit | ae6e84471ab4fbf7c1f9b16b5184ca2b3040d65c (patch) | |
tree | b4d0ce6b3b994b1f12c1e2bb3c252034a87264c7 /source/blender | |
parent | 72369c638d936a76ba58c98b4b89626f6ff28f32 (diff) | |
parent | c1d29ea7835c0f2ebd20531dfe3996c6bbce6b58 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender')
18 files changed, 10 insertions, 33 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index e608058dd99..76296b12898 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -2259,7 +2259,9 @@ void uiItemM(uiLayout *layout, const char *menuname, const char *name, int icon) if (layout->root->type == UI_LAYOUT_MENU && !icon) icon = ICON_BLANK1; - ui_item_menu(layout, name, icon, ui_item_menutype_func, mt, NULL, TIP_(mt->description), false); + ui_item_menu( + layout, name, icon, ui_item_menutype_func, mt, NULL, + mt->description ? TIP_(mt->description) : "", false); } /* popover */ diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 6009b0bdb81..81632b48c80 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -1555,7 +1555,6 @@ static void VIEW2D_OT_smoothview(wmOperatorType *ot) { /* identifiers */ ot->name = "Smooth View 2D"; - ot->description = ""; ot->idname = "VIEW2D_OT_smoothview"; /* api callbacks */ diff --git a/source/blender/editors/mask/mask_shapekey.c b/source/blender/editors/mask/mask_shapekey.c index 3fb1cc87dbd..4337ff705b6 100644 --- a/source/blender/editors/mask/mask_shapekey.c +++ b/source/blender/editors/mask/mask_shapekey.c @@ -89,7 +89,6 @@ void MASK_OT_shape_key_insert(wmOperatorType *ot) { /* identifiers */ ot->name = "Insert Shape Key"; - ot->description = ""; ot->idname = "MASK_OT_shape_key_insert"; /* api callbacks */ @@ -138,7 +137,6 @@ void MASK_OT_shape_key_clear(wmOperatorType *ot) { /* identifiers */ ot->name = "Clear Shape Key"; - ot->description = ""; ot->idname = "MASK_OT_shape_key_clear"; /* api callbacks */ diff --git a/source/blender/editors/mesh/editmesh_polybuild.c b/source/blender/editors/mesh/editmesh_polybuild.c index bf927478187..882ee3092b4 100644 --- a/source/blender/editors/mesh/editmesh_polybuild.c +++ b/source/blender/editors/mesh/editmesh_polybuild.c @@ -312,7 +312,6 @@ void MESH_OT_polybuild_face_at_cursor(wmOperatorType *ot) /* identifiers */ ot->name = "Poly Build Face at Cursor"; ot->idname = "MESH_OT_polybuild_face_at_cursor"; - ot->description = ""; /* api callbacks */ ot->invoke = edbm_polybuild_face_at_cursor_invoke; @@ -395,7 +394,6 @@ void MESH_OT_polybuild_split_at_cursor(wmOperatorType *ot) /* identifiers */ ot->name = "Poly Build Split at Cursor"; ot->idname = "MESH_OT_polybuild_split_at_cursor"; - ot->description = ""; /* api callbacks */ ot->invoke = edbm_polybuild_split_at_cursor_invoke; @@ -486,7 +484,6 @@ void MESH_OT_polybuild_dissolve_at_cursor(wmOperatorType *ot) /* identifiers */ ot->name = "Poly Build Dissolve at Cursor"; ot->idname = "MESH_OT_polybuild_dissolve_at_cursor"; - ot->description = ""; /* api callbacks */ ot->invoke = edbm_polybuild_dissolve_at_cursor_invoke; diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 35ab7fa9c55..5f6bffae7f6 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -288,7 +288,6 @@ void MESH_OT_subdivide_edgering(wmOperatorType *ot) { /* identifiers */ ot->name = "Subdivide Edge-Ring"; - ot->description = ""; ot->idname = "MESH_OT_subdivide_edgering"; /* api callbacks */ diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 5c01f02c3ef..352597c603d 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -2536,7 +2536,6 @@ void OBJECT_OT_drop_named_material(wmOperatorType *ot) { /* identifiers */ ot->name = "Drop Named Material on Object"; - ot->description = ""; ot->idname = "OBJECT_OT_drop_named_material"; /* api callbacks */ @@ -2593,7 +2592,6 @@ void OBJECT_OT_unlink_data(wmOperatorType *ot) /* identifiers */ ot->name = "Unlink"; ot->idname = "OBJECT_OT_unlink_data"; - ot->description = ""; /* api callbacks */ ot->exec = object_unlink_data_exec; diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 92f0ceddc3c..a9fcbf7ec89 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -1714,7 +1714,6 @@ static int filepath_drop_exec(bContext *C, wmOperator *op) void FILE_OT_filepath_drop(wmOperatorType *ot) { ot->name = "File Selector Drop"; - ot->description = ""; ot->idname = "FILE_OT_filepath_drop"; ot->exec = filepath_drop_exec; diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 7cee70def37..973091a4b9d 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -561,7 +561,6 @@ void OUTLINER_OT_id_remap(wmOperatorType *ot) /* identifiers */ ot->name = "Outliner ID data Remap"; ot->idname = "OUTLINER_OT_id_remap"; - ot->description = ""; /* callbacks */ ot->invoke = outliner_id_remap_invoke; diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index b66622536e9..85546c98acd 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -1041,7 +1041,6 @@ void OUTLINER_OT_object_operation(wmOperatorType *ot) /* identifiers */ ot->name = "Outliner Object Operation"; ot->idname = "OUTLINER_OT_object_operation"; - ot->description = ""; /* callbacks */ ot->invoke = WM_menu_invoke; @@ -1285,7 +1284,6 @@ void OUTLINER_OT_id_operation(wmOperatorType *ot) /* identifiers */ ot->name = "Outliner ID data Operation"; ot->idname = "OUTLINER_OT_id_operation"; - ot->description = ""; /* callbacks */ ot->invoke = WM_menu_invoke; @@ -1381,7 +1379,6 @@ void OUTLINER_OT_lib_operation(wmOperatorType *ot) /* identifiers */ ot->name = "Outliner Library Operation"; ot->idname = "OUTLINER_OT_lib_operation"; - ot->description = ""; /* callbacks */ ot->invoke = WM_menu_invoke; @@ -1605,7 +1602,6 @@ void OUTLINER_OT_animdata_operation(wmOperatorType *ot) /* identifiers */ ot->name = "Outliner Animation Data Operation"; ot->idname = "OUTLINER_OT_animdata_operation"; - ot->description = ""; /* callbacks */ ot->invoke = WM_menu_invoke; @@ -1651,7 +1647,6 @@ void OUTLINER_OT_constraint_operation(wmOperatorType *ot) /* identifiers */ ot->name = "Outliner Constraint Operation"; ot->idname = "OUTLINER_OT_constraint_operation"; - ot->description = ""; /* callbacks */ ot->invoke = WM_menu_invoke; @@ -1697,7 +1692,6 @@ void OUTLINER_OT_modifier_operation(wmOperatorType *ot) /* identifiers */ ot->name = "Outliner Modifier Operation"; ot->idname = "OUTLINER_OT_modifier_operation"; - ot->description = ""; /* callbacks */ ot->invoke = WM_menu_invoke; @@ -1795,7 +1789,6 @@ void OUTLINER_OT_data_operation(wmOperatorType *ot) /* identifiers */ ot->name = "Outliner Data Operation"; ot->idname = "OUTLINER_OT_data_operation"; - ot->description = ""; /* callbacks */ ot->invoke = WM_menu_invoke; diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index e01d36388f8..b01ef02fb38 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -3267,7 +3267,6 @@ void SEQUENCER_OT_copy(wmOperatorType *ot) /* identifiers */ ot->name = "Copy"; ot->idname = "SEQUENCER_OT_copy"; - ot->description = ""; /* api callbacks */ ot->exec = sequencer_copy_exec; @@ -3332,7 +3331,6 @@ void SEQUENCER_OT_paste(wmOperatorType *ot) /* identifiers */ ot->name = "Paste"; ot->idname = "SEQUENCER_OT_paste"; - ot->description = ""; /* api callbacks */ ot->exec = sequencer_paste_exec; @@ -3663,7 +3661,6 @@ void SEQUENCER_OT_change_effect_input(struct wmOperatorType *ot) /* identifiers */ ot->name = "Change Effect Input"; ot->idname = "SEQUENCER_OT_change_effect_input"; - ot->description = ""; /* api callbacks */ ot->exec = sequencer_change_effect_input_exec; @@ -3723,7 +3720,6 @@ void SEQUENCER_OT_change_effect_type(struct wmOperatorType *ot) /* identifiers */ ot->name = "Change Effect Type"; ot->idname = "SEQUENCER_OT_change_effect_type"; - ot->description = ""; /* api callbacks */ ot->exec = sequencer_change_effect_type_exec; @@ -3858,7 +3854,6 @@ void SEQUENCER_OT_change_path(struct wmOperatorType *ot) /* identifiers */ ot->name = "Change Data/Files"; ot->idname = "SEQUENCER_OT_change_path"; - ot->description = ""; /* api callbacks */ ot->exec = sequencer_change_path_exec; diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 8d8d98135e5..61c7b479826 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -2307,7 +2307,6 @@ void TEXT_OT_scroll(wmOperatorType *ot) * scroll_bar. Both do basically the same thing (aside * from keymaps).*/ ot->idname = "TEXT_OT_scroll"; - ot->description = ""; /* api callbacks */ ot->exec = text_scroll_exec; @@ -2399,7 +2398,6 @@ void TEXT_OT_scroll_bar(wmOperatorType *ot) * scroll. Both do basically the same thing (aside * from keymaps).*/ ot->idname = "TEXT_OT_scroll_bar"; - ot->description = ""; /* api callbacks */ ot->invoke = text_scroll_bar_invoke; diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index be8210a4198..0c4e370ef8c 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -1251,7 +1251,6 @@ static int view3d_object_mode_menu(bContext *C, wmOperator *op) void VIEW3D_OT_object_mode_pie_or_toggle(wmOperatorType *ot) { ot->name = "Object Mode Menu"; - ot->description = ""; ot->idname = "VIEW3D_OT_object_mode_pie_or_toggle"; ot->exec = view3d_object_mode_menu; diff --git a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c index 34709e434ac..96fbe1d48a6 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c @@ -1079,7 +1079,6 @@ void VIEW3D_OT_ruler_add(wmOperatorType *ot) /* identifiers */ ot->name = "Ruler Add"; ot->idname = "VIEW3D_OT_ruler_add"; - ot->description = ""; ot->invoke = view3d_ruler_add_invoke; ot->poll = view3d_ruler_poll; diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 33a3cd8e151..73823791e6c 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -417,7 +417,6 @@ void VIEW3D_OT_smoothview(wmOperatorType *ot) { /* identifiers */ ot->name = "Smooth View"; - ot->description = ""; ot->idname = "VIEW3D_OT_smoothview"; /* api callbacks */ diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index 9d395f3ec9b..5f4b6ffc41c 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -829,8 +829,9 @@ static StructRNA *rna_Menu_register( memcpy(buf, _menu_descr, description_size); mt->description = buf; } - else - mt->description = ""; + else { + mt->description = NULL; + } mt->ext.srna = RNA_def_struct_ptr(&BLENDER_RNA, mt->idname, &RNA_Menu); RNA_def_struct_translation_context(mt->ext.srna, mt->translation_context); diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 7ceaa769d78..4e79c516ae3 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -1318,7 +1318,7 @@ static StructRNA *rna_Operator_register( dummyot.idname = strings_table[0]; /* allocated string stored here */ dummyot.name = strings_table[1]; - dummyot.description = strings_table[2]; + dummyot.description = *strings_table[2] ? strings_table[2] : NULL; dummyot.translation_context = strings_table[3]; dummyot.undo_group = strings_table[4]; BLI_assert(ARRAY_SIZE(strings) == 5); @@ -1460,7 +1460,7 @@ static StructRNA *rna_MacroOperator_register( dummyot.idname = strings_table[0]; /* allocated string stored here */ dummyot.name = strings_table[1]; - dummyot.description = strings_table[2]; + dummyot.description = *strings_table[2] ? strings_table[2] : NULL; dummyot.translation_context = strings_table[3]; dummyot.undo_group = strings_table[4]; BLI_assert(ARRAY_SIZE(strings) == 5); diff --git a/source/blender/windowmanager/intern/wm_menu_type.c b/source/blender/windowmanager/intern/wm_menu_type.c index c8bce13b27c..020d08f35fa 100644 --- a/source/blender/windowmanager/intern/wm_menu_type.c +++ b/source/blender/windowmanager/intern/wm_menu_type.c @@ -61,6 +61,7 @@ MenuType *WM_menutype_find(const char *idname, bool quiet) bool WM_menutype_add(MenuType *mt) { + BLI_assert((mt->description == NULL) || (mt->description[0])); BLI_ghash_insert(menutypes_hash, mt->idname, mt); return true; } diff --git a/source/blender/windowmanager/intern/wm_operator_type.c b/source/blender/windowmanager/intern/wm_operator_type.c index 33613d97f03..54a09f7ce9a 100644 --- a/source/blender/windowmanager/intern/wm_operator_type.c +++ b/source/blender/windowmanager/intern/wm_operator_type.c @@ -120,6 +120,7 @@ static void wm_operatortype_append__end(wmOperatorType *ot) if (ot->name == NULL) { CLOG_ERROR(WM_LOG_OPERATORS, "Operator '%s' has no name property", ot->idname); } + BLI_assert((ot->description == NULL) || (ot->description[0])); /* Allow calling _begin without _end in operatortype creation. */ WM_operatortype_props_advanced_end(ot); |