[Bf-blender-cvs] [0ffca8b7b3b] blender2.8: Fix gizmo poll function
Campbell Barton
noreply at git.blender.org
Fri Sep 7 23:19:00 CEST 2018
Commit: 0ffca8b7b3ba44027820588739e9b94288d0d79e
Author: Campbell Barton
Date: Sat Sep 8 07:27:29 2018 +1000
Branches: blender2.8
https://developer.blender.org/rB0ffca8b7b3ba44027820588739e9b94288d0d79e
Fix gizmo poll function
Missed cast switching to bool return type.
===================================================================
M source/blender/makesrna/intern/rna_nodetree.c
M source/blender/makesrna/intern/rna_ui.c
M source/blender/makesrna/intern/rna_wm_gizmo.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list