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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user