Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_image/image_buttons.c
| Show First 20 Lines • Show All 262 Lines • ▼ Show 20 Lines | static void image_panel_preview(ScrArea *sa, short cntrl) // IMAGE_HANDLER_PREVIEW | ||||
| int ofsx, ofsy; | int ofsx, ofsy; | ||||
| if (is_preview_allowed(sa) == 0) { | if (is_preview_allowed(sa) == 0) { | ||||
| rem_blockhandler(sa, IMAGE_HANDLER_PREVIEW); | rem_blockhandler(sa, IMAGE_HANDLER_PREVIEW); | ||||
| G.scene->r.scemode &= ~R_COMP_CROP; /* quite weak */ | G.scene->r.scemode &= ~R_COMP_CROP; /* quite weak */ | ||||
| return; | return; | ||||
| } | } | ||||
| block = uiBeginBlock(C, ar, __func__, UI_EMBOSS); | block = UI_block_begin(C, ar, __func__, UI_EMBOSS); | ||||
| uiPanelControl(UI_PNL_SOLID | UI_PNL_CLOSE | UI_PNL_SCALE | cntrl); | uiPanelControl(UI_PNL_SOLID | UI_PNL_CLOSE | UI_PNL_SCALE | cntrl); | ||||
| uiSetPanelHandler(IMAGE_HANDLER_PREVIEW); // for close and esc | uiSetPanelHandler(IMAGE_HANDLER_PREVIEW); // for close and esc | ||||
| ofsx = -150 + (sa->winx / 2) / sima->blockscale; | ofsx = -150 + (sa->winx / 2) / sima->blockscale; | ||||
| ofsy = -100 + (sa->winy / 2) / sima->blockscale; | ofsy = -100 + (sa->winy / 2) / sima->blockscale; | ||||
| if (uiNewPanel(C, ar, block, "Preview", "Image", ofsx, ofsy, 300, 200) == 0) return; | if (uiNewPanel(C, ar, block, "Preview", "Image", ofsx, ofsy, 300, 200) == 0) return; | ||||
| uiBlockSetDrawExtraFunc(block, preview_cb); | UI_but_func_drawextra_set(block, preview_cb); | ||||
| } | } | ||||
| #endif | #endif | ||||
| /* ********************* callbacks for standard image buttons *************** */ | /* ********************* callbacks for standard image buttons *************** */ | ||||
| static void ui_imageuser_slot_menu(bContext *UNUSED(C), uiLayout *layout, void *image_p) | static void ui_imageuser_slot_menu(bContext *UNUSED(C), uiLayout *layout, void *image_p) | ||||
| { | { | ||||
| uiBlock *block = uiLayoutGetBlock(layout); | uiBlock *block = uiLayoutGetBlock(layout); | ||||
| Image *image = image_p; | Image *image = image_p; | ||||
| int slot; | int slot; | ||||
| uiDefBut(block, LABEL, 0, IFACE_("Slot"), | uiDefBut(block, UI_BTYPE_LABEL, 0, IFACE_("Slot"), | ||||
| 0, 0, UI_UNIT_X * 5, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); | 0, 0, UI_UNIT_X * 5, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); | ||||
| uiItemS(layout); | uiItemS(layout); | ||||
| slot = IMA_MAX_RENDER_SLOT; | slot = IMA_MAX_RENDER_SLOT; | ||||
| while (slot--) { | while (slot--) { | ||||
| char str[64]; | char str[64]; | ||||
| if (image->render_slots[slot].name[0] != '\0') { | if (image->render_slots[slot].name[0] != '\0') { | ||||
| BLI_strncpy(str, image->render_slots[slot].name, sizeof(str)); | BLI_strncpy(str, image->render_slots[slot].name, sizeof(str)); | ||||
| } | } | ||||
| else { | else { | ||||
| BLI_snprintf(str, sizeof(str), IFACE_("Slot %d"), slot + 1); | BLI_snprintf(str, sizeof(str), IFACE_("Slot %d"), slot + 1); | ||||
| } | } | ||||
| uiDefButS(block, BUTM, B_NOP, str, 0, 0, | uiDefButS(block, UI_BTYPE_BUT_MENU, B_NOP, str, 0, 0, | ||||
| UI_UNIT_X * 5, UI_UNIT_X, &image->render_slot, (float) slot, 0.0, 0, -1, ""); | UI_UNIT_X * 5, UI_UNIT_X, &image->render_slot, (float) slot, 0.0, 0, -1, ""); | ||||
| } | } | ||||
| } | } | ||||
| static const char *ui_imageuser_layer_fake_name(RenderResult *rr) | static const char *ui_imageuser_layer_fake_name(RenderResult *rr) | ||||
| { | { | ||||
| if (rr->rectf) { | if (rr->rectf) { | ||||
| return IFACE_("Composite"); | return IFACE_("Composite"); | ||||
| Show All 20 Lines | static void ui_imageuser_layer_menu(bContext *UNUSED(C), uiLayout *layout, void *rnd_pt) | ||||
| int nr; | int nr; | ||||
| /* may have been freed since drawing */ | /* may have been freed since drawing */ | ||||
| rr = BKE_image_acquire_renderresult(scene, image); | rr = BKE_image_acquire_renderresult(scene, image); | ||||
| if (UNLIKELY(rr == NULL)) { | if (UNLIKELY(rr == NULL)) { | ||||
| return; | return; | ||||
| } | } | ||||
| uiBlockSetCurLayout(block, layout); | UI_block_layout_set_current(block, layout); | ||||
| uiLayoutColumn(layout, false); | uiLayoutColumn(layout, false); | ||||
| uiDefBut(block, LABEL, 0, IFACE_("Layer"), | uiDefBut(block, UI_BTYPE_LABEL, 0, IFACE_("Layer"), | ||||
| 0, 0, UI_UNIT_X * 5, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); | 0, 0, UI_UNIT_X * 5, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); | ||||
| uiItemS(layout); | uiItemS(layout); | ||||
| nr = BLI_countlist(&rr->layers) - 1; | nr = BLI_countlist(&rr->layers) - 1; | ||||
| fake_name = ui_imageuser_layer_fake_name(rr); | fake_name = ui_imageuser_layer_fake_name(rr); | ||||
| if (fake_name) { | if (fake_name) { | ||||
| BLI_strncpy(rl_fake.name, fake_name, sizeof(rl_fake.name)); | BLI_strncpy(rl_fake.name, fake_name, sizeof(rl_fake.name)); | ||||
| nr += 1; | nr += 1; | ||||
| } | } | ||||
| for (rl = rr->layers.last; rl; rl = rl->prev, nr--) { | for (rl = rr->layers.last; rl; rl = rl->prev, nr--) { | ||||
| final: | final: | ||||
| uiDefButS(block, BUTM, B_NOP, IFACE_(rl->name), 0, 0, | uiDefButS(block, UI_BTYPE_BUT_MENU, B_NOP, IFACE_(rl->name), 0, 0, | ||||
| UI_UNIT_X * 5, UI_UNIT_X, &iuser->layer, (float) nr, 0.0, 0, -1, ""); | UI_UNIT_X * 5, UI_UNIT_X, &iuser->layer, (float) nr, 0.0, 0, -1, ""); | ||||
| } | } | ||||
| if (fake_name) { | if (fake_name) { | ||||
| fake_name = NULL; | fake_name = NULL; | ||||
| rl = &rl_fake; | rl = &rl_fake; | ||||
| goto final; | goto final; | ||||
| } | } | ||||
| Show All 32 Lines | static void ui_imageuser_pass_menu(bContext *UNUSED(C), uiLayout *layout, void *ptrpair_p) | ||||
| /* may have been freed since drawing */ | /* may have been freed since drawing */ | ||||
| rr = BKE_image_acquire_renderresult(scene, image); | rr = BKE_image_acquire_renderresult(scene, image); | ||||
| if (UNLIKELY(rr == NULL)) { | if (UNLIKELY(rr == NULL)) { | ||||
| return; | return; | ||||
| } | } | ||||
| rl = BLI_findlink(&rr->layers, rpass_index); | rl = BLI_findlink(&rr->layers, rpass_index); | ||||
| uiBlockSetCurLayout(block, layout); | UI_block_layout_set_current(block, layout); | ||||
| uiLayoutColumn(layout, false); | uiLayoutColumn(layout, false); | ||||
| uiDefBut(block, LABEL, 0, IFACE_("Pass"), | uiDefBut(block, UI_BTYPE_LABEL, 0, IFACE_("Pass"), | ||||
| 0, 0, UI_UNIT_X * 5, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); | 0, 0, UI_UNIT_X * 5, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); | ||||
| uiItemS(layout); | uiItemS(layout); | ||||
| nr = (rl ? BLI_countlist(&rl->passes) : 0) - 1; | nr = (rl ? BLI_countlist(&rl->passes) : 0) - 1; | ||||
| fake_name = ui_imageuser_pass_fake_name(rl); | fake_name = ui_imageuser_pass_fake_name(rl); | ||||
| if (fake_name) { | if (fake_name) { | ||||
| BLI_strncpy(rpass_fake.name, fake_name, sizeof(rpass_fake.name)); | BLI_strncpy(rpass_fake.name, fake_name, sizeof(rpass_fake.name)); | ||||
| nr += 1; | nr += 1; | ||||
| } | } | ||||
| /* rendered results don't have a Combined pass */ | /* rendered results don't have a Combined pass */ | ||||
| for (rpass = rl ? rl->passes.last : NULL; rpass; rpass = rpass->prev, nr--) { | for (rpass = rl ? rl->passes.last : NULL; rpass; rpass = rpass->prev, nr--) { | ||||
| final: | final: | ||||
| uiDefButS(block, BUTM, B_NOP, IFACE_(rpass->name), 0, 0, | uiDefButS(block, UI_BTYPE_BUT_MENU, B_NOP, IFACE_(rpass->name), 0, 0, | ||||
| UI_UNIT_X * 5, UI_UNIT_X, &iuser->pass, (float) nr, 0.0, 0, -1, ""); | UI_UNIT_X * 5, UI_UNIT_X, &iuser->pass, (float) nr, 0.0, 0, -1, ""); | ||||
| } | } | ||||
| if (fake_name) { | if (fake_name) { | ||||
| fake_name = NULL; | fake_name = NULL; | ||||
| rpass = &rpass_fake; | rpass = &rpass_fake; | ||||
| goto final; | goto final; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | if (render_slot) { | ||||
| char str[64]; | char str[64]; | ||||
| if (image->render_slots[*render_slot].name[0] != '\0') { | if (image->render_slots[*render_slot].name[0] != '\0') { | ||||
| BLI_strncpy(str, image->render_slots[*render_slot].name, sizeof(str)); | BLI_strncpy(str, image->render_slots[*render_slot].name, sizeof(str)); | ||||
| } | } | ||||
| else { | else { | ||||
| BLI_snprintf(str, sizeof(str), IFACE_("Slot %d"), *render_slot + 1); | BLI_snprintf(str, sizeof(str), IFACE_("Slot %d"), *render_slot + 1); | ||||
| } | } | ||||
| but = uiDefMenuBut(block, ui_imageuser_slot_menu, image, str, 0, 0, wmenu1, UI_UNIT_Y, TIP_("Select Slot")); | but = uiDefMenuBut(block, ui_imageuser_slot_menu, image, str, 0, 0, wmenu1, UI_UNIT_Y, TIP_("Select Slot")); | ||||
| uiButSetFunc(but, image_multi_cb, rr, iuser); | UI_but_func_set(but, image_multi_cb, rr, iuser); | ||||
| uiButSetMenuFromPulldown(but); | UI_but_type_set_menu_from_pulldown(but); | ||||
| } | } | ||||
| if (rr) { | if (rr) { | ||||
| RenderPass *rpass; | RenderPass *rpass; | ||||
| int rpass_index; | int rpass_index; | ||||
| /* layer */ | /* layer */ | ||||
| fake_name = ui_imageuser_layer_fake_name(rr); | fake_name = ui_imageuser_layer_fake_name(rr); | ||||
| rpass_index = iuser->layer - (fake_name ? 1 : 0); | rpass_index = iuser->layer - (fake_name ? 1 : 0); | ||||
| rl = BLI_findlink(&rr->layers, rpass_index); | rl = BLI_findlink(&rr->layers, rpass_index); | ||||
| rnd_pt[2] = SET_INT_IN_POINTER(rpass_index); | rnd_pt[2] = SET_INT_IN_POINTER(rpass_index); | ||||
| display_name = rl ? rl->name : (fake_name ? fake_name : ""); | display_name = rl ? rl->name : (fake_name ? fake_name : ""); | ||||
| but = uiDefMenuBut(block, ui_imageuser_layer_menu, rnd_pt, display_name, 0, 0, wmenu2, UI_UNIT_Y, TIP_("Select Layer")); | but = uiDefMenuBut(block, ui_imageuser_layer_menu, rnd_pt, display_name, 0, 0, wmenu2, UI_UNIT_Y, TIP_("Select Layer")); | ||||
| uiButSetFunc(but, image_multi_cb, rr, iuser); | UI_but_func_set(but, image_multi_cb, rr, iuser); | ||||
| uiButSetMenuFromPulldown(but); | UI_but_type_set_menu_from_pulldown(but); | ||||
| /* pass */ | /* pass */ | ||||
| fake_name = ui_imageuser_pass_fake_name(rl); | fake_name = ui_imageuser_pass_fake_name(rl); | ||||
| rpass = (rl ? BLI_findlink(&rl->passes, iuser->pass - (fake_name ? 1 : 0)) : NULL); | rpass = (rl ? BLI_findlink(&rl->passes, iuser->pass - (fake_name ? 1 : 0)) : NULL); | ||||
| display_name = rpass ? rpass->name : (fake_name ? fake_name : ""); | display_name = rpass ? rpass->name : (fake_name ? fake_name : ""); | ||||
| but = uiDefMenuBut(block, ui_imageuser_pass_menu, rnd_pt, display_name, 0, 0, wmenu3, UI_UNIT_Y, TIP_("Select Pass")); | but = uiDefMenuBut(block, ui_imageuser_pass_menu, rnd_pt, display_name, 0, 0, wmenu3, UI_UNIT_Y, TIP_("Select Pass")); | ||||
| uiButSetFunc(but, image_multi_cb, rr, iuser); | UI_but_func_set(but, image_multi_cb, rr, iuser); | ||||
| uiButSetMenuFromPulldown(but); | UI_but_type_set_menu_from_pulldown(but); | ||||
| } | } | ||||
| } | } | ||||
| static void uiblock_layer_pass_arrow_buttons(uiLayout *layout, Image *image, RenderResult *rr, ImageUser *iuser, short *render_slot) | static void uiblock_layer_pass_arrow_buttons(uiLayout *layout, Image *image, RenderResult *rr, ImageUser *iuser, short *render_slot) | ||||
| { | { | ||||
| uiBlock *block = uiLayoutGetBlock(layout); | uiBlock *block = uiLayoutGetBlock(layout); | ||||
| uiLayout *row; | uiLayout *row; | ||||
| uiBut *but; | uiBut *but; | ||||
| const float dpi_fac = UI_DPI_FAC; | const float dpi_fac = UI_DPI_FAC; | ||||
| row = uiLayoutRow(layout, true); | row = uiLayoutRow(layout, true); | ||||
| if (rr == NULL || iuser == NULL) | if (rr == NULL || iuser == NULL) | ||||
| return; | return; | ||||
| if (BLI_listbase_is_empty(&rr->layers)) { | if (BLI_listbase_is_empty(&rr->layers)) { | ||||
| uiItemL(row, IFACE_("No Layers in Render Result"), ICON_NONE); | uiItemL(row, IFACE_("No Layers in Render Result"), ICON_NONE); | ||||
| return; | return; | ||||
| } | } | ||||
| /* decrease, increase arrows */ | /* decrease, increase arrows */ | ||||
| but = uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0, 0, 0.85f * UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Previous Layer")); | but = uiDefIconBut(block, UI_BTYPE_BUT, 0, ICON_TRIA_LEFT, 0, 0, 0.85f * UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Previous Layer")); | ||||
| uiButSetFunc(but, image_multi_declay_cb, rr, iuser); | UI_but_func_set(but, image_multi_declay_cb, rr, iuser); | ||||
| but = uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0, 0, 0.90f * UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Next Layer")); | but = uiDefIconBut(block, UI_BTYPE_BUT, 0, ICON_TRIA_RIGHT, 0, 0, 0.90f * UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Next Layer")); | ||||
| uiButSetFunc(but, image_multi_inclay_cb, rr, iuser); | UI_but_func_set(but, image_multi_inclay_cb, rr, iuser); | ||||
| uiblock_layer_pass_buttons(row, image, rr, iuser, 230 * dpi_fac, render_slot); | uiblock_layer_pass_buttons(row, image, rr, iuser, 230 * dpi_fac, render_slot); | ||||
| /* decrease, increase arrows */ | /* decrease, increase arrows */ | ||||
| but = uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0, 0, 0.85f * UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Previous Pass")); | but = uiDefIconBut(block, UI_BTYPE_BUT, 0, ICON_TRIA_LEFT, 0, 0, 0.85f * UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Previous Pass")); | ||||
| uiButSetFunc(but, image_multi_decpass_cb, rr, iuser); | UI_but_func_set(but, image_multi_decpass_cb, rr, iuser); | ||||
| but = uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0, 0, 0.90f * UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Next Pass")); | but = uiDefIconBut(block, UI_BTYPE_BUT, 0, ICON_TRIA_RIGHT, 0, 0, 0.90f * UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Next Pass")); | ||||
| uiButSetFunc(but, image_multi_incpass_cb, rr, iuser); | UI_but_func_set(but, image_multi_incpass_cb, rr, iuser); | ||||
| uiBlockEndAlign(block); | UI_block_align_end(block); | ||||
| } | } | ||||
| // XXX HACK! | // XXX HACK! | ||||
| // static int packdummy=0; | // static int packdummy=0; | ||||
| typedef struct RNAUpdateCb { | typedef struct RNAUpdateCb { | ||||
| PointerRNA ptr; | PointerRNA ptr; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| ▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | #define MAX_INFO_LEN 128 | ||||
| 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(layout, C, ptr, propname, "IMAGE_OT_new", "IMAGE_OT_open", NULL); | uiTemplateID(layout, C, ptr, propname, "IMAGE_OT_new", "IMAGE_OT_open", NULL); | ||||
| if (ima) { | if (ima) { | ||||
| uiBlockSetNFunc(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_INFO_LEN); | image_info(scene, iuser, ima, ibuf, str, MAX_INFO_LEN); | ||||
| BKE_image_release_ibuf(ima, ibuf, lock); | BKE_image_release_ibuf(ima, ibuf, lock); | ||||
| uiItemL(layout, ima->id.name + 2, ICON_NONE); | uiItemL(layout, ima->id.name + 2, ICON_NONE); | ||||
| uiItemL(layout, str, ICON_NONE); | uiItemL(layout, str, ICON_NONE); | ||||
| if (ima->type == IMA_TYPE_COMPOSITE) { | if (ima->type == IMA_TYPE_COMPOSITE) { | ||||
| // XXX not working yet | // XXX not working yet | ||||
| #if 0 | #if 0 | ||||
| iuser = ntree_get_active_iuser(scene->nodetree); | iuser = ntree_get_active_iuser(scene->nodetree); | ||||
| if (iuser) { | if (iuser) { | ||||
| uiBlockBeginAlign(block); | UI_block_align_begin(block); | ||||
| uiDefIconTextBut(block, BUT, B_SIMA_RECORD, ICON_REC, "Record", 10, 120, 100, 20, 0, 0, 0, 0, 0, ""); | uiDefIconTextBut(block, UI_BTYPE_BUT, B_SIMA_RECORD, ICON_REC, "Record", 10, 120, 100, 20, 0, 0, 0, 0, 0, ""); | ||||
| uiDefIconTextBut(block, BUT, B_SIMA_PLAY, ICON_PLAY, "Play", 110, 120, 100, 20, 0, 0, 0, 0, 0, ""); | uiDefIconTextBut(block, UI_BTYPE_BUT, B_SIMA_PLAY, ICON_PLAY, "Play", 110, 120, 100, 20, 0, 0, 0, 0, 0, ""); | ||||
| but = uiDefBut(block, BUT, B_NOP, "Free Cache", 210, 120, 100, 20, 0, 0, 0, 0, 0, ""); | but = uiDefBut(block, UI_BTYPE_BUT, B_NOP, "Free Cache", 210, 120, 100, 20, 0, 0, 0, 0, 0, ""); | ||||
| uiButSetFunc(but, image_freecache_cb, ima, NULL); | UI_but_func_set(but, image_freecache_cb, ima, NULL); | ||||
| if (iuser->frames) | if (iuser->frames) | ||||
| BLI_snprintf(str, sizeof(str), "(%d) Frames:", iuser->framenr); | BLI_snprintf(str, sizeof(str), "(%d) Frames:", iuser->framenr); | ||||
| else strcpy(str, "Frames:"); | else strcpy(str, "Frames:"); | ||||
| uiBlockBeginAlign(block); | UI_block_align_begin(block); | ||||
| uiDefButI(block, NUM, imagechanged, str, 10, 90, 150, 20, &iuser->frames, 0.0, MAXFRAMEF, 0, 0, "Number of images of a movie to use"); | uiDefButI(block, UI_BTYPE_NUM, imagechanged, str, 10, 90, 150, 20, &iuser->frames, 0.0, MAXFRAMEF, 0, 0, "Number of images of a movie to use"); | ||||
| uiDefButI(block, NUM, imagechanged, "StartFr:", 160, 90, 150, 20, &iuser->sfra, 1.0, MAXFRAMEF, 0, 0, "Global starting frame of the movie"); | uiDefButI(block, UI_BTYPE_NUM, imagechanged, "StartFr:", 160, 90, 150, 20, &iuser->sfra, 1.0, MAXFRAMEF, 0, 0, "Global starting frame of the movie"); | ||||
| } | } | ||||
| #endif | #endif | ||||
| } | } | ||||
| else if (ima->type == IMA_TYPE_R_RESULT) { | else if (ima->type == IMA_TYPE_R_RESULT) { | ||||
| /* browse layer/passes */ | /* browse layer/passes */ | ||||
| RenderResult *rr; | RenderResult *rr; | ||||
| /* use BKE_image_acquire_renderresult so we get the correct slot in the menu */ | /* use BKE_image_acquire_renderresult so we get the correct slot in the menu */ | ||||
| ▲ Show 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | #endif | ||||
| if (ima->gen_type == IMA_GENTYPE_BLANK) { | if (ima->gen_type == IMA_GENTYPE_BLANK) { | ||||
| uiItemR(layout, &imaptr, "generated_color", 0, NULL, ICON_NONE); | uiItemR(layout, &imaptr, "generated_color", 0, NULL, ICON_NONE); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| uiBlockSetNFunc(block, NULL, NULL, NULL); | UI_block_funcN_set(block, NULL, NULL, NULL); | ||||
| } | } | ||||
| MEM_freeN(cb); | MEM_freeN(cb); | ||||
| #undef MAX_INFO_LEN | #undef MAX_INFO_LEN | ||||
| } | } | ||||
| void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, int color_management) | void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, int color_management) | ||||
| ▲ Show 20 Lines • Show All 179 Lines • Show Last 20 Lines | |||||