Commit Graph

3 Commits

Author SHA1 Message Date
Campbell Barton
38dc888d7f Cleanup: use ELEM macro, remove redundant "struct" 2024-03-19 14:17:47 +11:00
Campbell Barton
0b9ef9ee2a Fix missing newline from bpy.utils.register_cli_command doc-string 2024-03-15 13:45:06 +11:00
Campbell Barton
9372e0dfe0 CLI: support defining custom commands via C++ & Python API
Add support for add-ons to define commands using the new argument
`-c` or `--command`.

Commands behave as follows:

- Passing in a command enables background mode without the need to pass
  in `--background`.
- All arguments following the command are passed to the command
  (without the need to use the `--` argument).
- Add-ons can define their own commands via
  `bpy.utils.register_cli_command` (see examples in API docs).
- Passing in `--command help` lists all available commands.

Ref !119115
2024-03-08 11:10:13 +11:00