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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-08-26 09:57:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-08-26 09:58:26 +0300
commitabd1a2d07d677f0729acbe99de5d489d4ced6962 (patch)
tree16d8d2b15cc9bb07f41bca257ae6dc75141ac5ef /source
parentdb851c78b4b391e4ddeb3350550a0da5194554fd (diff)
Gizmo: report error when property isn't found
Also add assert so this doesn't go unnoticed, see: T69153
Diffstat (limited to 'source')
-rw-r--r--source/blender/windowmanager/gizmo/intern/wm_gizmo_target_props.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_target_props.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_target_props.c
index f5ae5427ac7..094fdf3f514 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_target_props.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_target_props.c
@@ -84,6 +84,7 @@ void WM_gizmo_target_property_def_rna_ptr(wmGizmo *gz,
/* if gizmo evokes an operator we cannot use it for property manipulation */
BLI_assert(gz->op_data == NULL);
+ BLI_assert(prop != NULL);
gz_prop->type = gz_prop_type;
@@ -101,6 +102,9 @@ void WM_gizmo_target_property_def_rna(
{
const wmGizmoPropertyType *gz_prop_type = WM_gizmotype_target_property_find(gz->type, idname);
PropertyRNA *prop = RNA_struct_find_property(ptr, propname);
+ if (prop == NULL) {
+ RNA_warning("%s: %s.%s not found", __func__, RNA_struct_identifier(ptr->type), propname);
+ }
WM_gizmo_target_property_def_rna_ptr(gz, gz_prop_type, ptr, prop, index);
}