static int space_image_buffer_exists_poll(bContext *C)
{
SpaceImage *sima = CTX_wm_space_image(C);
- if (sima && sima->spacetype == SPACE_IMAGE)
- if (ED_space_image_has_buffer(sima))
- return 1;
- return 0;
+ if (sima && ED_space_image_has_buffer(sima)) {
+ return true;
+ }
+ return false;
}
static int image_not_packed_poll(bContext *C)
return ret;
}
- return 0;
+ return false;
}
+#if 0 /* UNUSED */
static int space_image_poll(bContext *C)
{
SpaceImage *sima = CTX_wm_space_image(C);
- if (sima && sima->spacetype == SPACE_IMAGE && sima->image)
- return 1;
- return 0;
+ if (sima && sima->image) {
+ return true;
+ }
+ return false;
}
+#endif
int space_image_main_area_poll(bContext *C)
{
SpaceImage *sima = CTX_wm_space_image(C);
- // XXX ARegion *ar = CTX_wm_region(C);
+ /* XXX ARegion *ar = CTX_wm_region(C); */
- if (sima)
- return 1; // XXX (ar && ar->type->regionid == RGN_TYPE_WINDOW);
-
- return 0;
+ if (sima) {
+ return true; /* XXX (ar && ar->type->regionid == RGN_TYPE_WINDOW); */
+ }
+ return false;
}
/* For IMAGE_OT_curves_point_set to avoid sampling when in uv smooth mode or editmode */