Merge branch 'blender-v4.0-release'

This commit is contained in:
Julian Eisel
2023-10-31 15:00:21 +01:00
3 changed files with 16 additions and 7 deletions

View File

@@ -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);
}
/** \} */
/* -------------------------------------------------------------------- */

View File

@@ -60,8 +60,13 @@ static Vector<rcti> 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, &region->uiblocks) {
if (!block->active) {
if (is_drawing && !block->active) {
continue;
}

View File

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