2023-08-16 00:20:26 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2013 Blender Authors
|
2023-06-14 23:30:43 +10:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
2013-10-08 21:17:24 +00:00
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup openimageio
|
2013-10-08 21:17:24 +00:00
|
|
|
*/
|
|
|
|
|
|
2019-04-23 11:01:30 +10:00
|
|
|
#include "openimageio_api.h"
|
2023-08-07 18:19:33 +02:00
|
|
|
|
2018-12-11 12:17:26 +01:00
|
|
|
#include <OpenImageIO/imageio.h>
|
2013-10-08 21:17:24 +00:00
|
|
|
|
2023-08-07 18:19:33 +02:00
|
|
|
#include "BLI_threads.h"
|
|
|
|
|
|
2016-02-20 11:40:25 +05:00
|
|
|
OIIO_NAMESPACE_USING
|
|
|
|
|
|
2023-08-07 18:19:33 +02:00
|
|
|
void OIIO_init()
|
|
|
|
|
{
|
|
|
|
|
/* Make OIIO thread pool follow Blender number of threads override. */
|
|
|
|
|
const int threads_override = BLI_system_num_threads_override_get();
|
|
|
|
|
if (threads_override) {
|
|
|
|
|
OIIO::attribute("threads", threads_override);
|
|
|
|
|
}
|
2023-12-28 00:48:25 +01:00
|
|
|
|
|
|
|
|
/* As of OpenEXR 3.2.1 there are still issues related to the use of OpenEXR Core. */
|
|
|
|
|
OIIO::attribute("openexr:core", 0);
|
2025-03-10 22:01:03 +01:00
|
|
|
|
|
|
|
|
/* Allow OpenImageIO to open files up to the size specified. An 80gb limit
|
|
|
|
|
* will allow a 4-gigapixel, 5-channel, image to be opened (e.g. like what
|
|
|
|
|
* would be encountered with the Cycles "tile" buffer file). */
|
|
|
|
|
OIIO::attribute("limits:imagesize_MB", 80 * 1024);
|
2023-08-07 18:19:33 +02:00
|
|
|
}
|
|
|
|
|
|
2023-07-02 19:37:22 +10:00
|
|
|
int OIIO_getVersionHex()
|
2013-12-08 15:03:17 +06:00
|
|
|
{
|
|
|
|
|
return openimageio_version();
|
|
|
|
|
}
|