Blender V4.3
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 163 of file bpy_cli_command.cc.

Constructor & Destructor Documentation

◆ BPyCommandHandler()

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

Definition at line 165 of file bpy_cli_command.cc.

◆ ~BPyCommandHandler()

BPyCommandHandler::~BPyCommandHandler ( )
inlineoverride

Definition at line 169 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 174 of file bpy_cli_command.cc.

References bpy_cli_command_exec(), and py_exec_fn.

Member Data Documentation

◆ py_exec_fn

PyObject* BPyCommandHandler::py_exec_fn = nullptr

Definition at line 179 of file bpy_cli_command.cc.

Referenced by bpy_cli_command_unregister(), exec(), and ~BPyCommandHandler().


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