Cleanup: only use nullptr in USD exporter

This removes all use of `NULL` from the USD Exporter, also when calling
into C code.

No functional changes.
This commit is contained in:
Sybren A. Stüvel 2020-05-22 10:12:13 +02:00
parent b87d81be96
commit fbbc0229b8
4 changed files with 5 additions and 5 deletions

View File

@ -53,7 +53,7 @@ bool HierarchyContext::operator<(const HierarchyContext &other) const
if (object != other.object) {
return object < other.object;
}
if (duplicator != NULL && duplicator == other.duplicator) {
if (duplicator != nullptr && duplicator == other.duplicator) {
// Only resort to string comparisons when both objects are created by the same duplicator.
return export_name < other.export_name;
}

View File

@ -185,7 +185,7 @@ bool USD_export(bContext *C,
/* setup job */
WM_jobs_customdata_set(wm_job, job, MEM_freeN);
WM_jobs_timer(wm_job, 0.1, NC_SCENE | ND_FRAME, NC_SCENE | ND_FRAME);
WM_jobs_callbacks(wm_job, USD::export_startjob, NULL, NULL, USD::export_endjob);
WM_jobs_callbacks(wm_job, USD::export_startjob, nullptr, nullptr, USD::export_endjob);
WM_jobs_start(CTX_wm_manager(C), wm_job);
}

View File

@ -79,7 +79,7 @@ void USDGenericMeshWriter::do_write(HierarchyContext &context)
bool needsfree = false;
Mesh *mesh = get_export_mesh(object_eval, needsfree);
if (mesh == NULL) {
if (mesh == nullptr) {
return;
}
@ -100,7 +100,7 @@ void USDGenericMeshWriter::do_write(HierarchyContext &context)
void USDGenericMeshWriter::free_export_mesh(Mesh *mesh)
{
BKE_id_free(NULL, mesh);
BKE_id_free(nullptr, mesh);
}
struct USDMeshData {

View File

@ -50,7 +50,7 @@ void USDTransformWriter::do_write(HierarchyContext &context)
bool USDTransformWriter::check_is_animated(const HierarchyContext &context) const
{
if (context.duplicator != NULL) {
if (context.duplicator != nullptr) {
/* This object is being duplicated, so could be emitted by a particle system and thus
* influenced by forces. TODO(Sybren): Make this more strict. Probably better to get from the
* depsgraph whether this object instance has a time source. */