21 #include "RNA_prototypes.h"
50 PyObject *py_class_dict = py_class->tp_dict;
53 bool prop_raise_error;
56 if (PyUnicode_Check(bl_property)) {
58 prop_id = PyUnicode_AsUTF8(bl_property);
59 prop_raise_error =
true;
62 PyErr_Format(PyExc_ValueError,
63 "%.200s.bl_property should be a string, not %.200s",
65 Py_TYPE(bl_property)->tp_name);
72 prop_raise_error =
false;
78 prop_raise_error =
false;
91 if (prop_raise_error) {
93 PyExc_ValueError,
"%.200s.bl_property '%.200s' not found",
ot->
idname, prop_id);
151 const char *macroname;
153 if (!PyArg_ParseTuple(args,
"Os:_bpy.ops.macro_define", ¯o, &opname)) {
158 PyErr_Format(PyExc_ValueError,
"Macro Define: '%s' is not a valid operator id", opname);
172 PyErr_Format(PyExc_ValueError,
"Macro Define: '%s' is not a valid macro", macroname);
PyObject * bpy_intern_str_bl_property
void BPY_RNA_operator_macro_wrapper(wmOperatorType *ot, void *userdata)
PyObject * PYOP_wrap_macro_define(PyObject *UNUSED(self), PyObject *args)
void BPY_RNA_operator_wrapper(wmOperatorType *ot, void *userdata)
static void operator_properties_init(wmOperatorType *ot)
PyObject * pyrna_struct_CreatePyObject(PointerRNA *ptr)
StructRNA * pyrna_struct_as_srna(PyObject *self, const bool parent, const char *error_prefix)
int pyrna_deferred_register_class(StructRNA *srna, PyTypeObject *py_class)
const char * RNA_struct_identifier(const StructRNA *type)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
void RNA_struct_blender_type_set(StructRNA *srna, void *blender_type)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
const char * RNA_struct_translation_context(const StructRNA *type)
void RNA_def_struct_identifier_no_struct_map(StructRNA *srna, const char *identifier)
void RNA_def_struct_translation_context(StructRNA *srna, const char *context)
void(* ui)(struct bContext *, struct wmOperator *)
bool(* pyop_poll)(struct bContext *, struct wmOperatorType *ot) ATTR_WARN_UNUSED_RESULT
wmOperatorTypeMacro * WM_operatortype_macro_define(wmOperatorType *ot, const char *idname)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)