Merge branch 'blender-v4.0-release'

This commit is contained in:
Philipp Oeser
2023-10-20 14:23:42 +02:00

View File

@@ -1894,6 +1894,14 @@ static void stampdata_from_template(StampData *stamp_data,
else {
stamp_data->frame[0] = '\0';
}
if (scene->r.stamp & R_STAMP_FRAME_RANGE) {
SNPRINTF(stamp_data->frame_range,
do_prefix ? "Frame Range %s" : "%s",
stamp_data_template->frame_range);
}
else {
stamp_data->frame_range[0] = '\0';
}
if (scene->r.stamp & R_STAMP_CAMERA) {
SNPRINTF(stamp_data->camera, do_prefix ? "Camera %s" : "%s", stamp_data_template->camera);
}
@@ -2224,6 +2232,28 @@ void BKE_image_stamp_buf(Scene *scene,
x += w + pad;
}
if (TEXT_SIZE_CHECK(stamp_data.frame_range, w, h)) {
/* extra space for background. */
buf_rectfill_area(rect,
rectf,
width,
height,
scene->r.bg_stamp,
display,
x - BUFF_MARGIN_X,
y - BUFF_MARGIN_Y,
x + w + BUFF_MARGIN_X,
y + h + BUFF_MARGIN_Y);
/* and pad the text. */
BLF_position(mono, x, y + y_ofs, 0.0);
BLF_draw_buffer(mono, stamp_data.frame_range, sizeof(stamp_data.frame_range));
/* space width. */
x += w + pad;
}
if (TEXT_SIZE_CHECK(stamp_data.camera, w, h)) {
/* extra space for background. */