Move bpy_hydra.export_mtlx() exception handling to C code #28

Merged
Bogdan Nagirniak merged 9 commits from BLEN-392_pyerr_catch into hydra-render 2023-05-03 21:15:52 +02:00
Showing only changes of commit 59aeea175c - Show all commits

View File

@ -79,15 +79,17 @@ void MaterialData::init()
err_str += PyUnicode_AsUTF8(pstr);
Py_DECREF(pstr);
}
CLOG_ERROR(
LOG_RENDER_HYDRA_SCENE, "Export error for %s (%s): %s", prim_id.GetText(), id->name, err_str.c_str());
CLOG_ERROR(LOG_RENDER_HYDRA_SCENE,
"Export error for %s (%s): %s",
prim_id.GetText(),
id->name,
err_str.c_str());
if (traceback) {
PyTraceBack_Print(traceback, PySys_GetObject("stderr"));
}
Py_XDECREF(traceback);
Py_XDECREF(value);
Py_DECREF(type);
}
Py_DECREF(module);