From 337d2759f4b090ec441000c6d9ee4de30807bc3a Mon Sep 17 00:00:00 2001 From: octo-patch Date: Thu, 9 Apr 2026 03:08:07 +0800 Subject: [PATCH] fix: remove conflicting default=True from store_true CLI flags (fixes #12) --save_video in batch_infer.py and --dump_blend in scene_processor/to_blend.py both used action='store_true' combined with default=True, making them permanently enabled regardless of whether the flag was passed. Removed the redundant default=True so both flags behave as opt-in (default False). --- batch_infer.py | 2 +- scene_processor/to_blend.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/batch_infer.py b/batch_infer.py index 57a5e9d..64d9d63 100644 --- a/batch_infer.py +++ b/batch_infer.py @@ -70,7 +70,7 @@ def main(): parser.add_argument("--num_workers", type=int, default=0, help="Number of workers for data loading") parser.add_argument("--output_dir", type=str, default=None, help="Output directory for rendered images (default: same as input folder)") - parser.add_argument("--save_video", action='store_true', default=True, help="Merge rendered images into a video at video.mp4.") + parser.add_argument("--save_video", action='store_true', help="Merge rendered images into a video at video.mp4.") parser.add_argument("--tone_mapper", type=str, choices=['none', 'agx', 'filmic', 'pbr_neutral'], default='none', help="Tone mapper for inference") args = parser.parse_args() diff --git a/scene_processor/to_blend.py b/scene_processor/to_blend.py index 0fc8866..740d763 100644 --- a/scene_processor/to_blend.py +++ b/scene_processor/to_blend.py @@ -127,8 +127,8 @@ def render_scene(camera_config: CameraConfig, output_image_path: str, output_obj parser.add_argument('--mesh_path', type=str, help='Path to mesh file. If not provided, a temporary directory will be used', default=None) - parser.add_argument('--dump_blend', default=True, action='store_true', help='Save Blender file after rendering') - parser.add_argument('--save_img', default=False, action='store_true', help='Save rendered images') + parser.add_argument('--dump_blend', action='store_true', help='Save Blender file after rendering') + parser.add_argument('--save_img', action='store_true', help='Save rendered images') parser.add_argument('--resolution', type=int, default=512, help='Resolution of the rendered images') parser.add_argument('--spp', type=int, default=4096, help='Samples per pixel')