Logging: Cycles: Change various warnings to errors
So that --debug-exit-on-error can be used to detect issues like missing textures. Blender also reports such cases as errors now. Pull Request: https://projects.blender.org/blender/blender/pulls/146507
This commit is contained in:
committed by
Brecht Van Lommel
parent
23539f457d
commit
613abf0383
@@ -386,7 +386,7 @@ static void ExportCurveSegments(Scene *scene, Hair *hair, ParticleCurveData *CDa
|
|||||||
|
|
||||||
/* check allocation */
|
/* check allocation */
|
||||||
if ((hair->get_curve_keys().size() != num_keys) || (hair->num_curves() != num_curves)) {
|
if ((hair->get_curve_keys().size() != num_keys) || (hair->num_curves() != num_curves)) {
|
||||||
LOG_WARNING << "Hair memory allocation failed, clearing data.";
|
LOG_ERROR << "Hair memory allocation failed, clearing data.";
|
||||||
hair->clear(true);
|
hair->clear(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -339,13 +339,13 @@ string CUDADevice::compile_kernel(const string &common_cflags,
|
|||||||
const int nvcc_cuda_version = cuewCompilerVersion();
|
const int nvcc_cuda_version = cuewCompilerVersion();
|
||||||
LOG_INFO << "Found nvcc " << nvcc << ", CUDA version " << nvcc_cuda_version << ".";
|
LOG_INFO << "Found nvcc " << nvcc << ", CUDA version " << nvcc_cuda_version << ".";
|
||||||
if (nvcc_cuda_version < 101) {
|
if (nvcc_cuda_version < 101) {
|
||||||
LOG_WARNING << "Unsupported CUDA version " << nvcc_cuda_version / 10 << "."
|
LOG_ERROR << "Unsupported CUDA version " << nvcc_cuda_version / 10 << "."
|
||||||
<< nvcc_cuda_version % 10 << ", you need CUDA 10.1 or newer";
|
<< nvcc_cuda_version % 10 << ", you need CUDA 10.1 or newer";
|
||||||
return string();
|
return string();
|
||||||
}
|
}
|
||||||
if (!(nvcc_cuda_version >= 102 && nvcc_cuda_version < 130)) {
|
if (!(nvcc_cuda_version >= 102 && nvcc_cuda_version < 130)) {
|
||||||
LOG_WARNING << "CUDA version " << nvcc_cuda_version / 10 << "." << nvcc_cuda_version % 10
|
LOG_ERROR << "CUDA version " << nvcc_cuda_version / 10 << "." << nvcc_cuda_version % 10
|
||||||
<< "CUDA 10.1 to 12 are officially supported.";
|
<< "CUDA 10.1 to 12 are officially supported.";
|
||||||
}
|
}
|
||||||
|
|
||||||
double starttime = time_dt();
|
double starttime = time_dt();
|
||||||
|
|||||||
@@ -44,10 +44,10 @@ class HdCyclesVolumeLoader : public VDBImageLoader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (const openvdb::IoError &e) {
|
catch (const openvdb::IoError &e) {
|
||||||
LOG_WARNING << "Error loading OpenVDB file: " << e.what();
|
LOG_ERROR << "Error loading OpenVDB file: " << e.what();
|
||||||
}
|
}
|
||||||
catch (...) {
|
catch (...) {
|
||||||
LOG_WARNING << "Error loading OpenVDB file: Unknown error";
|
LOG_ERROR << "Error loading OpenVDB file: Unknown error";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ static void check_invalidate_caches()
|
|||||||
config = OCIO::GetCurrentConfig();
|
config = OCIO::GetCurrentConfig();
|
||||||
}
|
}
|
||||||
catch (const OCIO::Exception &exception) {
|
catch (const OCIO::Exception &exception) {
|
||||||
LOG_WARNING << "OCIO config error: " << exception.what();
|
LOG_ERROR << "OCIO config error: " << exception.what();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ ColorSpaceProcessor *ColorSpaceManager::get_processor(ustring colorspace)
|
|||||||
config = OCIO::GetCurrentConfig();
|
config = OCIO::GetCurrentConfig();
|
||||||
}
|
}
|
||||||
catch (const OCIO::Exception &exception) {
|
catch (const OCIO::Exception &exception) {
|
||||||
LOG_WARNING << "OCIO config error: " << exception.what();
|
LOG_ERROR << "OCIO config error: " << exception.what();
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,7 +128,7 @@ bool ColorSpaceManager::colorspace_is_data(ustring colorspace)
|
|||||||
config = OCIO::GetCurrentConfig();
|
config = OCIO::GetCurrentConfig();
|
||||||
}
|
}
|
||||||
catch (const OCIO::Exception &exception) {
|
catch (const OCIO::Exception &exception) {
|
||||||
LOG_WARNING << "OCIO config error: " << exception.what();
|
LOG_ERROR << "OCIO config error: " << exception.what();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,7 +208,7 @@ ustring ColorSpaceManager::detect_known_colorspace(ustring colorspace,
|
|||||||
config = OCIO::GetCurrentConfig();
|
config = OCIO::GetCurrentConfig();
|
||||||
}
|
}
|
||||||
catch (const OCIO::Exception &exception) {
|
catch (const OCIO::Exception &exception) {
|
||||||
LOG_WARNING << "OCIO config error: " << exception.what();
|
LOG_ERROR << "OCIO config error: " << exception.what();
|
||||||
return u_colorspace_raw;
|
return u_colorspace_raw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,23 +19,28 @@ bool OIIOImageLoader::load_metadata(const ImageDeviceFeatures & /*features*/,
|
|||||||
ImageMetaData &metadata)
|
ImageMetaData &metadata)
|
||||||
{
|
{
|
||||||
/* Perform preliminary checks, with meaningful logging. */
|
/* Perform preliminary checks, with meaningful logging. */
|
||||||
|
if (filepath.empty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!path_exists(filepath.string())) {
|
if (!path_exists(filepath.string())) {
|
||||||
LOG_WARNING << "File '" << filepath.string() << "' does not exist.";
|
LOG_ERROR << "Image file '" << filepath.string() << "' does not exist.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (path_is_directory(filepath.string())) {
|
if (path_is_directory(filepath.string())) {
|
||||||
LOG_WARNING << "File '" << filepath.string() << "' is a directory, cannot use as image.";
|
LOG_ERROR << "Image file '" << filepath.string() << "' is a directory, cannot use as image.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
unique_ptr<ImageInput> in(ImageInput::create(filepath.string()));
|
unique_ptr<ImageInput> in(ImageInput::create(filepath.string()));
|
||||||
|
|
||||||
if (!in) {
|
if (!in) {
|
||||||
|
LOG_ERROR << "Image file '" << filepath.string() << "' failed to load.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageSpec spec;
|
ImageSpec spec;
|
||||||
if (!in->open(filepath.string(), spec)) {
|
if (!in->open(filepath.string(), spec)) {
|
||||||
|
LOG_ERROR << "Image file '" << filepath.string() << "' failed to open.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -272,10 +272,10 @@ struct ToNanoOp {
|
|||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
catch (const std::exception &e) {
|
catch (const std::exception &e) {
|
||||||
LOG_WARNING << "Error converting OpenVDB to NanoVDB grid: " << e.what();
|
LOG_ERROR << "Error converting OpenVDB to NanoVDB grid: " << e.what();
|
||||||
}
|
}
|
||||||
catch (...) {
|
catch (...) {
|
||||||
LOG_WARNING << "Error converting OpenVDB to NanoVDB grid: Unknown error";
|
LOG_ERROR << "Error converting OpenVDB to NanoVDB grid: Unknown error";
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user