Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_image/image_buttons.c
| Show First 20 Lines • Show All 888 Lines • ▼ Show 20 Lines | if ((ima->source != IMA_SRC_GENERATED) && !no_filepath) { | ||||
| row = uiLayoutRow(row, true); | row = uiLayoutRow(row, true); | ||||
| uiLayoutSetEnabled(row, is_packed == false); | uiLayoutSetEnabled(row, is_packed == false); | ||||
| uiItemR(row, &imaptr, "filepath", 0, "", ICON_NONE); | uiItemR(row, &imaptr, "filepath", 0, "", ICON_NONE); | ||||
| uiItemO(row, "", ICON_FILE_REFRESH, "image.reload"); | uiItemO(row, "", ICON_FILE_REFRESH, "image.reload"); | ||||
| } | } | ||||
| /* Image layers and Info */ | /* Image layers and Info */ | ||||
| if (ima->type == IMA_TYPE_MULTILAYER && ima->rr) { | if (ima->source == IMA_SRC_GENERATED) { | ||||
| uiItemS(layout); | |||||
| const float dpi_fac = UI_DPI_FAC; | |||||
| uiblock_layer_pass_buttons(layout, ima, ima->rr, iuser, 230 * dpi_fac, NULL); | |||||
| } | |||||
| else if (ima->source == IMA_SRC_GENERATED) { | |||||
| uiItemS(layout); | uiItemS(layout); | ||||
| /* Generated */ | /* Generated */ | ||||
| uiLayout *col = uiLayoutColumn(layout, false); | uiLayout *col = uiLayoutColumn(layout, false); | ||||
| uiLayoutSetPropSep(col, true); | uiLayoutSetPropSep(col, true); | ||||
| uiLayout *sub = uiLayoutColumn(col, true); | uiLayout *sub = uiLayoutColumn(col, true); | ||||
| uiItemR(sub, &imaptr, "generated_width", 0, "X", ICON_NONE); | uiItemR(sub, &imaptr, "generated_width", 0, "X", ICON_NONE); | ||||
| uiItemR(sub, &imaptr, "generated_height", 0, "Y", ICON_NONE); | uiItemR(sub, &imaptr, "generated_height", 0, "Y", ICON_NONE); | ||||
| uiItemR(col, &imaptr, "use_generated_float", 0, NULL, ICON_NONE); | uiItemR(col, &imaptr, "use_generated_float", 0, NULL, ICON_NONE); | ||||
| uiItemS(col); | uiItemS(col); | ||||
| uiItemR(col, &imaptr, "generated_type", UI_ITEM_R_EXPAND, IFACE_("Type"), ICON_NONE); | uiItemR(col, &imaptr, "generated_type", UI_ITEM_R_EXPAND, IFACE_("Type"), ICON_NONE); | ||||
| if (ima->gen_type == IMA_GENTYPE_BLANK) { | if (ima->gen_type == IMA_GENTYPE_BLANK) { | ||||
| uiItemR(col, &imaptr, "generated_color", 0, NULL, ICON_NONE); | uiItemR(col, &imaptr, "generated_color", 0, NULL, ICON_NONE); | ||||
| } | } | ||||
| } | } | ||||
| else if (compact == 0) { | else if (compact == 0) { | ||||
| uiTemplateImageInfo(layout, C, ima, iuser); | uiTemplateImageInfo(layout, C, ima, iuser); | ||||
| } | } | ||||
| if (ima->type == IMA_TYPE_MULTILAYER && ima->rr) { | |||||
| uiItemS(layout); | |||||
| const float dpi_fac = UI_DPI_FAC; | |||||
| uiblock_layer_pass_buttons(layout, ima, ima->rr, iuser, 230 * dpi_fac, NULL); | |||||
| } | |||||
| if (BKE_image_is_animated(ima)) { | if (BKE_image_is_animated(ima)) { | ||||
| /* Animation */ | /* Animation */ | ||||
| uiItemS(layout); | uiItemS(layout); | ||||
| uiLayout *col = uiLayoutColumn(layout, true); | uiLayout *col = uiLayoutColumn(layout, true); | ||||
| uiLayoutSetPropSep(col, true); | uiLayoutSetPropSep(col, true); | ||||
| ▲ Show 20 Lines • Show All 384 Lines • Show Last 20 Lines | |||||