// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // Description: // Image format data. Ascii file which the user can modify // in order to add new image formats. // // IMPORTANT NOTES: // 1) The entry Targa_PAL_(tga) is repeated in $gImageFormatData // because it is a dummy entry that holds the place of the // divider in the menu. Its position is kept in // $gImageFormatDividerPosition. // 2) The special dpi value '0' signals that the dpi is unspecified. // When a preset with this value is chosen, it won't change the current dpi. // global float $gDefaultDpi = 72.000; // Position of menuItem divider between view formats and // print formats. global int $gImageFormatDividerPosition = 19; global string $gImageFormatData[] = { // name width height aspect ratio dpi // ------------------------------------------------- "320x240 320 240 1.333 72.000", "640x480 640 480 1.333 72.000", "1k_Square 1024 1024 1.000 72.000", "2k_Square 2048 2048 1.000 72.000", "3k_Square 3072 3072 1.000 72.000", "4k_Square 4096 4096 1.000 72.000", "CCIR_PAL/Quantel_PAL 720 576 1.333 72.000", "CCIR_601/Quantel_NTSC 720 486 1.333 72.000", "Full_1024 1024 768 1.333 72.000", "Full_1280/Screen 1280 1024 1.333 72.000", "HD_540 960 540 1.777 72.000", "HD_720 1280 720 1.777 72.000", "HD_1080 1920 1080 1.777 72.000", "NTSC_4d 646 485 1.333 72.000", "PAL_768 768 576 1.333 72.000", "PAL_780 780 576 1.333 72.000", "Targa_486_(tga) 512 486 1.333 72.000", "Targa_NTSC_(tga) 512 482 1.333 72.000", "Targa_PAL_(tga) 512 576 1.333 72.000", // NOTE: this is a dummy entry (see above) "Targa_PAL_(tga) 512 576 1.333 72.000", "Letter 2550 3300 0.773 300.000", "Legal 2550 4200 0.607 300.000", "Tabloid 5100 3300 1.545 300.000", "A4 2480 3508 0.707 300.000", "A3 3507 4962 0.707 300.000", "B5 2079 2952 0.704 300.000", "B4 2952 4170 0.708 300.000", "B3 4170 5907 0.706 300.000", "2\"x3\" 600 900 0.667 300.000", "4\"x6\" 1200 1800 0.667 300.000", "5\"x7\" 1500 2100 0.714 300.000", "8\"x10\" 2400 3000 0.800 300.000" }; global proc string imageFormats_melToUI (string $mel) { string $result = $mel; if($mel == "320x240"){ $result = (uiRes("m_imageFormats.kRes320")); } else if($mel == "640x480"){ $result = (uiRes("m_imageFormats.kRes640")); } else if($mel == "1k Square"){ $result = (uiRes("m_imageFormats.kSquare1k")); } else if($mel == "2k Square"){ $result = (uiRes("m_imageFormats.kSquare2k")); } else if($mel == "3k Square"){ $result = (uiRes("m_imageFormats.kSquare3k")); } else if($mel == "4k Square"){ $result = (uiRes("m_imageFormats.kSquare4k")); } else if($mel == "CCIR PAL/Quantel PAL"){ $result = (uiRes("m_imageFormats.kCCIRQuantelPAL")); } else if($mel == "CCIR 601/Quantel NTSC"){ $result = (uiRes("m_imageFormats.kCCIRQuantelNTSC")); } else if($mel == "Full 1024"){ $result = (uiRes("m_imageFormats.kFull1024")); } else if($mel == "Full 1280/Screen"){ $result = (uiRes("m_imageFormats.kFull1280")); } else if($mel == "HD 540"){ $result = (uiRes("m_imageFormats.kHD540")); } else if($mel == "HD 720"){ $result = (uiRes("m_imageFormats.kHD720")); } else if($mel == "HD 1080"){ $result = (uiRes("m_imageFormats.kHD1080")); } else if($mel == "NTSC 4d"){ $result = (uiRes("m_imageFormats.kNTSC4d")); } else if($mel == "PAL 768"){ $result = (uiRes("m_imageFormats.kPAL768")); } else if($mel == "PAL 780"){ $result = (uiRes("m_imageFormats.kPAL780")); } else if($mel == "Targa 486 (tga)"){ $result = (uiRes("m_imageFormats.kTarga486")); } else if($mel == "Targa NTSC (tga)"){ $result = (uiRes("m_imageFormats.kTargaNTSC")); } else if($mel == "Targa PAL (tga)"){ $result = (uiRes("m_imageFormats.kTargaPAL")); } else if($mel == "Letter"){ $result = (uiRes("m_imageFormats.kLetter")); } else if($mel == "Legal"){ $result = (uiRes("m_imageFormats.kLegal")); } else if($mel == "Tabloid"){ $result = (uiRes("m_imageFormats.kTabloid")); } else if($mel == "A4"){ $result = (uiRes("m_imageFormats.kA4")); } else if($mel == "A3"){ $result = (uiRes("m_imageFormats.kA3")); } else if($mel == "B5"){ $result = (uiRes("m_imageFormats.kB5")); } else if($mel == "B4"){ $result = (uiRes("m_imageFormats.kB4")); } else if($mel == "B3"){ $result = (uiRes("m_imageFormats.kB3")); } else if($mel == "2\"x3\""){ $result = (uiRes("m_imageFormats.kTwoxThree")); } else if($mel == "4\"x6\""){ $result = (uiRes("m_imageFormats.kFourxSix")); } else if($mel == "5\"x7\""){ $result = (uiRes("m_imageFormats.kFivexSeven")); } else if($mel == "8\"x10\""){ $result = (uiRes("m_imageFormats.kEightxTen")); } else{ uiToMelMsg( "imageFormats_melToUI", $mel, 0 ); } return $result; }