Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/intern/bpy_rna_gizmo.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| MEM_freeN(data); | MEM_freeN(data); | ||||
| } | } | ||||
| PyDoc_STRVAR( | PyDoc_STRVAR( | ||||
| bpy_gizmo_target_set_handler_doc, | bpy_gizmo_target_set_handler_doc, | ||||
| ".. method:: target_set_handler(target, get, set, range=None):\n" | ".. method:: target_set_handler(target, get, set, range=None):\n" | ||||
| "\n" | "\n" | ||||
| " Assigns callbacks to a gizmos property.\n" | " Assigns callbacks to a gizmo's property. This is mutually exclusive with target_set_operator and target_set_prop.\n" | ||||
| "\n" | "\n" | ||||
| " :arg get: Function that returns the value for this property (single value or sequence).\n" | " :arg get: Function that returns the value for this property (single value or sequence).\n" | ||||
| " :type get: callable\n" | " :type get: callable\n" | ||||
| " :arg set: Function that takes a single value argument and applies it.\n" | " :arg set: Function that takes a single value argument and applies it.\n" | ||||
| " :type set: callable\n" | " :type set: callable\n" | ||||
| " :arg range: Function that returns a (min, max) tuple for gizmos that use a range.\n" | " :arg range: Function that returns a (min, max) tuple for gizmos that use a range.\n" | ||||
| " :type range: callable\n"); | " :type range: callable\n"); | ||||
| static PyObject *bpy_gizmo_target_set_handler(PyObject *UNUSED(self), PyObject *args, PyObject *kw) | static PyObject *bpy_gizmo_target_set_handler(PyObject *UNUSED(self), PyObject *args, PyObject *kw) | ||||
| ▲ Show 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | |||||
| fail: | fail: | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| PyDoc_STRVAR(bpy_gizmo_target_set_value_doc, | PyDoc_STRVAR(bpy_gizmo_target_set_value_doc, | ||||
| ".. method:: target_set_value(target):\n" | ".. method:: target_set_value(target):\n" | ||||
| "\n" | "\n" | ||||
| " Set the value of this target property.\n" | " Set the value of this gizmo property.\n" | ||||
| "\n" | "\n" | ||||
| " :arg target: Target property name.\n" | " :arg target: Target property name.\n" | ||||
| " :type target: string\n"); | " :type target: string\n"); | ||||
| static PyObject *bpy_gizmo_target_set_value(PyObject *UNUSED(self), PyObject *args, PyObject *kw) | static PyObject *bpy_gizmo_target_set_value(PyObject *UNUSED(self), PyObject *args, PyObject *kw) | ||||
| { | { | ||||
| struct { | struct { | ||||
| PyObject *self; | PyObject *self; | ||||
| char *target; | char *target; | ||||
| ▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | |||||
| PyDoc_STRVAR(bpy_gizmo_target_get_range_doc, | PyDoc_STRVAR(bpy_gizmo_target_get_range_doc, | ||||
| ".. method:: target_get_range(target):\n" | ".. method:: target_get_range(target):\n" | ||||
| "\n" | "\n" | ||||
| " Get the range for this target property.\n" | " Get the range for this target property.\n" | ||||
| "\n" | "\n" | ||||
| " :arg target: Target property name.\n" | " :arg target: Target property name.\n" | ||||
| " :return: The range of this property (min, max).\n" | " :return: The range of this property (min, max).\n" | ||||
| " :rtype: tuple pair.\n"); | " :rtype: Float tuple pair (min, max).\n"); | ||||
| static PyObject *bpy_gizmo_target_get_range(PyObject *UNUSED(self), PyObject *args, PyObject *kw) | static PyObject *bpy_gizmo_target_get_range(PyObject *UNUSED(self), PyObject *args, PyObject *kw) | ||||
| { | { | ||||
| struct { | struct { | ||||
| PyObject *self; | PyObject *self; | ||||
| char *target; | char *target; | ||||
| } params = { | } params = { | ||||
| .self = NULL, | .self = NULL, | ||||
| .target = NULL, | .target = NULL, | ||||
| ▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines | |||||