def lr_detail(xmp, luminance, color): detail = {} if luminance or color: detail = xmp_get_lr_settings(xmp, LR_DETAIL) if luminance: detail.update(xmp_get_lr_settings(xmp, LR_DETAIL_LUMINANCE)) if color: detail.update(xmp_get_lr_settings(xmp, LR_DETAIL_COLOR)) return detail
def lr_effects(xmp, grain, vignette, dehaze): effects = xmp_get_lr_settings(xmp, LR_EFFECTS) if not dehaze: effects.pop('Dehaze') if grain: effects.update(xmp_get_lr_settings(xmp, LR_EFFECTS_GRAIN)) if vignette: effects.update(xmp_get_lr_settings(xmp, LR_EFFECTS_VIGNETTE)) if not grain and not vignette: effects.pop('EnableEffects') return effects
def lr_tone_curve(xmp): tc = get_tonecurve(xmp) lrt = xmp_get_lr_settings(xmp, LR_TONE_CURVE) for t in LR_ARRAY_TAGS: if tc[t]: lrt[t] = tc_format(tc[t]) return lrt
def lr_color(xmp, treatment, adjustments, saturation, vibrance): color = xmp_get_lr_settings(xmp, LR_COLOR) if not treatment: color.pop('ConvertToGrayscale') if not saturation: color.pop('Saturation') if not vibrance: color.pop('Vibrance') if adjustments: color.update(lr_color_adjustments(xmp)) else: color.pop('EnableColorAdjustments') return color
def lr_tone(xmp, exposure, contrast, highlights, shadows, white, black, clarity): tone = xmp_get_lr_settings(xmp, LR_TONE) if not exposure: tone.pop('Exposure2012') if not contrast: tone.pop('Contrast2012') if not highlights: tone.pop('Highlights2012') if not shadows: tone.pop('Shadows2012') if not white: tone.pop('Whites2012') if not black: tone.pop('Blacks2012') if not clarity: tone.pop('Clarity2012') return tone
def lr_white_balance(xmp): return xmp_get_lr_settings(xmp, LR_WHITE_BALANCE)
def lr_camera_calibration(xmp): return xmp_get_lr_settings(xmp, LR_CAMERA_CALIBRATION)
def lr_process_version(xmp): return xmp_get_lr_settings(xmp, LR_PROCESS_VERSION)
def lr_split_toning(xmp): return xmp_get_lr_settings(xmp, LR_SPLIT_TONING)
def lr_sharpening(xmp): return xmp_get_lr_settings(xmp, LR_SHARPENING)
def lr_color_adjustments(xmp): return xmp_get_lr_settings(xmp, LR_COLOR_ADJUSTMENTS)