|
Blender
V2.93
|
#include <Python.h>#include <stddef.h>#include "MEM_guardedalloc.h"#include "BLI_alloca.h"#include "BLI_utildefines.h"#include "WM_api.h"#include "WM_types.h"#include "bpy_capi_utils.h"#include "bpy_rna_gizmo.h"#include "../generic/py_capi_utils.h"#include "../generic/python_utildefines.h"#include "RNA_access.h"#include "RNA_enum_types.h"#include "RNA_types.h"#include "bpy_rna.h"Go to the source code of this file.
Classes | |
| struct | BPyGizmoHandlerUserData |
Functions | |
| bool | BPY_rna_gizmo_module (PyObject *mod_par) |
Gizmo Target Property Access API | |
| PyDoc_STRVAR (bpy_gizmo_target_get_value_doc, ".. method:: target_get_value(target):\n" "\n" " Get the value of this target property.\n" "\n" " :arg target: Target property name.\n" " :type target: string\n" " :return: The value of the target property.\n" " :rtype: Single value or array based on the target type\n") | |
| static PyObject * | bpy_gizmo_target_get_value (PyObject *UNUSED(self), PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (bpy_gizmo_target_set_value_doc, ".. method:: target_set_value(target):\n" "\n" " Set the value of this target property.\n" "\n" " :arg target: Target property name.\n" " :type target: string\n") | |
| static PyObject * | bpy_gizmo_target_set_value (PyObject *UNUSED(self), PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (bpy_gizmo_target_get_range_doc, ".. method:: target_get_range(target):\n" "\n" " Get the range for this target property.\n" "\n" " :arg target: Target property name.\n" " :return: The range of this property (min, max).\n" " :rtype: tuple pair.\n") | |
| static PyObject * | bpy_gizmo_target_get_range (PyObject *UNUSED(self), PyObject *args, PyObject *kw) |
Gizmo Target Property Define API | |
| #define | BPY_GIZMO_FN_SLOT_LEN (BPY_GIZMO_FN_SLOT_RANGE_GET + 1) |
| enum | { BPY_GIZMO_FN_SLOT_GET = 0 , BPY_GIZMO_FN_SLOT_SET , BPY_GIZMO_FN_SLOT_RANGE_GET } |
| static void | py_rna_gizmo_handler_get_cb (const wmGizmo *UNUSED(gz), wmGizmoProperty *gz_prop, void *value_p) |
| static void | py_rna_gizmo_handler_set_cb (const wmGizmo *UNUSED(gz), wmGizmoProperty *gz_prop, const void *value_p) |
| static void | py_rna_gizmo_handler_range_get_cb (const wmGizmo *UNUSED(gz), wmGizmoProperty *gz_prop, void *value_p) |
| static void | py_rna_gizmo_handler_free_cb (const wmGizmo *UNUSED(gz), wmGizmoProperty *gz_prop) |
| PyDoc_STRVAR (bpy_gizmo_target_set_handler_doc, ".. method:: target_set_handler(target, get, set, range=None):\n" "\n" " Assigns callbacks to a gizmos property.\n" "\n" " :arg get: Function that returns the value for this property (single value or sequence).\n" " :type get: callable\n" " :arg set: Function that takes a single value argument and applies it.\n" " :type set: callable\n" " :arg range: Function that returns a (min, max) tuple for gizmos that use a range.\n" " :type range: callable\n") | |
| static PyObject * | bpy_gizmo_target_set_handler (PyObject *UNUSED(self), PyObject *args, PyObject *kw) |
Definition in file bpy_rna_gizmo.c.
| #define BPY_GIZMO_FN_SLOT_LEN (BPY_GIZMO_FN_SLOT_RANGE_GET + 1) |
Definition at line 55 of file bpy_rna_gizmo.c.
| anonymous enum |
| Enumerator | |
|---|---|
| BPY_GIZMO_FN_SLOT_GET | |
| BPY_GIZMO_FN_SLOT_SET | |
| BPY_GIZMO_FN_SLOT_RANGE_GET | |
Definition at line 50 of file bpy_rna_gizmo.c.
|
static |
Definition at line 468 of file bpy_rna_gizmo.c.
References PointerRNA::data, wmGizmoPropertyType::data_type, wmGizmoType::idname, NULL, params, PROP_FLOAT, wmGizmo::ptr, PyC_Tuple_PackArray_F32(), wmGizmo::type, wmGizmoProperty::type, WM_gizmo_target_property_find(), and WM_gizmo_target_property_float_range_get().
Referenced by BPY_rna_gizmo_module().
|
static |
Definition at line 338 of file bpy_rna_gizmo.c.
References BLI_array_alloca, PointerRNA::data, wmGizmoPropertyType::data_type, wmGizmoType::idname, NULL, params, PROP_FLOAT, wmGizmo::ptr, PyC_Tuple_PackArray_F32(), wmGizmo::type, wmGizmoProperty::type, WM_gizmo_target_property_array_length(), WM_gizmo_target_property_find(), WM_gizmo_target_property_float_get(), and WM_gizmo_target_property_float_get_array().
Referenced by BPY_rna_gizmo_module().
|
static |
Definition at line 238 of file bpy_rna_gizmo.c.
References BPY_GIZMO_FN_SLOT_GET, BPY_GIZMO_FN_SLOT_LEN, BPY_GIZMO_FN_SLOT_RANGE_GET, BPY_GIZMO_FN_SLOT_SET, data, PointerRNA::data, wmGizmoType::idname, MEM_callocN, NULL, params, wmGizmo::ptr, py_rna_gizmo_handler_free_cb(), py_rna_gizmo_handler_get_cb(), py_rna_gizmo_handler_range_get_cb(), py_rna_gizmo_handler_set_cb(), wmGizmo::type, WM_gizmo_target_property_def_func_ptr(), and WM_gizmotype_target_property_find().
Referenced by BPY_rna_gizmo_module().
|
static |
Definition at line 396 of file bpy_rna_gizmo.c.
References wmGizmoPropertyType::array_length, BLI_array_alloca, BPY_context_get(), PointerRNA::data, wmGizmoPropertyType::data_type, wmGizmoType::idname, NULL, params, PROP_FLOAT, wmGizmo::ptr, PyC_AsArray(), wmGizmo::type, wmGizmoProperty::type, WM_gizmo_target_property_array_length(), WM_gizmo_target_property_find(), WM_gizmo_target_property_float_set(), and WM_gizmo_target_property_float_set_array().
Referenced by BPY_rna_gizmo_module().
| bool BPY_rna_gizmo_module | ( | PyObject * | mod_par | ) |
Definition at line 513 of file bpy_rna_gizmo.c.
References ARRAY_SIZE, bpy_gizmo_target_get_range(), bpy_gizmo_target_get_value(), bpy_gizmo_target_set_handler(), bpy_gizmo_target_set_value(), and NULL.
Referenced by BPy_init_modules().
|
static |
Definition at line 213 of file bpy_rna_gizmo.c.
References BPY_GIZMO_FN_SLOT_LEN, wmGizmoProperty::custom_func, data, MEM_freeN, and wmGizmoProperty::user_data.
Referenced by bpy_gizmo_target_set_handler().
|
static |
Definition at line 62 of file bpy_rna_gizmo.c.
References wmGizmoPropertyType::array_length, BPY_GIZMO_FN_SLOT_GET, wmGizmoProperty::custom_func, data, wmGizmoPropertyType::data_type, NULL, PROP_FLOAT, PyC_AsArray(), ret, wmGizmoProperty::type, and wmGizmoProperty::user_data.
Referenced by bpy_gizmo_target_set_handler().
|
static |
Definition at line 159 of file bpy_rna_gizmo.c.
References BPY_GIZMO_FN_SLOT_RANGE_GET, wmGizmoProperty::custom_func, data, wmGizmoPropertyType::data_type, NULL, PROP_FLOAT, ret, wmGizmoProperty::type, and wmGizmoProperty::user_data.
Referenced by bpy_gizmo_target_set_handler().
|
static |
Definition at line 111 of file bpy_rna_gizmo.c.
References wmGizmoPropertyType::array_length, BPY_GIZMO_FN_SLOT_SET, wmGizmoProperty::custom_func, data, wmGizmoPropertyType::data_type, NULL, PROP_FLOAT, PyC_Tuple_PackArray_F32(), ret, wmGizmoProperty::type, and wmGizmoProperty::user_data.
Referenced by bpy_gizmo_target_set_handler().
| PyDoc_STRVAR | ( | bpy_gizmo_target_get_range_doc | , |
| ".. method:: target_get_range(target):\n" "\n" " Get the range for this target property.\n" "\n" " :arg target: Target property name.\n" " :return: The range of this property (min, max).\n" " :rtype: tuple pair.\n" | |||
| ) |
| PyDoc_STRVAR | ( | bpy_gizmo_target_get_value_doc | , |
| ".. method:: target_get_value(target):\n" "\n" " Get the value of this target property.\n" "\n" " :arg target: Target property name.\n" " :type target: string\n" " :return: The value of the target property.\n" " :rtype: Single value or array based on the target type\n" | |||
| ) |
| PyDoc_STRVAR | ( | bpy_gizmo_target_set_handler_doc | , |
| ".. method:: target_set_handler(target, get, set, range=None):\n" "\n" " Assigns callbacks to a gizmos property.\n" "\n" " :arg get: Function that returns the value for this property (single value or sequence).\n" " :type get: callable\n" " :arg set: Function that takes a single value argument and applies it.\n" " :type set: callable\n" " :arg range: Function that returns a (min, max) tuple for gizmos that use a range.\n" " :type range: callable\n" | |||
| ) |
| PyDoc_STRVAR | ( | bpy_gizmo_target_set_value_doc | , |
| ".. method:: target_set_value(target):\n" "\n" " Set the value of this target property.\n" "\n" " :arg target: Target property name.\n" " :type target: string\n" | |||
| ) |