Mini Kabibi Habibi

Current Path : C:/Program Files/Adobe/Adobe Photoshop 2025/Required/layouts/Fill/Dialogs/
Upload File :
Current File : C:/Program Files/Adobe/Adobe Photoshop 2025/Required/layouts/Fill/Dialogs/skyReplacementDialog.eve

layout skyReplacementDialog
    {
    interface:
        enablePreview               : true;
        macintosh                   : true;
        windows                     : false <== !macintosh;

        skyShiftEdge                : 0;
        skyBorderSmoothness         : 100;
        skyBrightness               : 0;
        skyTemperature              : 0;
        skyScale                    : 100;
        skyFlip                     : false;

        /*
            colorOpacity                for SkyParams' fHarmonizationOpacity
            foregroundLightingOpacity   for SkyParams' fForegroundLightingOpacity
            edgeLightingOpacity         for SkyParams' fEdgeLightingOpacity
            edgeLightingVisible         for showing or hiding the edge lighting slider
        */
        colorOpacity                : 100;
        foregroundLightingOpacity   : 100;
        edgeLightingOpacity         : 100;
        edgeLightingVisible         : true;
        
        /*
            For the sliders involved in these views, it's best to let them default to open.
            This allows the layout to more fully resolve before the dialog opens and values
            are applied to the controls. The dialog code remembers and restores the last
            disclosure configuration anyway, and defines the default configuration.
        */
        discloseSkyOptions          : true;
        discloseForegroundOptions   : true;

    constant:
        zSkyToolTip             : '$$$/Dialog/SkyReplacement/ToolTip/Sky=Select replacement sky';
        zShiftEdgeToolTip       : '$$$/Dialog/SkyReplacement/ToolTip/ShiftEdge=Expand or contract sky and foreground boundary';
        zFadeEdgeToolTip        : '$$$/Dialog/SkyReplacement/ToolTip/FadeEdge=Soften sky and foreground boundary';
        zBrightnessToolTip      : '$$$/Dialog/SkyReplacement/ToolTip/Brightness=Control brightness of replacement sky';
        zTemperatureToolTip     : '$$$/Dialog/SkyReplacement/ToolTip/Temperature=Control how warm or cool colors appear in replacement sky';
        zScaleToolTip           : '$$$/Dialog/SkyReplacement/ToolTip/Scale=Adjust size of replacement sky';
        zFlipToolTip            : '$$$/Dialog/SkyReplacement/ToolTip/Flip=Flip replacement sky horizontally';
        zLightingModeToolTip    : '$$$/Dialog/SkyReplacement/ToolTip/LightingMode=Set blending mode for lighting adjustment';
        zColorAdjustmentToolTip : '$$$/Dialog/SkyReplacement/ToolTip/ColorAdjustment=Apply color harmonizing to foreground by controlling opacity values';
        zForegroundLightingToolTip : '$$$/Dialog/SkyReplacement/ToolTip/ForegroundLighting=Apply lighting adjustment to foreground by controlling opacity values';
        zEdgeLightingToolTip    : '$$$/Dialog/SkyReplacement/ToolTip/EdgeLighting=Preserve details along the edges and reduce halos by controlling opacity values';
        zOutputToToolTip        : '$$$/Dialog/SkyReplacement/ToolTip/OutputTo=Apply sky replacement to selected output';
        
        /* Only the sky move tool slot needs a tool tip here. The other tool slots take their tips from their respective tools. */
        zMoveToolButtonTip      : '$$$/Dialog/SkyReplacement/ToolTip/MoveTool=Sky Move Tool';

        zPreview                : '$$$/Dialog/SkyReplacement/Label/Preview=Preview';
        zPreviewTooltip         : '$$$/Dialog/SkyReplacement/ToolTip/EnablePreview=Enable preview';
        zOutput                 : '$$$/Dialog/SkyReplacement/Label/Output=Output';
        zOutputTo               : '$$$/Dialog/SkyReplacement/Label/OutputTo=Output To:';
        zDone                   : '$$$/ControlsStrings/OK=OK';
        zCancel                 : '$$$/ControlsStrings/Cancel=Cancel';
        kToolIconWidth          : 29;
        kToolIconHeight         : 30;
        kMaxOutputWidth         : 200; // REVISIT - define this value based on the string width
        kOutputWidth            : kMaxOutputWidth + 28;

        zSkyOptions             : '$$$/Dialog/SkyReplacement/Label/SkyOptions=Sky Adjustments';
        zSky                    : '$$$/Dialog/SkyReplacement/Label/Sky=Sky:';
        zShiftEdge              : '$$$/Dialog/SkyReplacement/Label/ShiftEdge=Shift Edge';
        zFadeEdge               : '$$$/Dialog/SkyReplacement/Label/FadeEdge=Fade Edge';
        zBrightness             : '$$$/Dialog/SkyReplacement/Label/Brightness=Brightness';
        zTemperature            : '$$$/Dialog/SkyReplacement/Label/Temperature=Temperature';
        zScale                  : '$$$/Dialog/SkyReplacement/Label/Scale=Scale';
        zFlip                   : '$$$/Dialog/SkyReplacement/Label/Flip=Flip';

        zForegroundOptions      : '$$$/Dialog/SkyReplacement/Label/ForegroundAdjustments=Foreground Adjustments';
        zColorAdjustment        : '$$$/Dialog/SkyReplacement/Label/ColorAdjustment=Color Adjustment';
        zForegroundLighting     : '$$$/Dialog/SkyReplacement/Label/ForegroundLighting=Foreground Lighting';
        zLightingMode           : '$$$/Dialog/SkyReplacement/Label/LightingMode=Lighting Mode:';
        zEdgeLighting           : '$$$/Dialog/SkyReplacement/Label/EdgeLighting=Edge Lighting';

        kSkyThumbnailWidth      : 150;
        kSkyThumbnailHeight     : 100;
        
        kSliderHeight           : 12;
        kSliderRadius           : 6;
        kLightingBlendModeWidth : 120;

    view TSkyReplacementDialog(
        name        : '$$$/Dialog/Title/SkyReplacement/SkyReplacement=Sky Replacement',
        placement   : place_row,
        margin      : 15,
        isResizable : false)
        {
        row (horizontal: align_fill, vertical: align_fill)
            {
            column(vertical: align_fill, child_horizontal: align_center, spacing: -1)
                {
                TTempSkyMoveToolSlot(
                    iconRootName : 'ToolMove',
                    identifier   : @moveTool,
                    tooltip      : zMoveToolButtonTip,
                    width        : kToolIconWidth,
                    height       : kToolIconHeight);

                TTempSkyMaskBrushToolSlot(
                    iconRootName : 'BrushSimpleSelection',
                    identifier   : @brushTool,
                    width        : kToolIconWidth,
                    height       : kToolIconHeight);
                
                TTempHandToolSlot(
                    iconRootName : 'ToolHand',
                    identifier   : @handTool,
                    width        : kToolIconWidth,
                    height       : kToolIconHeight);

                TTempZoomToolSlot(
                    iconRootName : 'ToolZoom',
                    identifier   : @zoomTool,
                    width        : kToolIconWidth,
                    height       : kToolIconHeight);
                    
                TIconSeriesView(
                    identifier : @spinner,
                    width      : 32,
                    height     : 32,
                    vertical   : align_bottom);
                }

            column(child_horizontal: align_fill, vertical: align_fill, spacing: gSpace)
                {
                TBevelViewDown (
                    placement           : place_column,
                    horizontal          : align_fill,
                    child_horizontal    : align_fill,
                    vertical            : align_fill,
                    spacing             : gSpace,
                    margin              : [12, 12, 18, 12])
                    {
                    row(horizontal: align_fill)
                        {
                        TStaticText(horizontal: align_left, vertical: align_center, name: zSky, tooltip: zSkyToolTip);
                        TSkyThumbnailView(identifier: @skyThumbnailView, horizontal: align_left, width: kSkyThumbnailWidth, height: kSkyThumbnailHeight);
                        }
                        
                    row(horizontal: align_fill)
                        {
                        THotText(horizontal: align_left, hotTextEditIdentifier: @skyShiftEdgeText, name: zShiftEdge, tooltip: zShiftEdgeToolTip);
                        TFixedPoint(identifier: @skyShiftEdgeText, horizontal: align_right, bind: @skyShiftEdge, maxChars: 4, minValue: -100, maxValue: 100, required: true, tooltip: zShiftEdgeToolTip);
                        }

                    TNewLookSliderSet(bind: @skyShiftEdge, horizontal: align_fill, height: kSliderHeight, minValue: -100, maxValue: 100, tooltip: zShiftEdgeToolTip);

                    row(horizontal: align_fill)
                        {
                        THotText(horizontal: align_left, hotTextEditIdentifier: @skyBorderSmoothnessText, name: zFadeEdge, tooltip: zFadeEdgeToolTip);
                        TFixedPoint(identifier: @skyBorderSmoothnessText, horizontal: align_right, bind: @skyBorderSmoothness, maxChars: 4, minValue: 0, maxValue: 100, required: true, tooltip: zFadeEdgeToolTip);
                        }

                    TNewLookSliderSet(bind: @skyBorderSmoothness, horizontal: align_fill, height: kSliderHeight, minValue: 0, maxValue: 100, tooltip: zFadeEdgeToolTip);

                    TDisclosureSeparator(name: zSkyOptions, bind: @discloseSkyOptions);

                    TOptional(bind: @discloseSkyOptions)
                        {
                        column(
                            horizontal   : align_fill,
                            margin       : [0, 13, 0, 0])
                            {
                            row(horizontal: align_fill)
                                {
                                THotText(horizontal: align_left, hotTextEditIdentifier: @skyBrightnessText, name: zBrightness, tooltip: zBrightnessToolTip);
                                TFixedPoint(identifier: @skyBrightnessText, horizontal: align_right, bind: @skyBrightness, maxChars: 4, minValue: -100, maxValue: 100, required: true, tooltip: zBrightnessToolTip);
                                }

                            TNewLookSliderSet(bind: @skyBrightness, horizontal: align_fill, height: kSliderHeight, minValue: -100, maxValue: 100, tooltip: zBrightnessToolTip);

                            row(horizontal: align_fill)
                                {
                                THotText(horizontal: align_left, hotTextEditIdentifier: @skyTemperatureText, name: zTemperature, tooltip: zTemperatureToolTip);
                                TFixedPoint(identifier: @skyTemperatureText, horizontal: align_right, bind: @skyTemperature, maxChars: 4, minValue: -100, maxValue: 100, required: true, tooltip: zTemperatureToolTip);
                                }

                            TNewLookSliderSet(identifier: @skyTemperatureSliderSet, bind: @skyTemperature, horizontal: align_fill, height: kSliderHeight, minValue: -100, maxValue: 100, track_type: @multiBandRamp, tooltip: zTemperatureToolTip);

                            row(horizontal: align_fill)
                                {
                                THotText(horizontal: align_left, hotTextEditIdentifier: @skyScaleText, name: zScale, tooltip: zScaleToolTip);
                                TFixedPoint(identifier: @skyScaleText, horizontal: align_right, bind: @skyScale, maxChars: 4, minValue: 50, maxValue: 400, required: true, tooltip: zScaleToolTip);
                                }

                            TNewLookSliderSet(identifier: @skyScaleSliderSet, bind: @skyScale, horizontal: align_fill, height: kSliderHeight, minValue: 50, maxValue: 400, tooltip: zScaleToolTip);

                            TCheckBox(
                                name        : zFlip,
                                bind        : @skyFlip,
                                tooltip     : zFlipToolTip);
                            }
                        }

                    TDisclosureSeparator(name: zForegroundOptions, bind: @discloseForegroundOptions);

                    TOptional(bind: @discloseForegroundOptions)
                        {
                        column(
                            horizontal       : align_fill,
                            child_horizontal : align_left,
                            vertical         : align_top,
                            spacing          : gSpace,
                            margin           : [0, 13, 0, 0])
                            {
                            row(horizontal: align_fill, child_vertical: align_center, spacing: gGap)
                                {
                                TStaticText(name : zLightingMode, tooltip: zLightingModeToolTip);

                                ZMenuPopup(
                                    uniqueID    : true,
                                    identifier  : @lightingBlendModePopup,
                                    width       : kLightingBlendModeWidth,
                                    horizontal  : align_fill,
                                    tooltip: zLightingModeToolTip);
                                }

                            row(horizontal: align_fill)
                                {
                                THotText(horizontal: align_left, hotTextEditIdentifier: @foregroundLightingText, name: zForegroundLighting, tooltip: zForegroundLightingToolTip);
                                TFixedPoint(identifier: @foregroundLightingText, horizontal: align_right, bind: @foregroundLightingOpacity, maxChars: 4, minValue: 0, maxValue: 100, required: true, tooltip: zForegroundLightingToolTip);
                                }

                            TNewLookSliderSet(bind: @foregroundLightingOpacity, horizontal: align_fill, height: kSliderHeight, minValue: 0, maxValue: 100, tooltip: zForegroundLightingToolTip);
                            
                            TOptional(
                                bind		: @edgeLightingVisible,
                                value		: true,
                                horizontal  : align_fill)
                                {
                                row(horizontal: align_fill)
                                    {
                                    THotText(horizontal: align_left, hotTextEditIdentifier: @edgeLightingText, name: zEdgeLighting, tooltip: zEdgeLightingToolTip);
                                    TFixedPoint(identifier: @edgeLightingText, horizontal: align_right, bind: @edgeLightingOpacity, maxChars: 4, minValue: 0, maxValue: 100, required: true, tooltip: zEdgeLightingToolTip);
                                    }
                                    
                                TNewLookSliderSet(bind: @edgeLightingOpacity, horizontal: align_fill, height: kSliderHeight, minValue: 0, maxValue: 100, tooltip: zEdgeLightingToolTip);
                                }

                            row(horizontal: align_fill)
                                {
                                THotText(horizontal: align_left, hotTextEditIdentifier: @colorAdjustmentText, name: zColorAdjustment, tooltip: zColorAdjustmentToolTip);
                                TFixedPoint(identifier: @colorAdjustmentText, horizontal: align_right, bind: @colorOpacity, maxChars: 4, minValue: 0, maxValue: 100, required: true, tooltip: zColorAdjustmentToolTip);
                                }

                            TNewLookSliderSet(bind: @colorOpacity, horizontal: align_fill, height: kSliderHeight, minValue: 0, maxValue: 100, tooltip: zColorAdjustmentToolTip);
                            }
                        }
                    }

                TCluster(
                    name             : zOutput,
                    placement        : place_column,
                    child_horizontal : align_left,
                    vertical         : align_bottom,
                    spacing          : gSpace)
                    {
                    row(horizontal: align_fill, child_vertical: align_center, spacing: gGap)
                        {
                        TStaticText(name : zOutputTo, tooltip: zOutputToToolTip);

                        ZMenuPopup(
                            uniqueID   : true,
                            identifier : @outputType,
                            width      : kOutputWidth,
                            horizontal : align_fill,
                            tooltip    : zOutputToToolTip);
                        }
                    }

                /* Button order for Macintosh only */
                TOptional(
                    bind             : @macintosh,
                    placement        : place_row,
                    vertical         : align_bottom,
                    spacing          : gSpace)
                    {
                    TCheckBox(
                        name        : zPreview,
                        tooltip     : zPreviewTooltip,
                        bind        : @enablePreview,
                        horizontal  : align_left);
                        
                    TView(horizontal: align_right, placement: place_row)
                        {
                        TButton(
                            name       : zCancel,
                            identifier : @cancel,
                            dismiss    : true);

                        TButton(
                            name       : zDone,
                            identifier : @ok,
                            dismiss    : true,
                            default    : true);
                        }
                    }

                /* Flip button order for Windows */
                TOptional(
                    bind             : @windows,
                    placement        : place_row,
                    vertical         : align_bottom,
                    spacing          : gSpace)
                    {
                    TCheckBox(
                        name        : zPreview,
                        tooltip     : zPreviewTooltip,
                        bind        : @enablePreview,
                        horizontal  : align_left);

                    TView(horizontal: align_right, placement: place_row)
                        {
                        TButton(
                            name       : zDone,
                            identifier : @ok,
                            dismiss    : true,
                            default    : true);

                        TButton(
                            name       : zCancel,
                            identifier : @cancel,
                            dismiss    : true);
                        }
                    }
                }
            }
        }
    }