From 6ab1cb06cda5b2e2130ff2ac994bfdb60006af4e Mon Sep 17 00:00:00 2001 From: sapporw Date: Tue, 30 Jan 2024 13:52:21 +0800 Subject: [PATCH] fix(writer): eliminate uncorrect warning in write_bop when target_objects is not None, iterate target_objects instead of get_all_mesh_objects() to print correct warnings. closes #1056 --- blenderproc/python/writer/BopWriterUtility.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blenderproc/python/writer/BopWriterUtility.py b/blenderproc/python/writer/BopWriterUtility.py index d0ea64643..07a6da5f1 100644 --- a/blenderproc/python/writer/BopWriterUtility.py +++ b/blenderproc/python/writer/BopWriterUtility.py @@ -77,7 +77,7 @@ def write_bop(output_dir: str, target_objects: Optional[List[MeshObject]] = None # Select target objects or objects from the specified dataset or all objects if target_objects is not None: dataset_objects = target_objects - for obj in get_all_mesh_objects(): + for obj in dataset_objects: if obj.is_hidden(): print(f"WARNING: The given object {obj.get_name()} is hidden. However, the bop writer will still add " "coco annotations for it. If this is not desired, don't pass the object to the bop writer.")