Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_image/image_buttons.c
| Show First 20 Lines • Show All 723 Lines • ▼ Show 20 Lines | typedef struct RNAUpdateCb { | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| ImageUser *iuser; | ImageUser *iuser; | ||||
| } RNAUpdateCb; | } RNAUpdateCb; | ||||
| static void rna_update_cb(bContext *C, void *arg_cb, void *UNUSED(arg)) | static void rna_update_cb(bContext *C, void *arg_cb, void *UNUSED(arg)) | ||||
| { | { | ||||
| RNAUpdateCb *cb = (RNAUpdateCb *)arg_cb; | RNAUpdateCb *cb = (RNAUpdateCb *)arg_cb; | ||||
| /* ideally this would be done by RNA itself, but there we have | |||||
| * no image user available, so we just update this flag here */ | |||||
| cb->iuser->ok = 1; | |||||
| /* we call update here on the pointer property, this way the | /* we call update here on the pointer property, this way the | ||||
| * owner of the image pointer can still define its own update | * owner of the image pointer can still define its own update | ||||
| * and notifier */ | * and notifier */ | ||||
| RNA_property_update(C, &cb->ptr, cb->prop); | RNA_property_update(C, &cb->ptr, cb->prop); | ||||
| } | } | ||||
| static bool image_has_alpha(Image *ima, ImageUser *iuser) | static bool image_has_alpha(Image *ima, ImageUser *iuser) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 311 Lines • ▼ Show 20 Lines | void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, bool color_management) | ||||
| } | } | ||||
| if (imf->imtype == R_IMF_IMTYPE_DPX) { | if (imf->imtype == R_IMF_IMTYPE_DPX) { | ||||
| uiItemR(col, imfptr, "use_cineon_log", 0, NULL, ICON_NONE); | uiItemR(col, imfptr, "use_cineon_log", 0, NULL, ICON_NONE); | ||||
| } | } | ||||
| if (imf->imtype == R_IMF_IMTYPE_CINEON) { | if (imf->imtype == R_IMF_IMTYPE_CINEON) { | ||||
| #if 1 | #if 1 | ||||
| uiItemL(col, IFACE_("Hard coded Non-Linear, Gamma:1.7"), ICON_NONE); | uiItemL(col, TIP_("Hard coded Non-Linear, Gamma:1.7"), ICON_NONE); | ||||
| #else | #else | ||||
| uiItemR(col, imfptr, "use_cineon_log", 0, NULL, ICON_NONE); | uiItemR(col, imfptr, "use_cineon_log", 0, NULL, ICON_NONE); | ||||
| uiItemR(col, imfptr, "cineon_black", 0, NULL, ICON_NONE); | uiItemR(col, imfptr, "cineon_black", 0, NULL, ICON_NONE); | ||||
| uiItemR(col, imfptr, "cineon_white", 0, NULL, ICON_NONE); | uiItemR(col, imfptr, "cineon_white", 0, NULL, ICON_NONE); | ||||
| uiItemR(col, imfptr, "cineon_gamma", 0, NULL, ICON_NONE); | uiItemR(col, imfptr, "cineon_gamma", 0, NULL, ICON_NONE); | ||||
| #endif | #endif | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 249 Lines • Show Last 20 Lines | |||||