Code cleanup: refactor Cycles image metadata retrieval to use a struct.
This commit is contained in:
parent
450be3b226
commit
2eb94be750
|
@ -337,8 +337,9 @@ static void create_mesh_volume_attribute(BL::Object& b_ob,
|
|||
|
||||
Attribute *attr = mesh->attributes.add(std);
|
||||
VoxelAttribute *volume_data = attr->data_voxel();
|
||||
bool is_float, is_linear;
|
||||
ImageMetaData metadata;
|
||||
bool animated = false;
|
||||
bool use_alpha = true;
|
||||
|
||||
volume_data->manager = image_manager;
|
||||
volume_data->slot = image_manager->add_image(
|
||||
|
@ -346,11 +347,10 @@ static void create_mesh_volume_attribute(BL::Object& b_ob,
|
|||
b_ob.ptr.data,
|
||||
animated,
|
||||
frame,
|
||||
is_float,
|
||||
is_linear,
|
||||
INTERPOLATION_LINEAR,
|
||||
EXTENSION_CLIP,
|
||||
true);
|
||||
use_alpha,
|
||||
metadata);
|
||||
}
|
||||
|
||||
static void create_mesh_volume_attributes(Scene *scene,
|
||||
|
|
|
@ -135,7 +135,7 @@ void BlenderSession::create_session()
|
|||
scene = new Scene(scene_params, session->device);
|
||||
|
||||
/* setup callbacks for builtin image support */
|
||||
scene->image_manager->builtin_image_info_cb = function_bind(&BlenderSession::builtin_image_info, this, _1, _2, _3, _4, _5, _6, _7, _8);
|
||||
scene->image_manager->builtin_image_info_cb = function_bind(&BlenderSession::builtin_image_info, this, _1, _2, _3);
|
||||
scene->image_manager->builtin_image_pixels_cb = function_bind(&BlenderSession::builtin_image_pixels, this, _1, _2, _3, _4, _5);
|
||||
scene->image_manager->builtin_image_float_pixels_cb = function_bind(&BlenderSession::builtin_image_float_pixels, this, _1, _2, _3, _4, _5);
|
||||
|
||||
|
@ -1018,20 +1018,11 @@ int BlenderSession::builtin_image_frame(const string &builtin_name)
|
|||
|
||||
void BlenderSession::builtin_image_info(const string &builtin_name,
|
||||
void *builtin_data,
|
||||
bool &is_float,
|
||||
int &width,
|
||||
int &height,
|
||||
int &depth,
|
||||
int &channels,
|
||||
bool& free_cache)
|
||||
ImageMetaData& metadata)
|
||||
{
|
||||
/* empty image */
|
||||
is_float = false;
|
||||
width = 1;
|
||||
height = 1;
|
||||
depth = 0;
|
||||
channels = 0;
|
||||
free_cache = false;
|
||||
metadata.width = 1;
|
||||
metadata.height = 1;
|
||||
|
||||
if(!builtin_data)
|
||||
return;
|
||||
|
@ -1045,21 +1036,21 @@ void BlenderSession::builtin_image_info(const string &builtin_name,
|
|||
/* image data */
|
||||
BL::Image b_image(b_id);
|
||||
|
||||
free_cache = !b_image.has_data();
|
||||
is_float = b_image.is_float();
|
||||
width = b_image.size()[0];
|
||||
height = b_image.size()[1];
|
||||
depth = 1;
|
||||
channels = b_image.channels();
|
||||
metadata.builtin_free_cache = !b_image.has_data();
|
||||
metadata.is_float = b_image.is_float();
|
||||
metadata.width = b_image.size()[0];
|
||||
metadata.height = b_image.size()[1];
|
||||
metadata.depth = 1;
|
||||
metadata.channels = b_image.channels();
|
||||
}
|
||||
else if(b_id.is_a(&RNA_Object)) {
|
||||
/* smoke volume data */
|
||||
BL::Object b_ob(b_id);
|
||||
BL::SmokeDomainSettings b_domain = object_smoke_domain_find(b_ob);
|
||||
|
||||
is_float = true;
|
||||
depth = 1;
|
||||
channels = 1;
|
||||
metadata.is_float = true;
|
||||
metadata.depth = 1;
|
||||
metadata.channels = 1;
|
||||
|
||||
if(!b_domain)
|
||||
return;
|
||||
|
@ -1068,11 +1059,11 @@ void BlenderSession::builtin_image_info(const string &builtin_name,
|
|||
builtin_name == Attribute::standard_name(ATTR_STD_VOLUME_FLAME) ||
|
||||
builtin_name == Attribute::standard_name(ATTR_STD_VOLUME_HEAT) ||
|
||||
builtin_name == Attribute::standard_name(ATTR_STD_VOLUME_TEMPERATURE))
|
||||
channels = 1;
|
||||
metadata.channels = 1;
|
||||
else if(builtin_name == Attribute::standard_name(ATTR_STD_VOLUME_COLOR))
|
||||
channels = 4;
|
||||
metadata.channels = 4;
|
||||
else if(builtin_name == Attribute::standard_name(ATTR_STD_VOLUME_VELOCITY))
|
||||
channels = 3;
|
||||
metadata.channels = 3;
|
||||
else
|
||||
return;
|
||||
|
||||
|
@ -1086,9 +1077,9 @@ void BlenderSession::builtin_image_info(const string &builtin_name,
|
|||
amplify = 1;
|
||||
}
|
||||
|
||||
width = resolution.x * amplify;
|
||||
height = resolution.y * amplify;
|
||||
depth = resolution.z * amplify;
|
||||
metadata.width = resolution.x * amplify;
|
||||
metadata.height = resolution.y * amplify;
|
||||
metadata.depth = resolution.z * amplify;
|
||||
}
|
||||
else {
|
||||
/* TODO(sergey): Check we're indeed in shader node tree. */
|
||||
|
@ -1097,9 +1088,11 @@ void BlenderSession::builtin_image_info(const string &builtin_name,
|
|||
BL::Node b_node(ptr);
|
||||
if(b_node.is_a(&RNA_ShaderNodeTexPointDensity)) {
|
||||
BL::ShaderNodeTexPointDensity b_point_density_node(b_node);
|
||||
channels = 4;
|
||||
width = height = depth = b_point_density_node.resolution();
|
||||
is_float = true;
|
||||
metadata.channels = 4;
|
||||
metadata.width = b_point_density_node.resolution();
|
||||
metadata.height = metadata.width;
|
||||
metadata.depth = metadata.width;
|
||||
metadata.is_float = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
class ImageMetaData;
|
||||
class Scene;
|
||||
class Session;
|
||||
class RenderBuffers;
|
||||
|
@ -152,12 +153,7 @@ protected:
|
|||
int builtin_image_frame(const string &builtin_name);
|
||||
void builtin_image_info(const string &builtin_name,
|
||||
void *builtin_data,
|
||||
bool &is_float,
|
||||
int &width,
|
||||
int &height,
|
||||
int &depth,
|
||||
int &channels,
|
||||
bool &free_cache);
|
||||
ImageMetaData& metadata);
|
||||
bool builtin_image_pixels(const string &builtin_name,
|
||||
void *builtin_data,
|
||||
unsigned char *pixels,
|
||||
|
|
|
@ -84,99 +84,109 @@ bool ImageManager::set_animation_frame_update(int frame)
|
|||
return false;
|
||||
}
|
||||
|
||||
ImageDataType ImageManager::get_image_metadata(const string& filename,
|
||||
void *builtin_data,
|
||||
bool& is_linear,
|
||||
bool& builtin_free_cache)
|
||||
bool ImageManager::get_image_metadata(const string& filename,
|
||||
void *builtin_data,
|
||||
ImageMetaData& metadata)
|
||||
{
|
||||
bool is_float = false, is_half = false;
|
||||
is_linear = false;
|
||||
builtin_free_cache = false;
|
||||
int channels = 4;
|
||||
memset(&metadata, 0, sizeof(metadata));
|
||||
|
||||
if(builtin_data) {
|
||||
if(builtin_image_info_cb) {
|
||||
int width, height, depth;
|
||||
builtin_image_info_cb(filename, builtin_data, is_float, width, height, depth, channels, builtin_free_cache);
|
||||
}
|
||||
|
||||
if(is_float) {
|
||||
is_linear = true;
|
||||
return (channels > 1) ? IMAGE_DATA_TYPE_FLOAT4 : IMAGE_DATA_TYPE_FLOAT;
|
||||
builtin_image_info_cb(filename, builtin_data, metadata);
|
||||
}
|
||||
else {
|
||||
return (channels > 1) ? IMAGE_DATA_TYPE_BYTE4 : IMAGE_DATA_TYPE_BYTE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(metadata.is_float) {
|
||||
metadata.is_linear = true;
|
||||
metadata.type = (metadata.channels > 1) ? IMAGE_DATA_TYPE_FLOAT4 : IMAGE_DATA_TYPE_FLOAT;
|
||||
}
|
||||
else {
|
||||
metadata.type = (metadata.channels > 1) ? IMAGE_DATA_TYPE_BYTE4 : IMAGE_DATA_TYPE_BYTE;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Perform preliminary checks, with meaningful logging. */
|
||||
if(!path_exists(filename)) {
|
||||
VLOG(1) << "File '" << filename << "' does not exist.";
|
||||
return IMAGE_DATA_TYPE_BYTE4;
|
||||
return false;
|
||||
}
|
||||
if(path_is_directory(filename)) {
|
||||
VLOG(1) << "File '" << filename << "' is a directory, can't use as image.";
|
||||
return IMAGE_DATA_TYPE_BYTE4;
|
||||
return false;
|
||||
}
|
||||
|
||||
ImageInput *in = ImageInput::create(filename);
|
||||
|
||||
if(in) {
|
||||
ImageSpec spec;
|
||||
|
||||
if(in->open(filename, spec)) {
|
||||
/* check the main format, and channel formats;
|
||||
* if any take up more than one byte, we'll need a float texture slot */
|
||||
if(spec.format.basesize() > 1) {
|
||||
is_float = true;
|
||||
is_linear = true;
|
||||
}
|
||||
|
||||
for(size_t channel = 0; channel < spec.channelformats.size(); channel++) {
|
||||
if(spec.channelformats[channel].basesize() > 1) {
|
||||
is_float = true;
|
||||
is_linear = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* check if it's half float */
|
||||
if(spec.format == TypeDesc::HALF)
|
||||
is_half = true;
|
||||
|
||||
channels = spec.nchannels;
|
||||
|
||||
/* basic color space detection, not great but better than nothing
|
||||
* before we do OpenColorIO integration */
|
||||
if(is_float) {
|
||||
string colorspace = spec.get_string_attribute("oiio:ColorSpace");
|
||||
|
||||
is_linear = !(colorspace == "sRGB" ||
|
||||
colorspace == "GammaCorrected" ||
|
||||
(colorspace == "" &&
|
||||
(strcmp(in->format_name(), "png") == 0 ||
|
||||
strcmp(in->format_name(), "tiff") == 0 ||
|
||||
strcmp(in->format_name(), "dpx") == 0 ||
|
||||
strcmp(in->format_name(), "jpeg2000") == 0)));
|
||||
}
|
||||
else {
|
||||
is_linear = false;
|
||||
}
|
||||
|
||||
in->close();
|
||||
}
|
||||
if(!in) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ImageSpec spec;
|
||||
if(!in->open(filename, spec)) {
|
||||
delete in;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(is_half) {
|
||||
return (channels > 1) ? IMAGE_DATA_TYPE_HALF4 : IMAGE_DATA_TYPE_HALF;
|
||||
metadata.width = spec.width;
|
||||
metadata.height = spec.height;
|
||||
metadata.depth = spec.depth;
|
||||
|
||||
/* check the main format, and channel formats;
|
||||
* if any take up more than one byte, we'll need a float texture slot */
|
||||
if(spec.format.basesize() > 1) {
|
||||
metadata.is_float = true;
|
||||
metadata.is_linear = true;
|
||||
}
|
||||
else if(is_float) {
|
||||
return (channels > 1) ? IMAGE_DATA_TYPE_FLOAT4 : IMAGE_DATA_TYPE_FLOAT;
|
||||
|
||||
for(size_t channel = 0; channel < spec.channelformats.size(); channel++) {
|
||||
if(spec.channelformats[channel].basesize() > 1) {
|
||||
metadata.is_float = true;
|
||||
metadata.is_linear = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* check if it's half float */
|
||||
if(spec.format == TypeDesc::HALF)
|
||||
metadata.is_half = true;
|
||||
|
||||
/* basic color space detection, not great but better than nothing
|
||||
* before we do OpenColorIO integration */
|
||||
if(metadata.is_float) {
|
||||
string colorspace = spec.get_string_attribute("oiio:ColorSpace");
|
||||
|
||||
metadata.is_linear = !(colorspace == "sRGB" ||
|
||||
colorspace == "GammaCorrected" ||
|
||||
(colorspace == "" &&
|
||||
(strcmp(in->format_name(), "png") == 0 ||
|
||||
strcmp(in->format_name(), "tiff") == 0 ||
|
||||
strcmp(in->format_name(), "dpx") == 0 ||
|
||||
strcmp(in->format_name(), "jpeg2000") == 0)));
|
||||
}
|
||||
else {
|
||||
return (channels > 1) ? IMAGE_DATA_TYPE_BYTE4 : IMAGE_DATA_TYPE_BYTE;
|
||||
metadata.is_linear = false;
|
||||
}
|
||||
|
||||
/* set type and channels */
|
||||
metadata.channels = spec.nchannels;
|
||||
|
||||
if(metadata.is_half) {
|
||||
metadata.type = (metadata.channels > 1) ? IMAGE_DATA_TYPE_HALF4 : IMAGE_DATA_TYPE_HALF;
|
||||
}
|
||||
else if(metadata.is_float) {
|
||||
metadata.type = (metadata.channels > 1) ? IMAGE_DATA_TYPE_FLOAT4 : IMAGE_DATA_TYPE_FLOAT;
|
||||
}
|
||||
else {
|
||||
metadata.type = (metadata.channels > 1) ? IMAGE_DATA_TYPE_BYTE4 : IMAGE_DATA_TYPE_BYTE;
|
||||
}
|
||||
|
||||
in->close();
|
||||
delete in;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int ImageManager::max_flattened_slot(ImageDataType type)
|
||||
|
@ -237,23 +247,19 @@ int ImageManager::add_image(const string& filename,
|
|||
void *builtin_data,
|
||||
bool animated,
|
||||
float frame,
|
||||
bool& is_float,
|
||||
bool& is_linear,
|
||||
InterpolationType interpolation,
|
||||
ExtensionType extension,
|
||||
bool use_alpha)
|
||||
bool use_alpha,
|
||||
ImageMetaData& metadata)
|
||||
{
|
||||
Image *img;
|
||||
size_t slot;
|
||||
bool builtin_free_cache;
|
||||
|
||||
ImageDataType type = get_image_metadata(filename, builtin_data, is_linear, builtin_free_cache);
|
||||
get_image_metadata(filename, builtin_data, metadata);
|
||||
ImageDataType type = metadata.type;
|
||||
|
||||
thread_scoped_lock device_lock(device_mutex);
|
||||
|
||||
/* Check whether it's a float texture. */
|
||||
is_float = (type == IMAGE_DATA_TYPE_FLOAT || type == IMAGE_DATA_TYPE_FLOAT4);
|
||||
|
||||
/* No half textures on OpenCL, use full float instead. */
|
||||
if(!has_half_images) {
|
||||
if(type == IMAGE_DATA_TYPE_HALF4) {
|
||||
|
@ -313,7 +319,7 @@ int ImageManager::add_image(const string& filename,
|
|||
img = new Image();
|
||||
img->filename = filename;
|
||||
img->builtin_data = builtin_data;
|
||||
img->builtin_free_cache = builtin_free_cache;
|
||||
img->builtin_free_cache = metadata.builtin_free_cache;
|
||||
img->need_load = true;
|
||||
img->animated = animated;
|
||||
img->frame = frame;
|
||||
|
@ -444,8 +450,13 @@ bool ImageManager::file_load_image_generic(Image *img,
|
|||
if(!builtin_image_info_cb || !builtin_image_pixels_cb)
|
||||
return false;
|
||||
|
||||
bool is_float, free_cache;
|
||||
builtin_image_info_cb(img->filename, img->builtin_data, is_float, width, height, depth, components, free_cache);
|
||||
ImageMetaData metadata;
|
||||
builtin_image_info_cb(img->filename, img->builtin_data, metadata);
|
||||
|
||||
width = metadata.width;
|
||||
height = metadata.height;
|
||||
depth = metadata.depth;
|
||||
components = metadata.channels;
|
||||
}
|
||||
|
||||
/* we only handle certain number of components */
|
||||
|
|
|
@ -31,6 +31,19 @@ class Device;
|
|||
class Progress;
|
||||
class Scene;
|
||||
|
||||
class ImageMetaData {
|
||||
public:
|
||||
/* Must be set by image file or builtin callback. */
|
||||
bool is_float, is_half;
|
||||
int channels;
|
||||
size_t width, height, depth;
|
||||
bool builtin_free_cache;
|
||||
|
||||
/* Automatically set. */
|
||||
ImageDataType type;
|
||||
bool is_linear;
|
||||
};
|
||||
|
||||
class ImageManager {
|
||||
public:
|
||||
explicit ImageManager(const DeviceInfo& info);
|
||||
|
@ -40,11 +53,10 @@ public:
|
|||
void *builtin_data,
|
||||
bool animated,
|
||||
float frame,
|
||||
bool& is_float,
|
||||
bool& is_linear,
|
||||
InterpolationType interpolation,
|
||||
ExtensionType extension,
|
||||
bool use_alpha);
|
||||
bool use_alpha,
|
||||
ImageMetaData& metadata);
|
||||
void remove_image(int flat_slot);
|
||||
void remove_image(const string& filename,
|
||||
void *builtin_data,
|
||||
|
@ -56,10 +68,9 @@ public:
|
|||
InterpolationType interpolation,
|
||||
ExtensionType extension,
|
||||
bool use_alpha);
|
||||
ImageDataType get_image_metadata(const string& filename,
|
||||
void *builtin_data,
|
||||
bool& is_linear,
|
||||
bool& builtin_free_cache);
|
||||
bool get_image_metadata(const string& filename,
|
||||
void *builtin_data,
|
||||
ImageMetaData& metadata);
|
||||
|
||||
void device_update(Device *device,
|
||||
Scene *scene,
|
||||
|
@ -82,12 +93,7 @@ public:
|
|||
*/
|
||||
function<void(const string &filename,
|
||||
void *data,
|
||||
bool &is_float,
|
||||
int &width,
|
||||
int &height,
|
||||
int &depth,
|
||||
int &channels,
|
||||
bool &free_cache)> builtin_image_info_cb;
|
||||
ImageMetaData& metadata)> builtin_image_info_cb;
|
||||
function<bool(const string &filename,
|
||||
void *data,
|
||||
unsigned char *pixels,
|
||||
|
|
|
@ -302,17 +302,17 @@ void ImageTextureNode::compile(SVMCompiler& compiler)
|
|||
|
||||
image_manager = compiler.image_manager;
|
||||
if(is_float == -1) {
|
||||
bool is_float_bool;
|
||||
ImageMetaData metadata;
|
||||
slot = image_manager->add_image(filename.string(),
|
||||
builtin_data,
|
||||
animated,
|
||||
0,
|
||||
is_float_bool,
|
||||
is_linear,
|
||||
interpolation,
|
||||
extension,
|
||||
use_alpha);
|
||||
is_float = (int)is_float_bool;
|
||||
use_alpha,
|
||||
metadata);
|
||||
is_float = metadata.is_float;
|
||||
is_linear = metadata.is_linear;
|
||||
}
|
||||
|
||||
if(slot != -1) {
|
||||
|
@ -363,26 +363,22 @@ void ImageTextureNode::compile(OSLCompiler& compiler)
|
|||
|
||||
image_manager = compiler.image_manager;
|
||||
if(is_float == -1) {
|
||||
ImageMetaData metadata;
|
||||
if(builtin_data == NULL) {
|
||||
ImageDataType type;
|
||||
bool builtin_free_cache;
|
||||
type = image_manager->get_image_metadata(filename.string(), NULL, is_linear, builtin_free_cache);
|
||||
if(type == IMAGE_DATA_TYPE_FLOAT || type == IMAGE_DATA_TYPE_FLOAT4)
|
||||
is_float = 1;
|
||||
image_manager->get_image_metadata(filename.string(), NULL, metadata);
|
||||
}
|
||||
else {
|
||||
bool is_float_bool;
|
||||
slot = image_manager->add_image(filename.string(),
|
||||
builtin_data,
|
||||
animated,
|
||||
0,
|
||||
is_float_bool,
|
||||
is_linear,
|
||||
interpolation,
|
||||
extension,
|
||||
use_alpha);
|
||||
is_float = (int)is_float_bool;
|
||||
use_alpha,
|
||||
metadata);
|
||||
}
|
||||
is_float = metadata.is_float;
|
||||
is_linear = metadata.is_linear;
|
||||
}
|
||||
|
||||
if(slot == -1) {
|
||||
|
@ -501,17 +497,17 @@ void EnvironmentTextureNode::compile(SVMCompiler& compiler)
|
|||
|
||||
image_manager = compiler.image_manager;
|
||||
if(slot == -1) {
|
||||
bool is_float_bool;
|
||||
ImageMetaData metadata;
|
||||
slot = image_manager->add_image(filename.string(),
|
||||
builtin_data,
|
||||
animated,
|
||||
0,
|
||||
is_float_bool,
|
||||
is_linear,
|
||||
interpolation,
|
||||
EXTENSION_REPEAT,
|
||||
use_alpha);
|
||||
is_float = (int)is_float_bool;
|
||||
use_alpha,
|
||||
metadata);
|
||||
is_float = metadata.is_float;
|
||||
is_linear = metadata.is_linear;
|
||||
}
|
||||
|
||||
if(slot != -1) {
|
||||
|
@ -553,26 +549,22 @@ void EnvironmentTextureNode::compile(OSLCompiler& compiler)
|
|||
*/
|
||||
image_manager = compiler.image_manager;
|
||||
if(is_float == -1) {
|
||||
ImageMetaData metadata;
|
||||
if(builtin_data == NULL) {
|
||||
ImageDataType type;
|
||||
bool builtin_free_cache;
|
||||
type = image_manager->get_image_metadata(filename.string(), NULL, is_linear, builtin_free_cache);
|
||||
if(type == IMAGE_DATA_TYPE_FLOAT || type == IMAGE_DATA_TYPE_FLOAT4)
|
||||
is_float = 1;
|
||||
image_manager->get_image_metadata(filename.string(), NULL, metadata);
|
||||
}
|
||||
else {
|
||||
bool is_float_bool;
|
||||
slot = image_manager->add_image(filename.string(),
|
||||
builtin_data,
|
||||
animated,
|
||||
0,
|
||||
is_float_bool,
|
||||
is_linear,
|
||||
interpolation,
|
||||
EXTENSION_REPEAT,
|
||||
use_alpha);
|
||||
is_float = (int)is_float_bool;
|
||||
use_alpha,
|
||||
metadata);
|
||||
}
|
||||
is_float = metadata.is_float;
|
||||
is_linear = metadata.is_linear;
|
||||
}
|
||||
|
||||
if(slot == -1) {
|
||||
|
@ -1421,13 +1413,13 @@ void PointDensityTextureNode::compile(SVMCompiler& compiler)
|
|||
|
||||
if(use_density || use_color) {
|
||||
if(slot == -1) {
|
||||
bool is_float, is_linear;
|
||||
ImageMetaData metadata;
|
||||
slot = image_manager->add_image(filename.string(), builtin_data,
|
||||
false, 0,
|
||||
is_float, is_linear,
|
||||
interpolation,
|
||||
EXTENSION_CLIP,
|
||||
true);
|
||||
true,
|
||||
metadata);
|
||||
}
|
||||
|
||||
if(slot != -1) {
|
||||
|
@ -1473,13 +1465,13 @@ void PointDensityTextureNode::compile(OSLCompiler& compiler)
|
|||
|
||||
if(use_density || use_color) {
|
||||
if(slot == -1) {
|
||||
bool is_float, is_linear;
|
||||
ImageMetaData metadata;
|
||||
slot = image_manager->add_image(filename.string(), builtin_data,
|
||||
false, 0,
|
||||
is_float, is_linear,
|
||||
interpolation,
|
||||
EXTENSION_CLIP,
|
||||
true);
|
||||
true,
|
||||
metadata);
|
||||
}
|
||||
|
||||
if(slot != -1) {
|
||||
|
|
Loading…
Reference in New Issue