Merge branch 'master' into blender2.8
This commit is contained in:
@@ -2259,7 +2259,9 @@ void uiItemM(uiLayout *layout, const char *menuname, const char *name, int icon)
|
|||||||
if (layout->root->type == UI_LAYOUT_MENU && !icon)
|
if (layout->root->type == UI_LAYOUT_MENU && !icon)
|
||||||
icon = ICON_BLANK1;
|
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 */
|
/* popover */
|
||||||
|
@@ -1555,7 +1555,6 @@ static void VIEW2D_OT_smoothview(wmOperatorType *ot)
|
|||||||
{
|
{
|
||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Smooth View 2D";
|
ot->name = "Smooth View 2D";
|
||||||
ot->description = "";
|
|
||||||
ot->idname = "VIEW2D_OT_smoothview";
|
ot->idname = "VIEW2D_OT_smoothview";
|
||||||
|
|
||||||
/* api callbacks */
|
/* api callbacks */
|
||||||
|
@@ -89,7 +89,6 @@ void MASK_OT_shape_key_insert(wmOperatorType *ot)
|
|||||||
{
|
{
|
||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Insert Shape Key";
|
ot->name = "Insert Shape Key";
|
||||||
ot->description = "";
|
|
||||||
ot->idname = "MASK_OT_shape_key_insert";
|
ot->idname = "MASK_OT_shape_key_insert";
|
||||||
|
|
||||||
/* api callbacks */
|
/* api callbacks */
|
||||||
@@ -138,7 +137,6 @@ void MASK_OT_shape_key_clear(wmOperatorType *ot)
|
|||||||
{
|
{
|
||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Clear Shape Key";
|
ot->name = "Clear Shape Key";
|
||||||
ot->description = "";
|
|
||||||
ot->idname = "MASK_OT_shape_key_clear";
|
ot->idname = "MASK_OT_shape_key_clear";
|
||||||
|
|
||||||
/* api callbacks */
|
/* api callbacks */
|
||||||
|
@@ -312,7 +312,6 @@ void MESH_OT_polybuild_face_at_cursor(wmOperatorType *ot)
|
|||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Poly Build Face at Cursor";
|
ot->name = "Poly Build Face at Cursor";
|
||||||
ot->idname = "MESH_OT_polybuild_face_at_cursor";
|
ot->idname = "MESH_OT_polybuild_face_at_cursor";
|
||||||
ot->description = "";
|
|
||||||
|
|
||||||
/* api callbacks */
|
/* api callbacks */
|
||||||
ot->invoke = edbm_polybuild_face_at_cursor_invoke;
|
ot->invoke = edbm_polybuild_face_at_cursor_invoke;
|
||||||
@@ -395,7 +394,6 @@ void MESH_OT_polybuild_split_at_cursor(wmOperatorType *ot)
|
|||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Poly Build Split at Cursor";
|
ot->name = "Poly Build Split at Cursor";
|
||||||
ot->idname = "MESH_OT_polybuild_split_at_cursor";
|
ot->idname = "MESH_OT_polybuild_split_at_cursor";
|
||||||
ot->description = "";
|
|
||||||
|
|
||||||
/* api callbacks */
|
/* api callbacks */
|
||||||
ot->invoke = edbm_polybuild_split_at_cursor_invoke;
|
ot->invoke = edbm_polybuild_split_at_cursor_invoke;
|
||||||
@@ -486,7 +484,6 @@ void MESH_OT_polybuild_dissolve_at_cursor(wmOperatorType *ot)
|
|||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Poly Build Dissolve at Cursor";
|
ot->name = "Poly Build Dissolve at Cursor";
|
||||||
ot->idname = "MESH_OT_polybuild_dissolve_at_cursor";
|
ot->idname = "MESH_OT_polybuild_dissolve_at_cursor";
|
||||||
ot->description = "";
|
|
||||||
|
|
||||||
/* api callbacks */
|
/* api callbacks */
|
||||||
ot->invoke = edbm_polybuild_dissolve_at_cursor_invoke;
|
ot->invoke = edbm_polybuild_dissolve_at_cursor_invoke;
|
||||||
|
@@ -288,7 +288,6 @@ void MESH_OT_subdivide_edgering(wmOperatorType *ot)
|
|||||||
{
|
{
|
||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Subdivide Edge-Ring";
|
ot->name = "Subdivide Edge-Ring";
|
||||||
ot->description = "";
|
|
||||||
ot->idname = "MESH_OT_subdivide_edgering";
|
ot->idname = "MESH_OT_subdivide_edgering";
|
||||||
|
|
||||||
/* api callbacks */
|
/* api callbacks */
|
||||||
|
@@ -2536,7 +2536,6 @@ void OBJECT_OT_drop_named_material(wmOperatorType *ot)
|
|||||||
{
|
{
|
||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Drop Named Material on Object";
|
ot->name = "Drop Named Material on Object";
|
||||||
ot->description = "";
|
|
||||||
ot->idname = "OBJECT_OT_drop_named_material";
|
ot->idname = "OBJECT_OT_drop_named_material";
|
||||||
|
|
||||||
/* api callbacks */
|
/* api callbacks */
|
||||||
@@ -2593,7 +2592,6 @@ void OBJECT_OT_unlink_data(wmOperatorType *ot)
|
|||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Unlink";
|
ot->name = "Unlink";
|
||||||
ot->idname = "OBJECT_OT_unlink_data";
|
ot->idname = "OBJECT_OT_unlink_data";
|
||||||
ot->description = "";
|
|
||||||
|
|
||||||
/* api callbacks */
|
/* api callbacks */
|
||||||
ot->exec = object_unlink_data_exec;
|
ot->exec = object_unlink_data_exec;
|
||||||
|
@@ -1714,7 +1714,6 @@ static int filepath_drop_exec(bContext *C, wmOperator *op)
|
|||||||
void FILE_OT_filepath_drop(wmOperatorType *ot)
|
void FILE_OT_filepath_drop(wmOperatorType *ot)
|
||||||
{
|
{
|
||||||
ot->name = "File Selector Drop";
|
ot->name = "File Selector Drop";
|
||||||
ot->description = "";
|
|
||||||
ot->idname = "FILE_OT_filepath_drop";
|
ot->idname = "FILE_OT_filepath_drop";
|
||||||
|
|
||||||
ot->exec = filepath_drop_exec;
|
ot->exec = filepath_drop_exec;
|
||||||
|
@@ -561,7 +561,6 @@ void OUTLINER_OT_id_remap(wmOperatorType *ot)
|
|||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Outliner ID data Remap";
|
ot->name = "Outliner ID data Remap";
|
||||||
ot->idname = "OUTLINER_OT_id_remap";
|
ot->idname = "OUTLINER_OT_id_remap";
|
||||||
ot->description = "";
|
|
||||||
|
|
||||||
/* callbacks */
|
/* callbacks */
|
||||||
ot->invoke = outliner_id_remap_invoke;
|
ot->invoke = outliner_id_remap_invoke;
|
||||||
|
@@ -1041,7 +1041,6 @@ void OUTLINER_OT_object_operation(wmOperatorType *ot)
|
|||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Outliner Object Operation";
|
ot->name = "Outliner Object Operation";
|
||||||
ot->idname = "OUTLINER_OT_object_operation";
|
ot->idname = "OUTLINER_OT_object_operation";
|
||||||
ot->description = "";
|
|
||||||
|
|
||||||
/* callbacks */
|
/* callbacks */
|
||||||
ot->invoke = WM_menu_invoke;
|
ot->invoke = WM_menu_invoke;
|
||||||
@@ -1285,7 +1284,6 @@ void OUTLINER_OT_id_operation(wmOperatorType *ot)
|
|||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Outliner ID data Operation";
|
ot->name = "Outliner ID data Operation";
|
||||||
ot->idname = "OUTLINER_OT_id_operation";
|
ot->idname = "OUTLINER_OT_id_operation";
|
||||||
ot->description = "";
|
|
||||||
|
|
||||||
/* callbacks */
|
/* callbacks */
|
||||||
ot->invoke = WM_menu_invoke;
|
ot->invoke = WM_menu_invoke;
|
||||||
@@ -1381,7 +1379,6 @@ void OUTLINER_OT_lib_operation(wmOperatorType *ot)
|
|||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Outliner Library Operation";
|
ot->name = "Outliner Library Operation";
|
||||||
ot->idname = "OUTLINER_OT_lib_operation";
|
ot->idname = "OUTLINER_OT_lib_operation";
|
||||||
ot->description = "";
|
|
||||||
|
|
||||||
/* callbacks */
|
/* callbacks */
|
||||||
ot->invoke = WM_menu_invoke;
|
ot->invoke = WM_menu_invoke;
|
||||||
@@ -1605,7 +1602,6 @@ void OUTLINER_OT_animdata_operation(wmOperatorType *ot)
|
|||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Outliner Animation Data Operation";
|
ot->name = "Outliner Animation Data Operation";
|
||||||
ot->idname = "OUTLINER_OT_animdata_operation";
|
ot->idname = "OUTLINER_OT_animdata_operation";
|
||||||
ot->description = "";
|
|
||||||
|
|
||||||
/* callbacks */
|
/* callbacks */
|
||||||
ot->invoke = WM_menu_invoke;
|
ot->invoke = WM_menu_invoke;
|
||||||
@@ -1651,7 +1647,6 @@ void OUTLINER_OT_constraint_operation(wmOperatorType *ot)
|
|||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Outliner Constraint Operation";
|
ot->name = "Outliner Constraint Operation";
|
||||||
ot->idname = "OUTLINER_OT_constraint_operation";
|
ot->idname = "OUTLINER_OT_constraint_operation";
|
||||||
ot->description = "";
|
|
||||||
|
|
||||||
/* callbacks */
|
/* callbacks */
|
||||||
ot->invoke = WM_menu_invoke;
|
ot->invoke = WM_menu_invoke;
|
||||||
@@ -1697,7 +1692,6 @@ void OUTLINER_OT_modifier_operation(wmOperatorType *ot)
|
|||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Outliner Modifier Operation";
|
ot->name = "Outliner Modifier Operation";
|
||||||
ot->idname = "OUTLINER_OT_modifier_operation";
|
ot->idname = "OUTLINER_OT_modifier_operation";
|
||||||
ot->description = "";
|
|
||||||
|
|
||||||
/* callbacks */
|
/* callbacks */
|
||||||
ot->invoke = WM_menu_invoke;
|
ot->invoke = WM_menu_invoke;
|
||||||
@@ -1795,7 +1789,6 @@ void OUTLINER_OT_data_operation(wmOperatorType *ot)
|
|||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Outliner Data Operation";
|
ot->name = "Outliner Data Operation";
|
||||||
ot->idname = "OUTLINER_OT_data_operation";
|
ot->idname = "OUTLINER_OT_data_operation";
|
||||||
ot->description = "";
|
|
||||||
|
|
||||||
/* callbacks */
|
/* callbacks */
|
||||||
ot->invoke = WM_menu_invoke;
|
ot->invoke = WM_menu_invoke;
|
||||||
|
@@ -3267,7 +3267,6 @@ void SEQUENCER_OT_copy(wmOperatorType *ot)
|
|||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Copy";
|
ot->name = "Copy";
|
||||||
ot->idname = "SEQUENCER_OT_copy";
|
ot->idname = "SEQUENCER_OT_copy";
|
||||||
ot->description = "";
|
|
||||||
|
|
||||||
/* api callbacks */
|
/* api callbacks */
|
||||||
ot->exec = sequencer_copy_exec;
|
ot->exec = sequencer_copy_exec;
|
||||||
@@ -3332,7 +3331,6 @@ void SEQUENCER_OT_paste(wmOperatorType *ot)
|
|||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Paste";
|
ot->name = "Paste";
|
||||||
ot->idname = "SEQUENCER_OT_paste";
|
ot->idname = "SEQUENCER_OT_paste";
|
||||||
ot->description = "";
|
|
||||||
|
|
||||||
/* api callbacks */
|
/* api callbacks */
|
||||||
ot->exec = sequencer_paste_exec;
|
ot->exec = sequencer_paste_exec;
|
||||||
@@ -3663,7 +3661,6 @@ void SEQUENCER_OT_change_effect_input(struct wmOperatorType *ot)
|
|||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Change Effect Input";
|
ot->name = "Change Effect Input";
|
||||||
ot->idname = "SEQUENCER_OT_change_effect_input";
|
ot->idname = "SEQUENCER_OT_change_effect_input";
|
||||||
ot->description = "";
|
|
||||||
|
|
||||||
/* api callbacks */
|
/* api callbacks */
|
||||||
ot->exec = sequencer_change_effect_input_exec;
|
ot->exec = sequencer_change_effect_input_exec;
|
||||||
@@ -3723,7 +3720,6 @@ void SEQUENCER_OT_change_effect_type(struct wmOperatorType *ot)
|
|||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Change Effect Type";
|
ot->name = "Change Effect Type";
|
||||||
ot->idname = "SEQUENCER_OT_change_effect_type";
|
ot->idname = "SEQUENCER_OT_change_effect_type";
|
||||||
ot->description = "";
|
|
||||||
|
|
||||||
/* api callbacks */
|
/* api callbacks */
|
||||||
ot->exec = sequencer_change_effect_type_exec;
|
ot->exec = sequencer_change_effect_type_exec;
|
||||||
@@ -3858,7 +3854,6 @@ void SEQUENCER_OT_change_path(struct wmOperatorType *ot)
|
|||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Change Data/Files";
|
ot->name = "Change Data/Files";
|
||||||
ot->idname = "SEQUENCER_OT_change_path";
|
ot->idname = "SEQUENCER_OT_change_path";
|
||||||
ot->description = "";
|
|
||||||
|
|
||||||
/* api callbacks */
|
/* api callbacks */
|
||||||
ot->exec = sequencer_change_path_exec;
|
ot->exec = sequencer_change_path_exec;
|
||||||
|
@@ -2307,7 +2307,6 @@ void TEXT_OT_scroll(wmOperatorType *ot)
|
|||||||
* scroll_bar. Both do basically the same thing (aside
|
* scroll_bar. Both do basically the same thing (aside
|
||||||
* from keymaps).*/
|
* from keymaps).*/
|
||||||
ot->idname = "TEXT_OT_scroll";
|
ot->idname = "TEXT_OT_scroll";
|
||||||
ot->description = "";
|
|
||||||
|
|
||||||
/* api callbacks */
|
/* api callbacks */
|
||||||
ot->exec = text_scroll_exec;
|
ot->exec = text_scroll_exec;
|
||||||
@@ -2399,7 +2398,6 @@ void TEXT_OT_scroll_bar(wmOperatorType *ot)
|
|||||||
* scroll. Both do basically the same thing (aside
|
* scroll. Both do basically the same thing (aside
|
||||||
* from keymaps).*/
|
* from keymaps).*/
|
||||||
ot->idname = "TEXT_OT_scroll_bar";
|
ot->idname = "TEXT_OT_scroll_bar";
|
||||||
ot->description = "";
|
|
||||||
|
|
||||||
/* api callbacks */
|
/* api callbacks */
|
||||||
ot->invoke = text_scroll_bar_invoke;
|
ot->invoke = text_scroll_bar_invoke;
|
||||||
|
@@ -1251,7 +1251,6 @@ static int view3d_object_mode_menu(bContext *C, wmOperator *op)
|
|||||||
void VIEW3D_OT_object_mode_pie_or_toggle(wmOperatorType *ot)
|
void VIEW3D_OT_object_mode_pie_or_toggle(wmOperatorType *ot)
|
||||||
{
|
{
|
||||||
ot->name = "Object Mode Menu";
|
ot->name = "Object Mode Menu";
|
||||||
ot->description = "";
|
|
||||||
ot->idname = "VIEW3D_OT_object_mode_pie_or_toggle";
|
ot->idname = "VIEW3D_OT_object_mode_pie_or_toggle";
|
||||||
|
|
||||||
ot->exec = view3d_object_mode_menu;
|
ot->exec = view3d_object_mode_menu;
|
||||||
|
@@ -1079,7 +1079,6 @@ void VIEW3D_OT_ruler_add(wmOperatorType *ot)
|
|||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Ruler Add";
|
ot->name = "Ruler Add";
|
||||||
ot->idname = "VIEW3D_OT_ruler_add";
|
ot->idname = "VIEW3D_OT_ruler_add";
|
||||||
ot->description = "";
|
|
||||||
|
|
||||||
ot->invoke = view3d_ruler_add_invoke;
|
ot->invoke = view3d_ruler_add_invoke;
|
||||||
ot->poll = view3d_ruler_poll;
|
ot->poll = view3d_ruler_poll;
|
||||||
|
@@ -417,7 +417,6 @@ void VIEW3D_OT_smoothview(wmOperatorType *ot)
|
|||||||
{
|
{
|
||||||
/* identifiers */
|
/* identifiers */
|
||||||
ot->name = "Smooth View";
|
ot->name = "Smooth View";
|
||||||
ot->description = "";
|
|
||||||
ot->idname = "VIEW3D_OT_smoothview";
|
ot->idname = "VIEW3D_OT_smoothview";
|
||||||
|
|
||||||
/* api callbacks */
|
/* api callbacks */
|
||||||
|
@@ -829,8 +829,9 @@ static StructRNA *rna_Menu_register(
|
|||||||
memcpy(buf, _menu_descr, description_size);
|
memcpy(buf, _menu_descr, description_size);
|
||||||
mt->description = buf;
|
mt->description = buf;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
mt->description = "";
|
mt->description = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
mt->ext.srna = RNA_def_struct_ptr(&BLENDER_RNA, mt->idname, &RNA_Menu);
|
mt->ext.srna = RNA_def_struct_ptr(&BLENDER_RNA, mt->idname, &RNA_Menu);
|
||||||
RNA_def_struct_translation_context(mt->ext.srna, mt->translation_context);
|
RNA_def_struct_translation_context(mt->ext.srna, mt->translation_context);
|
||||||
|
@@ -1318,7 +1318,7 @@ static StructRNA *rna_Operator_register(
|
|||||||
|
|
||||||
dummyot.idname = strings_table[0]; /* allocated string stored here */
|
dummyot.idname = strings_table[0]; /* allocated string stored here */
|
||||||
dummyot.name = strings_table[1];
|
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.translation_context = strings_table[3];
|
||||||
dummyot.undo_group = strings_table[4];
|
dummyot.undo_group = strings_table[4];
|
||||||
BLI_assert(ARRAY_SIZE(strings) == 5);
|
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.idname = strings_table[0]; /* allocated string stored here */
|
||||||
dummyot.name = strings_table[1];
|
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.translation_context = strings_table[3];
|
||||||
dummyot.undo_group = strings_table[4];
|
dummyot.undo_group = strings_table[4];
|
||||||
BLI_assert(ARRAY_SIZE(strings) == 5);
|
BLI_assert(ARRAY_SIZE(strings) == 5);
|
||||||
|
@@ -61,6 +61,7 @@ MenuType *WM_menutype_find(const char *idname, bool quiet)
|
|||||||
|
|
||||||
bool WM_menutype_add(MenuType *mt)
|
bool WM_menutype_add(MenuType *mt)
|
||||||
{
|
{
|
||||||
|
BLI_assert((mt->description == NULL) || (mt->description[0]));
|
||||||
BLI_ghash_insert(menutypes_hash, mt->idname, mt);
|
BLI_ghash_insert(menutypes_hash, mt->idname, mt);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -120,6 +120,7 @@ static void wm_operatortype_append__end(wmOperatorType *ot)
|
|||||||
if (ot->name == NULL) {
|
if (ot->name == NULL) {
|
||||||
CLOG_ERROR(WM_LOG_OPERATORS, "Operator '%s' has no name property", ot->idname);
|
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. */
|
/* Allow calling _begin without _end in operatortype creation. */
|
||||||
WM_operatortype_props_advanced_end(ot);
|
WM_operatortype_props_advanced_end(ot);
|
||||||
|
Reference in New Issue
Block a user