Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/intern/bpy_rna_types_capi.c
| Show First 20 Lines • Show All 179 Lines • ▼ Show 20 Lines | |||||
| PyDoc_STRVAR( | PyDoc_STRVAR( | ||||
| pyrna_draw_handler_add_doc, | pyrna_draw_handler_add_doc, | ||||
| ".. method:: draw_handler_add(callback, args, region_type, draw_type)\n" | ".. method:: draw_handler_add(callback, args, region_type, draw_type)\n" | ||||
| "\n" | "\n" | ||||
| " Add a new draw handler to this space type.\n" | " Add a new draw handler to this space type.\n" | ||||
| " It will be called every time the specified region in the space type will be drawn.\n" | " It will be called every time the specified region in the space type will be drawn.\n" | ||||
| " Note: All arguments are positional only for now.\n" | " Note: All arguments are positional only for now.\n" | ||||
| "\n" | "\n" | ||||
| " :param callback:\n" | " :arg callback:\n" | ||||
| " A function that will be called when the region is drawn.\n" | " A function that will be called when the region is drawn.\n" | ||||
| " It gets the specified arguments as input.\n" | " It gets the specified arguments as input.\n" | ||||
| " :type callback: function\n" | " :type callback: function\n" | ||||
| " :param args: Arguments that will be passed to the callback.\n" | " :arg args: Arguments that will be passed to the callback.\n" | ||||
| " :type args: tuple\n" | " :type args: tuple\n" | ||||
| " :param region_type: The region type the callback draws in; usually ``WINDOW``. " | " :arg region_type: The region type the callback draws in; usually ``WINDOW``. " | ||||
| "(:class:`bpy.types.Region.type`)\n" | "(:class:`bpy.types.Region.type`)\n" | ||||
| " :type region_type: str\n" | " :type region_type: str\n" | ||||
| " :param draw_type: Usually ``POST_PIXEL`` for 2D drawing and ``POST_VIEW`` for 3D drawing. " | " :arg draw_type: Usually ``POST_PIXEL`` for 2D drawing and ``POST_VIEW`` for 3D drawing. " | ||||
| "In some cases ``PRE_VIEW`` can be used. ``BACKDROP`` can be used for backdrops in the node " | "In some cases ``PRE_VIEW`` can be used. ``BACKDROP`` can be used for backdrops in the node " | ||||
| "editor.\n" | "editor.\n" | ||||
| " :type draw_type: str\n" | " :type draw_type: str\n" | ||||
| " :return: Handler that can be removed later on.\n" | " :return: Handler that can be removed later on.\n" | ||||
| " :rtype: object"); | " :rtype: object"); | ||||
| PyDoc_STRVAR(pyrna_draw_handler_remove_doc, | PyDoc_STRVAR(pyrna_draw_handler_remove_doc, | ||||
| ".. method:: draw_handler_remove(handler, region_type)\n" | ".. method:: draw_handler_remove(handler, region_type)\n" | ||||
| "\n" | "\n" | ||||
| " Remove a draw handler that was added previously.\n" | " Remove a draw handler that was added previously.\n" | ||||
| "\n" | "\n" | ||||
| " :param handler: The draw handler that should be removed.\n" | " :arg handler: The draw handler that should be removed.\n" | ||||
| " :type handler: object\n" | " :type handler: object\n" | ||||
| " :param region_type: Region type the callback was added to.\n" | " :arg region_type: Region type the callback was added to.\n" | ||||
| " :type region_type: str\n"); | " :type region_type: str\n"); | ||||
| static struct PyMethodDef pyrna_space_methods[] = { | static struct PyMethodDef pyrna_space_methods[] = { | ||||
| {"draw_handler_add", | {"draw_handler_add", | ||||
| (PyCFunction)pyrna_callback_classmethod_add, | (PyCFunction)pyrna_callback_classmethod_add, | ||||
| METH_VARARGS | METH_CLASS, | METH_VARARGS | METH_CLASS, | ||||
| pyrna_draw_handler_add_doc}, | pyrna_draw_handler_add_doc}, | ||||
| {"draw_handler_remove", | {"draw_handler_remove", | ||||
| ▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines | |||||