diff --git a/source/blender/io/alembic/exporter/abc_export_capi.cc b/source/blender/io/alembic/exporter/abc_export_capi.cc index afcee089073..bedf48523eb 100644 --- a/source/blender/io/alembic/exporter/abc_export_capi.cc +++ b/source/blender/io/alembic/exporter/abc_export_capi.cc @@ -52,7 +52,7 @@ namespace blender::io::alembic { /* Construct the depsgraph for exporting. */ static bool build_depsgraph(ExportJobData *job) { - if (strlen(job->params.collection) > 0) { + if (job->params.collection[0]) { Collection *collection = reinterpret_cast( BKE_libblock_find_name(job->bmain, ID_GR, job->params.collection)); if (!collection) { diff --git a/source/blender/io/ply/exporter/ply_export.cc b/source/blender/io/ply/exporter/ply_export.cc index 9ef665694a7..78138e322b8 100644 --- a/source/blender/io/ply/exporter/ply_export.cc +++ b/source/blender/io/ply/exporter/ply_export.cc @@ -36,7 +36,7 @@ void exporter_main(bContext *C, const PLYExportParams &export_params) Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - if (strlen(export_params.collection) > 0) { + if (export_params.collection[0]) { Collection *collection = reinterpret_cast( BKE_libblock_find_name(bmain, ID_GR, export_params.collection)); if (!collection) { diff --git a/source/blender/io/stl/exporter/stl_export.cc b/source/blender/io/stl/exporter/stl_export.cc index 3d401fd8cb0..00431ae1628 100644 --- a/source/blender/io/stl/exporter/stl_export.cc +++ b/source/blender/io/stl/exporter/stl_export.cc @@ -142,7 +142,7 @@ void exporter_main(bContext *C, const STLExportParams &export_params) Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - if (strlen(export_params.collection) > 0) { + if (export_params.collection[0]) { Collection *collection = reinterpret_cast( BKE_libblock_find_name(bmain, ID_GR, export_params.collection)); if (!collection) { diff --git a/source/blender/io/usd/intern/usd_capi_export.cc b/source/blender/io/usd/intern/usd_capi_export.cc index 3703f3d3961..d4fc1083b4b 100644 --- a/source/blender/io/usd/intern/usd_capi_export.cc +++ b/source/blender/io/usd/intern/usd_capi_export.cc @@ -485,7 +485,7 @@ bool USD_export(bContext *C, * * Has to be done from main thread currently, as it may affect Main original data (e.g. when * doing deferred update of the view-layers, see #112534 for details). */ - if (strlen(job->params.collection) > 0) { + if (job->params.collection[0]) { Collection *collection = reinterpret_cast( BKE_libblock_find_name(job->bmain, ID_GR, job->params.collection)); if (!collection) { diff --git a/source/blender/io/usd/intern/usd_writer_material.cc b/source/blender/io/usd/intern/usd_writer_material.cc index 83be0ac1382..0012302527d 100644 --- a/source/blender/io/usd/intern/usd_writer_material.cc +++ b/source/blender/io/usd/intern/usd_writer_material.cc @@ -599,7 +599,7 @@ static void export_in_memory_texture(Image *ima, char image_abs_path[FILE_MAX]; char file_name[FILE_MAX]; - if (strlen(ima->filepath) > 0) { + if (ima->filepath[0]) { get_absolute_path(ima, image_abs_path); BLI_path_split_file_part(image_abs_path, file_name, FILE_MAX); } @@ -845,7 +845,7 @@ static std::string get_tex_image_asset_filepath(const USDExporterContext &usd_ex std::string path; - if (strlen(ima->filepath) > 0) { + if (ima->filepath[0]) { /* Get absolute path. */ path = get_tex_image_asset_filepath(ima); } diff --git a/source/blender/io/wavefront_obj/exporter/obj_exporter.cc b/source/blender/io/wavefront_obj/exporter/obj_exporter.cc index 9abe32240e4..66ec549d20f 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_exporter.cc +++ b/source/blender/io/wavefront_obj/exporter/obj_exporter.cc @@ -332,7 +332,7 @@ void exporter_main(bContext *C, const OBJExportParams &export_params) ed::object::mode_set(C, OB_MODE_OBJECT); Collection *collection = nullptr; - if (strlen(export_params.collection) > 0) { + if (export_params.collection[0]) { Main *bmain = CTX_data_main(C); collection = reinterpret_cast( BKE_libblock_find_name(bmain, ID_GR, export_params.collection));