From 1d77302fd9ea9b3892ebdcf28150b3f7d40aeb21 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 2 Feb 2021 19:30:37 +1100 Subject: creator: add missing '--debug-*' arguments under debugging options Only print "Other Options" when the heading has content to show. --- source/blender/blenlib/intern/BLI_args.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/blender/blenlib/intern') diff --git a/source/blender/blenlib/intern/BLI_args.c b/source/blender/blenlib/intern/BLI_args.c index 3d4521a3304..07ab4f407f2 100644 --- a/source/blender/blenlib/intern/BLI_args.c +++ b/source/blender/blenlib/intern/BLI_args.c @@ -275,6 +275,16 @@ void BLI_args_print_other_doc(struct bArgs *ba) } } +bool BLI_args_has_other_doc(const struct bArgs *ba) +{ + for (const bArgDoc *d = ba->docs.first; d; d = d->next) { + if (d->done == 0) { + return true; + } + } + return false; +} + void BLI_args_parse(struct bArgs *ba, int pass, BA_ArgCallback default_cb, void *default_data) { BLI_assert((pass != 0) && (pass >= -1)); -- cgit v1.2.3