Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjon denning <gfxcoder@gmail.com>2022-07-13 15:43:57 +0300
committerjon denning <gfxcoder@gmail.com>2022-07-13 15:43:57 +0300
commitccdf189d3c5c3b90dbb95b704f684f1cd1bd192c (patch)
treee43e3bcf2d54f65e3d7ffa4f5368564817d62f23
parent441dd08dba34d22e8a34d54b252e8cdd38f2c56c (diff)
Documentation: Update Docs for Gizmo
This patch updates the documentation for arguments regarding the `Gizmo` type. - Corrected `select_id` doc for draw_preset_ functions. `-1` indicates that no selection ID is to be written, but previous docs incorrectly specified `0` instead. - Added missing doc for `target` argument for `target_set_handler` function. Reviewed by: Aaron Carlisle (Blendify) Differential Revision: https://developer.blender.org/D14834
-rw-r--r--source/blender/makesrna/intern/rna_wm_gizmo_api.c40
-rw-r--r--source/blender/python/intern/bpy_rna_gizmo.c2
2 files changed, 38 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_wm_gizmo_api.c b/source/blender/makesrna/intern/rna_wm_gizmo_api.c
index 419dfa68305..760121d2279 100644
--- a/source/blender/makesrna/intern/rna_wm_gizmo_api.c
+++ b/source/blender/makesrna/intern/rna_wm_gizmo_api.c
@@ -211,7 +211,15 @@ void RNA_api_gizmo(StructRNA *srna)
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
RNA_def_property_multi_array(parm, 2, rna_matrix_dimsize_4x4);
RNA_def_property_ui_text(parm, "", "The matrix to transform");
- RNA_def_int(func, "select_id", -1, -1, INT_MAX, "Zero when not selecting", "", -1, INT_MAX);
+ RNA_def_int(func,
+ "select_id",
+ -1,
+ -1,
+ INT_MAX,
+ "ID to use when gizmo is selectable. Use -1 when not selecting",
+ "",
+ -1,
+ INT_MAX);
/* draw_preset_box */
func = RNA_def_function(srna, "draw_preset_arrow", "rna_gizmo_draw_preset_arrow");
@@ -221,7 +229,15 @@ void RNA_api_gizmo(StructRNA *srna)
RNA_def_property_multi_array(parm, 2, rna_matrix_dimsize_4x4);
RNA_def_property_ui_text(parm, "", "The matrix to transform");
RNA_def_enum(func, "axis", rna_enum_object_axis_items, 2, "", "Arrow Orientation");
- RNA_def_int(func, "select_id", -1, -1, INT_MAX, "Zero when not selecting", "", -1, INT_MAX);
+ RNA_def_int(func,
+ "select_id",
+ -1,
+ -1,
+ INT_MAX,
+ "ID to use when gizmo is selectable. Use -1 when not selecting",
+ "",
+ -1,
+ INT_MAX);
func = RNA_def_function(srna, "draw_preset_circle", "rna_gizmo_draw_preset_circle");
RNA_def_function_ui_description(func, "Draw a box");
@@ -230,7 +246,15 @@ void RNA_api_gizmo(StructRNA *srna)
RNA_def_property_multi_array(parm, 2, rna_matrix_dimsize_4x4);
RNA_def_property_ui_text(parm, "", "The matrix to transform");
RNA_def_enum(func, "axis", rna_enum_object_axis_items, 2, "", "Arrow Orientation");
- RNA_def_int(func, "select_id", -1, -1, INT_MAX, "Zero when not selecting", "", -1, INT_MAX);
+ RNA_def_int(func,
+ "select_id",
+ -1,
+ -1,
+ INT_MAX,
+ "ID to use when gizmo is selectable. Use -1 when not selecting",
+ "",
+ -1,
+ INT_MAX);
/* -------------------------------------------------------------------- */
/* Other Shapes */
@@ -243,7 +267,15 @@ void RNA_api_gizmo(StructRNA *srna)
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
parm = RNA_def_int(func, "face_map", 0, 0, INT_MAX, "Face map index", "", 0, INT_MAX);
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
- RNA_def_int(func, "select_id", -1, -1, INT_MAX, "Zero when not selecting", "", -1, INT_MAX);
+ RNA_def_int(func,
+ "select_id",
+ -1,
+ -1,
+ INT_MAX,
+ "ID to use when gizmo is selectable. Use -1 when not selecting",
+ "",
+ -1,
+ INT_MAX);
/* -------------------------------------------------------------------- */
/* Property API */
diff --git a/source/blender/python/intern/bpy_rna_gizmo.c b/source/blender/python/intern/bpy_rna_gizmo.c
index 61f439e5152..32ef7865e84 100644
--- a/source/blender/python/intern/bpy_rna_gizmo.c
+++ b/source/blender/python/intern/bpy_rna_gizmo.c
@@ -314,6 +314,8 @@ PyDoc_STRVAR(
"\n"
" Assigns callbacks to a gizmos property.\n"
"\n"
+ " :arg target: Target property name.\n"
+ " :type target: string\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"