diff --git a/source/blender/editors/animation/anim_channels_edit.cc b/source/blender/editors/animation/anim_channels_edit.cc index 54370669bab..355b698f5cc 100644 --- a/source/blender/editors/animation/anim_channels_edit.cc +++ b/source/blender/editors/animation/anim_channels_edit.cc @@ -63,7 +63,7 @@ static bool get_normalized_fcurve_bounds(FCurve *fcu, bAnimContext *ac, - const bAnimListElem *ale, + bAnimListElem *ale, const bool include_handles, const float range[2], rctf *r_bounds) @@ -91,6 +91,10 @@ static bool get_normalized_fcurve_bounds(FCurve *fcu, r_bounds->ymin -= (min_height - height) / 2; r_bounds->ymax += (min_height - height) / 2; } + AnimData *adt = ANIM_nla_mapping_get(ac, ale); + r_bounds->xmin = BKE_nla_tweakedit_remap(adt, r_bounds->xmin, NLATIME_CONVERT_MAP); + r_bounds->xmax = BKE_nla_tweakedit_remap(adt, r_bounds->xmax, NLATIME_CONVERT_MAP); + return true; } @@ -154,6 +158,7 @@ static void add_region_padding(bContext *C, ARegion *region, rctf *bounds) UI_MARKER_MARGIN_Y; BLI_rctf_pad_y(bounds, region->winy, pad_bottom, pad_top); } + /** \} */ /* -------------------------------------------------------------------- */ diff --git a/source/blender/editors/interface/interface_button_sections.cc b/source/blender/editors/interface/interface_button_sections.cc index 82689609bf3..a5787d85973 100644 --- a/source/blender/editors/interface/interface_button_sections.cc +++ b/source/blender/editors/interface/interface_button_sections.cc @@ -60,8 +60,13 @@ static Vector button_section_bounds_calc(const ARegion *region, const bool rcti cur_section_bounds; BLI_rcti_init_minmax(&cur_section_bounds); + /* A bit annoying, but this function is called for both drawing and event handling. When + * drawing, we need to exclude inactive blocks since they mess with the result. However, this + * active state is only useful during drawing and must be ignored for handling (at which point + * #uiBlock::active is false for all blocks). */ + const bool is_drawing = region->do_draw & RGN_DRAWING; LISTBASE_FOREACH (uiBlock *, block, ®ion->uiblocks) { - if (!block->active) { + if (is_drawing && !block->active) { continue; } diff --git a/source/blender/io/usd/intern/usd_capi_import.cc b/source/blender/io/usd/intern/usd_capi_import.cc index 0fb0abb1745..a83650f908e 100644 --- a/source/blender/io/usd/intern/usd_capi_import.cc +++ b/source/blender/io/usd/intern/usd_capi_import.cc @@ -607,17 +607,16 @@ CacheReader *CacheReader_open_usd_object(CacheArchiveHandle *handle, return reader; } + if (reader) { + USD_CacheReader_free(reader); + } + pxr::UsdPrim prim = archive->stage()->GetPrimAtPath(pxr::SdfPath(object_path)); if (!prim) { - WM_reportf(RPT_WARNING, "USD Import: unable to open cache reader for object %s", object_path); return nullptr; } - if (reader) { - USD_CacheReader_free(reader); - } - /* TODO(makowalski): The handle does not have the proper import params or settings. */ USDPrimReader *usd_reader = archive->create_reader(prim);