Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_image/image_buttons.c
| Show First 20 Lines • Show All 839 Lines • ▼ Show 20 Lines | if (is_packed) { | ||||
| uiItemO(row, "", ICON_PACKAGE, "image.unpack"); | uiItemO(row, "", ICON_PACKAGE, "image.unpack"); | ||||
| } | } | ||||
| else { | else { | ||||
| uiItemO(row, "", ICON_UGLYPACKAGE, "image.pack"); | uiItemO(row, "", ICON_UGLYPACKAGE, "image.pack"); | ||||
| } | } | ||||
| 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); | |||||
| PropertyRNA *prop = RNA_struct_find_property(&imaptr, "filepath"); | |||||
Severin: `PropertyRNA *prop` is already declared above, so this [[ https://en.wikipedia. | |||||
| uiBlock *row_block = uiLayoutGetBlock(row); | |||||
SeverinUnsubmitted Not Done Inline ActionsAll sub-layouts share the same block, so no need to query it again. Just pass the existing block. Severin: All sub-layouts share the same block, so no need to query it again. Just pass the existing… | |||||
| uiDefAutoButR(row_block, &imaptr, prop, -1, "", ICON_NONE, 0, 0, 200, UI_UNIT_Y); | |||||
| uiItemO(row, "", ICON_FILEBROWSER, "image.browse"); | |||||
| uiItemO(row, "", ICON_FILE_REFRESH, "image.reload"); | uiItemO(row, "", ICON_FILE_REFRESH, "image.reload"); | ||||
| } | } | ||||
| /* Image layers and Info */ | /* Image layers and Info */ | ||||
| if (ima->source == IMA_SRC_GENERATED) { | if (ima->source == IMA_SRC_GENERATED) { | ||||
| uiItemS(layout); | uiItemS(layout); | ||||
| /* Generated */ | /* Generated */ | ||||
| ▲ Show 20 Lines • Show All 428 Lines • Show Last 20 Lines | |||||
PropertyRNA *prop is already declared above, so this shadows. Just do: