Blender V5.0
BPyCommandHandler Class Reference

Inherits CommandHandler.

Public Member Functions

 BPyCommandHandler (const std::string &id, PyObject *py_exec_fn)
 ~BPyCommandHandler () override
int exec (bContext *C, int argc, const char **argv) override
Public Member Functions inherited from CommandHandler
 CommandHandler (const std::string &id)
virtual ~CommandHandler ()=default

Public Attributes

PyObject * py_exec_fn = nullptr
Public Attributes inherited from CommandHandler
const std::string id
bool is_duplicate = false

Detailed Description

Definition at line 160 of file bpy_cli_command.cc.

Constructor & Destructor Documentation

◆ BPyCommandHandler()

BPyCommandHandler::BPyCommandHandler ( const std::string & id,
PyObject * py_exec_fn )
inline

◆ ~BPyCommandHandler()

BPyCommandHandler::~BPyCommandHandler ( )
inlineoverride

Definition at line 166 of file bpy_cli_command.cc.

References bpy_cli_command_free(), and py_exec_fn.

Member Function Documentation

◆ exec()

int BPyCommandHandler::exec ( bContext * C,
int argc,
const char ** argv )
inlineoverridevirtual

The main execution function. The return value is used as the commands exit-code.

Implements CommandHandler.

Definition at line 171 of file bpy_cli_command.cc.

References bpy_cli_command_exec(), C, and py_exec_fn.

Member Data Documentation

◆ py_exec_fn

PyObject* BPyCommandHandler::py_exec_fn = nullptr

The documentation for this class was generated from the following file: