Blender V5.3
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.hh"
14
15namespace blender {
16
17OIIO_NAMESPACE_USING
18
20{
21 /* Make OIIO thread pool follow Blender number of threads override. */
22 const int threads_override = BLI_system_num_threads_override_get();
23 if (threads_override) {
24 OIIO::attribute("threads", threads_override);
25 }
26
27 /* As of OpenEXR 3.2.1 there are still issues related to the use of OpenEXR Core. */
28 OIIO::attribute("openexr:core", 0);
29
30 /* Allow OpenImageIO to open files up to the size specified. An 80gb limit
31 * will allow a 4-gigapixel, 5-channel, image to be opened (e.g. like what
32 * would be encountered with the Cycles "tile" buffer file). */
33 OIIO::attribute("limits:imagesize_MB", 80 * 1024);
34}
35
37{
38 return openimageio_version();
39}
40
41} // namespace blender
BMesh Iterators.
OIIO_NAMESPACE_USING void OIIO_init()
int BLI_system_num_threads_override_get()
Definition threads.cc:299
int OIIO_getVersionHex()