layout exportPrefs { constant: zNameQuickExportCluster : '$$$/Prefs/Export/NameQuickExportSettings=Quick Export Format'; zNamePNGTransparency : '$$$/Prefs/Export/PNGTransparency=Transparency'; zConvertToSRGB : '$$$/Prefs/Export/ConvertToSRGB=Convert to sRGB'; zNameOptions : '$$$/Prefs/Export/Options=Options'; zQualitySliderFormat : '$$$/Prefs/Export/FormatString=100'; zQuality : '$$$/Prefs/Export/Quality=Quality'; zExportLocation : '$$$/Prefs/Export/ExportLocation=Quick Export Location'; zMetadata : '$$$/Prefs/Export/Metadata=Metadata'; zColorSpace : '$$$/Prefs/Export/ColorSpace=Color Space'; ZAsk : '$$$/Prefs/Export/Ask=Ask where to export each time'; ZSaveParent : '$$$/Prefs/Export/SaveParent=Export files to an assets folder next to the current document'; ZChange : '$$$/Prefs/Export/Change=Change...'; zNameSmallerPNG : '$$$/Prefs/Export/SmallerFile=Smaller File (8-bit)'; interface: defaultFileType : @PNG; metadataType : @None; unlink isTransparentPNG : false <== is8BitPNG ? true : isTransparentPNG; shouldConvertToSRGB: false; is8BitPNG : false; ZSaveTo : 'Placeholder -- see TExportPrefsView.cpp'; exportLocation : 1; result <== {fileType: defaultFileType, metadata: metadataType }; shouldShowSRGB <== any(defaultFileType, [@PNG, @JPG, @GIF]); view TExportPrefsView(identifier : @exportPrefs, placement : place_column, noGrowVertical : true, spacing : 10, qDebugDraw : false, horizontal: align_fill) { TCluster(identifier: @exportFileType, placement: place_row, horizontal: align_fill, margin : [ 30, 10, 10, 10 ], name: zNameQuickExportCluster, spacing: 15) { ZMenuPopup(uniqueID : true, width : 80, identifier : @fileTypePreference, horizontal : align_left, vertical : align_center, bind : @defaultFileType); TOptional(bind : @defaultFileType, child_horizontal : align_left, vertical : align_center, value: @PNG, horizontal: align_left, placement : place_row) { TCheckBox(name: zNamePNGTransparency, identifier: @PNGTransparency, bind: @isTransparentPNG, horizontal: align_fill); TCheckBox(name: zNameSmallerPNG, identifier: @PNG8Bit, bind: @is8BitPNG, horizontal: align_fill); } TOptional(bind : @defaultFileType, child_horizontal : align_left, horizontal: align_fill, vertical : align_center, value: @JPG, placement : place_row ) { TStaticText(name: zQuality, vertical : align_center); TPopupEditSlider(identifier : @exportJPGQuality, editClassName : 'TFixedPoint', editDisplayFormat : zQualitySliderFormat, editViewIdentifier : @exportJPGQualityEdit, sliderViewIdentifier : @exportJPGQualitySlider, horizontal : align_left, vertical : align_center, width : 80); } } TCluster( placement : place_column, horizontal: align_fill, name: zExportLocation, margin : [ 30, 10, 10, 10 ] ) { TRadio (name: ZAsk, identifier: @ExportAsk, bind: @exportLocation, trueValue: 3, horizontal: align_fill); TRadio (name: ZSaveParent, identifier: @exportParent, bind: @exportLocation, trueValue: 1, horizontal: align_fill); } TCluster( placement : place_column, horizontal: align_fill, name: zMetadata, margin : [ 30, 10, 10, 10 ] ) { ZMenuPopup(uniqueID : true, width : 225, identifier : @metadataPopup, horizontal : align_left, vertical : align_center, bind : @metadataType); } TOptional(bind : @shouldShowSRGB, child_horizontal : align_left, horizontal: align_fill, vertical : align_center, value: true, placement : place_row ){ TCluster( placement : place_column, horizontal: align_fill, name: zColorSpace, margin : [ 30, 10, 10, 10 ] ) { TCheckBox(name: zConvertToSRGB, identifier: @convertSRGB, bind: @shouldConvertToSRGB, horizontal: align_fill); } } } }