|
Blender V4.3
|
Blender CLI Generic --command Support.
More...
Go to the source code of this file.
Classes | |
| class | CommandHandler |
Functions | |
| void | BKE_blender_cli_command_register (std::unique_ptr< CommandHandler > cmd) |
| bool | BKE_blender_cli_command_unregister (CommandHandler *cmd) |
| int | BKE_blender_cli_command_exec (struct bContext *C, const char *id, const int argc, const char **argv) |
| void | BKE_blender_cli_command_print_help () |
| void | BKE_blender_cli_command_free_all () |
Blender CLI Generic --command Support.
--help is passed in as the first argument to a command. Definition in file BKE_blender_cli_command.hh.
| int BKE_blender_cli_command_exec | ( | struct bContext * | C, |
| const char * | id, | ||
| const int | argc, | ||
| const char ** | argv ) |
Run the command by id, passing in the argument list & context. The argument list must begin after the command identifier.
Definition at line 122 of file blender_cli_command.cc.
References blender_cli_command_lookup(), CommandHandler::exec(), and CommandHandler::is_duplicate.
Referenced by arg_handle_command_set().
| void BKE_blender_cli_command_free_all | ( | ) |
Frees all commands (using their #CommandFreeFn call-backs).
Definition at line 176 of file blender_cli_command.cc.
References g_command_handlers.
Referenced by WM_exit_ex().
| void BKE_blender_cli_command_print_help | ( | ) |
Print all known commands (used for passing --command help in the command-line).
Definition at line 138 of file blender_cli_command.cc.
References b, and g_command_handlers.
Referenced by arg_handle_command_set().
| void BKE_blender_cli_command_register | ( | std::unique_ptr< CommandHandler > | cmd | ) |
| cmd | The memory for a command type (ownership is transferred). |
Definition at line 74 of file blender_cli_command.cc.
References blender_cli_command_lookup(), and g_command_handlers.
Referenced by bpy_cli_command_register().
| bool BKE_blender_cli_command_unregister | ( | CommandHandler * | cmd | ) |
Unregister a previously registered command.
Definition at line 87 of file blender_cli_command.cc.
References blender_cli_command_index(), g_command_handlers, CommandHandler::id, and CommandHandler::is_duplicate.
Referenced by bpy_cli_command_unregister().