Blender V5.3
bpy_rna_gizmo.cc File Reference
#include <Python.h>
#include <cstddef>
#include "MEM_guardedalloc.h"
#include "BLI_alloca.hh"
#include "BLI_utildefines.hh"
#include "WM_types.hh"
#include "bpy_capi_utils.hh"
#include "bpy_rna_gizmo.hh"
#include "../generic/py_capi_utils.hh"
#include "../generic/python_compat.hh"
#include "RNA_access.hh"
#include "RNA_prototypes.hh"
#include "bpy_rna.hh"

Go to the source code of this file.

Classes

struct  blender::BPyGizmoWithTarget
struct  blender::BPyGizmoWithTargetType
struct  blender::BPyGizmoHandlerUserData

Namespaces

namespace  blender
 BMesh Iterators.

Functions

Parsing Utility Functions

Functions used as callbacks for #PyArg_ParseTuple O& format string.

static int blender::py_rna_gizmo_parse (PyObject *o, void *p)
static int blender::py_rna_gizmo_target_id_parse (PyObject *o, void *p)
static int blender::py_rna_gizmo_target_id_parse_and_ensure_is_valid (PyObject *o, void *p)
static int blender::py_rna_gizmo_target_type_id_parse (PyObject *o, void *p)
Gizmo Target Property Access API
 blender::PyDoc_STRVAR (bpy_gizmo_target_get_value_doc, ".. method:: target_get_value(target)\n" "\n" " Get the value of this target property.\n" "\n" " :param target: Target property name.\n" " :type target: str\n" " :return: The value of the target property as a value or array based on the target type.\n" " :rtype: float | tuple[float, ...]\n")
static PyObject * blender::bpy_gizmo_target_get_value (PyObject *, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (bpy_gizmo_target_set_value_doc, ".. method:: target_set_value(target)\n" "\n" " Set the value of this target property.\n" "\n" " :param target: Target property name.\n" " :type target: str\n")
static PyObject * blender::bpy_gizmo_target_set_value (PyObject *, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (bpy_gizmo_target_get_range_doc, ".. method:: target_get_range(target)\n" "\n" " Get the range for this target property.\n" "\n" " :param target: Target property name.\n" " :type target: str\n" " :return: The range of this property (min, max).\n" " :rtype: tuple[float, float]\n")
static PyObject * blender::bpy_gizmo_target_get_range (PyObject *, PyObject *args, PyObject *kw)
Gizmo Module
bool blender::BPY_rna_gizmo_module (PyObject *mod_par)

Gizmo Target Property Define API

#define BPY_GIZMO_FN_SLOT_LEN   (BPY_GIZMO_FN_SLOT_RANGE_GET + 1)
enum  { blender::BPY_GIZMO_FN_SLOT_GET = 0 , blender::BPY_GIZMO_FN_SLOT_SET , blender::BPY_GIZMO_FN_SLOT_RANGE_GET }
static void blender::py_rna_gizmo_handler_get_cb (const wmGizmo *, wmGizmoProperty *gz_prop, void *value_p)
static void blender::py_rna_gizmo_handler_set_cb (const wmGizmo *, wmGizmoProperty *gz_prop, const void *value_p)
static void blender::py_rna_gizmo_handler_range_get_cb (const wmGizmo *, wmGizmoProperty *gz_prop, void *value_p)
static void blender::py_rna_gizmo_handler_free_cb (const wmGizmo *, wmGizmoProperty *gz_prop)
 blender::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" " :param target: Target property name.\n" " :type target: str\n" " :param get: Function that returns the value for this property " "(single value or sequence).\n" " :type get: Callable[[], float | Sequence[float]]\n" " :param set: Function that takes a single value argument and applies it.\n" " :type set: Callable[[tuple[float, ...]], Any]\n" " :param range: Function that returns a (min, max) tuple for gizmos that use a range. " "The returned value is not used.\n" " :type range: Callable[[], tuple[float, float]] | None\n")
static PyObject * blender::bpy_gizmo_target_set_handler (PyObject *, PyObject *args, PyObject *kw)

Detailed Description

This file defines utility methods for bpy.types.Gizmo.

Definition in file bpy_rna_gizmo.cc.

Macro Definition Documentation

◆ BPY_GIZMO_FN_SLOT_LEN

#define BPY_GIZMO_FN_SLOT_LEN   (BPY_GIZMO_FN_SLOT_RANGE_GET + 1)