Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_image/image_buttons.c
| Show First 20 Lines • Show All 870 Lines • ▼ Show 20 Lines | void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, PointerRNA *userptr, bool compact, bool multiview) | ||||
| cb->iuser = iuser; | cb->iuser = iuser; | ||||
| uiLayoutSetContextPointer(layout, "edit_image", &imaptr); | uiLayoutSetContextPointer(layout, "edit_image", &imaptr); | ||||
| uiLayoutSetContextPointer(layout, "edit_image_user", userptr); | uiLayoutSetContextPointer(layout, "edit_image_user", userptr); | ||||
| if (!compact) { | if (!compact) { | ||||
| uiTemplateID( | uiTemplateID( | ||||
| layout, C, ptr, propname, | layout, C, ptr, propname, | ||||
| ima ? NULL : "IMAGE_OT_new", "IMAGE_OT_open", NULL, UI_TEMPLATE_ID_FILTER_ALL); | ima ? NULL : "IMAGE_OT_new", "IMAGE_OT_open", NULL, UI_TEMPLATE_ID_FILTER_ALL, false); | ||||
| } | } | ||||
| if (ima) { | if (ima) { | ||||
| UI_block_funcN_set(block, rna_update_cb, MEM_dupallocN(cb), NULL); | UI_block_funcN_set(block, rna_update_cb, MEM_dupallocN(cb), NULL); | ||||
| if (ima->source == IMA_SRC_VIEWER) { | if (ima->source == IMA_SRC_VIEWER) { | ||||
| ImBuf *ibuf = BKE_image_acquire_ibuf(ima, iuser, &lock); | ImBuf *ibuf = BKE_image_acquire_ibuf(ima, iuser, &lock); | ||||
| image_info(scene, iuser, ima, ibuf, str, MAX_IMAGE_INFO_LEN); | image_info(scene, iuser, ima, ibuf, str, MAX_IMAGE_INFO_LEN); | ||||
| ▲ Show 20 Lines • Show All 445 Lines • Show Last 20 Lines | |||||