WIP: Vulkan: Workbench #107886
|
@ -1317,7 +1317,7 @@ void BKE_layer_collection_sync(const Scene *scene, ViewLayer *view_layer)
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
{
|
{
|
||||||
BLI_assert_msg(BLI_listbase_count_at_most(&view_layer->layer_collections, 2) == 1,
|
BLI_assert_msg(BLI_listbase_is_single(&view_layer->layer_collections),
|
||||||
"ViewLayer's first level of children layer collections should always have "
|
"ViewLayer's first level of children layer collections should always have "
|
||||||
"exactly one item");
|
"exactly one item");
|
||||||
|
|
||||||
|
|
|
@ -1257,7 +1257,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain)
|
||||||
|
|
||||||
space_outliner->outlinevis = SO_VIEW_LAYER;
|
space_outliner->outlinevis = SO_VIEW_LAYER;
|
||||||
|
|
||||||
if (BLI_listbase_count_at_most(&layer->layer_collections, 2) == 1) {
|
if (BLI_listbase_is_single(&layer->layer_collections)) {
|
||||||
if (space_outliner->treestore == nullptr) {
|
if (space_outliner->treestore == nullptr) {
|
||||||
space_outliner->treestore = BLI_mempool_create(
|
space_outliner->treestore = BLI_mempool_create(
|
||||||
sizeof(TreeStoreElem), 1, 512, BLI_MEMPOOL_ALLOW_ITER);
|
sizeof(TreeStoreElem), 1, 512, BLI_MEMPOOL_ALLOW_ITER);
|
||||||
|
|
|
@ -864,7 +864,7 @@ static int pose_paste_exec(bContext *C, wmOperator *op)
|
||||||
return OPERATOR_CANCELLED;
|
return OPERATOR_CANCELLED;
|
||||||
}
|
}
|
||||||
/* Make sure data from this file is usable for pose paste. */
|
/* Make sure data from this file is usable for pose paste. */
|
||||||
if (BLI_listbase_count_at_most(&temp_bmain->objects, 2) != 1) {
|
if (!BLI_listbase_is_single(&temp_bmain->objects)) {
|
||||||
BKE_report(op->reports, RPT_ERROR, "Internal clipboard is not from pose mode");
|
BKE_report(op->reports, RPT_ERROR, "Internal clipboard is not from pose mode");
|
||||||
BKE_main_free(temp_bmain);
|
BKE_main_free(temp_bmain);
|
||||||
return OPERATOR_CANCELLED;
|
return OPERATOR_CANCELLED;
|
||||||
|
|
|
@ -832,7 +832,7 @@ const char *WM_drag_get_item_name(wmDrag *drag)
|
||||||
switch (drag->type) {
|
switch (drag->type) {
|
||||||
case WM_DRAG_ID: {
|
case WM_DRAG_ID: {
|
||||||
ID *id = WM_drag_get_local_ID(drag, 0);
|
ID *id = WM_drag_get_local_ID(drag, 0);
|
||||||
bool single = (BLI_listbase_count_at_most(&drag->ids, 2) == 1);
|
bool single = BLI_listbase_is_single(&drag->ids);
|
||||||
|
|
||||||
if (single) {
|
if (single) {
|
||||||
return id->name + 2;
|
return id->name + 2;
|
||||||
|
|
Loading…
Reference in New Issue