diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-08-26 09:57:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-08-26 09:58:26 +0300 |
commit | abd1a2d07d677f0729acbe99de5d489d4ced6962 (patch) | |
tree | 16d8d2b15cc9bb07f41bca257ae6dc75141ac5ef /source/blender/windowmanager/gizmo | |
parent | db851c78b4b391e4ddeb3350550a0da5194554fd (diff) |
Gizmo: report error when property isn't found
Also add assert so this doesn't go unnoticed, see: T69153
Diffstat (limited to 'source/blender/windowmanager/gizmo')
-rw-r--r-- | source/blender/windowmanager/gizmo/intern/wm_gizmo_target_props.c | 4 |
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); } |