From 0ffca8b7b3ba44027820588739e9b94288d0d79e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 8 Sep 2018 07:27:29 +1000 Subject: Fix gizmo poll function Missed cast switching to bool return type. --- source/blender/makesrna/intern/rna_nodetree.c | 2 +- source/blender/makesrna/intern/rna_ui.c | 2 +- source/blender/makesrna/intern/rna_wm_gizmo.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source') diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 1f0782cb7e3..3cc8bac13e2 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -552,7 +552,7 @@ static bool rna_NodeTree_poll(const bContext *C, bNodeTreeType *ntreetype) ParameterList list; FunctionRNA *func; void *ret; - int visible; + bool visible; RNA_pointer_create(NULL, ntreetype->ext.srna, NULL, &ptr); /* dummy */ func = &rna_NodeTree_poll_func; /* RNA_struct_find_function(&ptr, "poll"); */ diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index a271df464b7..9ea51247ed4 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -113,7 +113,7 @@ static bool panel_poll(const bContext *C, PanelType *pt) ParameterList list; FunctionRNA *func; void *ret; - int visible; + bool visible; RNA_pointer_create(NULL, pt->ext.srna, NULL, &ptr); /* dummy */ func = &rna_Panel_poll_func; /* RNA_struct_find_function(&ptr, "poll"); */ diff --git a/source/blender/makesrna/intern/rna_wm_gizmo.c b/source/blender/makesrna/intern/rna_wm_gizmo.c index c31e5825da0..4cb682df05d 100644 --- a/source/blender/makesrna/intern/rna_wm_gizmo.c +++ b/source/blender/makesrna/intern/rna_wm_gizmo.c @@ -623,7 +623,7 @@ static bool rna_gizmogroup_poll_cb(const bContext *C, wmGizmoGroupType *gzgt) ParameterList list; FunctionRNA *func; void *ret; - int visible; + bool visible; RNA_pointer_create(NULL, gzgt->ext.srna, NULL, &ptr); /* dummy */ func = &rna_GizmoGroup_poll_func; /* RNA_struct_find_function(&ptr, "poll"); */ @@ -633,7 +633,7 @@ static bool rna_gizmogroup_poll_cb(const bContext *C, wmGizmoGroupType *gzgt) gzgt->ext.call((bContext *)C, &ptr, func, &list); RNA_parameter_get_lookup(&list, "visible", &ret); - visible = *(int *)ret; + visible = *(bool *)ret; RNA_parameter_list_free(&list); -- cgit v1.2.3