Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@stuvel.eu>2017-08-15 13:43:17 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2017-08-15 13:43:17 +0300
commitf20d7bed1426ca3d1268182835f04e7ab8212cac (patch)
tree9f107399103fa7c49e272804322cf9e665655ce1 /source/blender/alembic/intern/abc_customdata.cc
parentac88a3942e49f73f6ccf050f7275b9fb34888743 (diff)
Alembic import: report object name in face color index out of bounds error
Diffstat (limited to 'source/blender/alembic/intern/abc_customdata.cc')
-rw-r--r--source/blender/alembic/intern/abc_customdata.cc23
1 files changed, 16 insertions, 7 deletions
diff --git a/source/blender/alembic/intern/abc_customdata.cc b/source/blender/alembic/intern/abc_customdata.cc
index 3380aaf222e..d6e7a80d174 100644
--- a/source/blender/alembic/intern/abc_customdata.cc
+++ b/source/blender/alembic/intern/abc_customdata.cc
@@ -255,6 +255,7 @@ static void read_uvs(const CDStreamConfig &config, void *data,
static size_t mcols_out_of_bounds_check(
const size_t color_index,
const size_t array_size,
+ const std::string & iobject_full_name,
const PropertyHeader &prop_header,
bool &r_bounds_warning_given)
{
@@ -263,8 +264,10 @@ static size_t mcols_out_of_bounds_check(
}
if (!r_bounds_warning_given) {
- std::cerr << "Alembic import: color index out of bounds "
- "reading face colors for property "
+ std::cerr << "Alembic: color index out of bounds "
+ "reading face colors for object "
+ << iobject_full_name
+ << ", property "
<< prop_header.getName() << std::endl;
r_bounds_warning_given = true;
}
@@ -272,7 +275,8 @@ static size_t mcols_out_of_bounds_check(
return 0;
}
-static void read_custom_data_mcols(const ICompoundProperty &arbGeomParams,
+static void read_custom_data_mcols(const std::string & iobject_full_name,
+ const ICompoundProperty &arbGeomParams,
const PropertyHeader &prop_header,
const CDStreamConfig &config,
const Alembic::Abc::ISampleSelector &iss)
@@ -338,7 +342,8 @@ static void read_custom_data_mcols(const ICompoundProperty &arbGeomParams,
color_index = mcols_out_of_bounds_check(
is_facevarying ? face_index : mloop->v,
c3f_ptr->size(),
- prop_header, bounds_warning_given);
+ iobject_full_name, prop_header,
+ bounds_warning_given);
const Imath::C3f &color = (*c3f_ptr)[color_index];
cface->a = FTOCHAR(color[0]);
@@ -350,7 +355,8 @@ static void read_custom_data_mcols(const ICompoundProperty &arbGeomParams,
color_index = mcols_out_of_bounds_check(
is_facevarying ? face_index : mloop->v,
c4f_ptr->size(),
- prop_header, bounds_warning_given);
+ iobject_full_name, prop_header,
+ bounds_warning_given);
const Imath::C4f &color = (*c4f_ptr)[color_index];
cface->a = FTOCHAR(color[0]);
@@ -387,7 +393,10 @@ static void read_custom_data_uvs(const ICompoundProperty &prop,
read_uvs(config, cd_data, sample.getVals(), sample.getIndices());
}
-void read_custom_data(const ICompoundProperty &prop, const CDStreamConfig &config, const Alembic::Abc::ISampleSelector &iss)
+void read_custom_data(const std::string & iobject_full_name,
+ const ICompoundProperty &prop,
+ const CDStreamConfig &config,
+ const Alembic::Abc::ISampleSelector &iss)
{
if (!prop.valid()) {
return;
@@ -417,7 +426,7 @@ void read_custom_data(const ICompoundProperty &prop, const CDStreamConfig &confi
continue;
}
- read_custom_data_mcols(prop, prop_header, config, iss);
+ read_custom_data_mcols(iobject_full_name, prop, prop_header, config, iss);
continue;
}
}