Merge branch 'master' into blender2.8

This commit is contained in:
2018-11-14 09:50:04 +11:00
18 changed files with 10 additions and 33 deletions

View File

@@ -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 */

View File

@@ -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 */

View File

@@ -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 */

View File

@@ -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;

View File

@@ -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 */

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -417,7 +417,6 @@ void VIEW3D_OT_smoothview(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Smooth View";
ot->description = "";
ot->idname = "VIEW3D_OT_smoothview";
/* api callbacks */

View File

@@ -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);

View File

@@ -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);

View File

@@ -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;
}

View File

@@ -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);