Merge branch 'master' into blender2.8
This commit is contained in:
commit
e2df9ab386
|
@ -368,9 +368,12 @@ static void id_delete(bContext *C, ReportList *reports, TreeElement *te, TreeSto
|
|||
ID *id = tselem->id;
|
||||
|
||||
BLI_assert(te->idcode != 0 && id != NULL);
|
||||
BLI_assert(te->idcode != ID_LI || ((Library *)id)->parent == NULL);
|
||||
UNUSED_VARS_NDEBUG(te);
|
||||
|
||||
if (te->idcode == ID_LI && ((Library *)id)->parent != NULL) {
|
||||
BKE_reportf(reports, RPT_WARNING, "Cannot delete indirectly linked library '%s'", id->name);
|
||||
return;
|
||||
}
|
||||
if (id->tag & LIB_TAG_INDIRECT) {
|
||||
BKE_reportf(reports, RPT_WARNING, "Cannot delete indirectly linked id '%s'", id->name);
|
||||
return;
|
||||
|
|
|
@ -1301,6 +1301,7 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op)
|
|||
{
|
||||
if (idlevel > 0) {
|
||||
outliner_do_libdata_operation(C, op->reports, scene, soops, &soops->tree, id_delete_cb, NULL);
|
||||
ED_undo_push(C, "Delete");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1308,6 +1309,7 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op)
|
|||
{
|
||||
if (idlevel > 0) {
|
||||
outliner_do_libdata_operation(C, op->reports, scene, soops, &soops->tree, id_remap_cb, NULL);
|
||||
ED_undo_push(C, "Remap");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1416,18 +1418,20 @@ static int outliner_lib_operation_exec(bContext *C, wmOperator *op)
|
|||
outliner_do_libdata_operation(C, op->reports, scene, soops, &soops->tree, item_rename_cb, NULL);
|
||||
|
||||
WM_event_add_notifier(C, NC_ID | NA_EDITED, NULL);
|
||||
ED_undo_push(C, "Rename");
|
||||
ED_undo_push(C, "Rename Library");
|
||||
break;
|
||||
}
|
||||
case OL_LIB_DELETE:
|
||||
{
|
||||
outliner_do_libdata_operation(C, op->reports, scene, soops, &soops->tree, id_delete_cb, NULL);
|
||||
ED_undo_push(C, "Delete Library");
|
||||
break;
|
||||
}
|
||||
case OL_LIB_RELOCATE:
|
||||
{
|
||||
/* rename */
|
||||
outliner_do_libdata_operation(C, op->reports, scene, soops, &soops->tree, lib_relocate_cb, NULL);
|
||||
ED_undo_push(C, "Relocate Library");
|
||||
break;
|
||||
}
|
||||
case OL_LIB_RELOAD:
|
||||
|
|
Loading…
Reference in New Issue