Blender V5.0
openimageio_api.cpp
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2013 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include "openimageio_api.h"
10
11#include <OpenImageIO/imageio.h>
12
13#include "BLI_threads.h"
14
15OIIO_NAMESPACE_USING
16
18{
19 /* Make OIIO thread pool follow Blender number of threads override. */
20 const int threads_override = BLI_system_num_threads_override_get();
21 if (threads_override) {
22 OIIO::attribute("threads", threads_override);
23 }
24
25 /* As of OpenEXR 3.2.1 there are still issues related to the use of OpenEXR Core. */
26 OIIO::attribute("openexr:core", 0);
27
28 /* Allow OpenImageIO to open files up to the size specified. An 80gb limit
29 * will allow a 4-gigapixel, 5-channel, image to be opened (e.g. like what
30 * would be encountered with the Cycles "tile" buffer file). */
31 OIIO::attribute("limits:imagesize_MB", 80 * 1024);
32}
33
35{
36 return openimageio_version();
37}
int BLI_system_num_threads_override_get(void)
Definition threads.cc:294
OIIO_NAMESPACE_USING void OIIO_init()
int OIIO_getVersionHex()