////////////////////////////////////////////////////////////////////// // // // Name: MATCH BOX 0.9.20 beta // // Author: Zach Gray // // Date: 09.21.2006 // // // // Email: zcgray@southern.edu // // Web: http://art.southern.edu/animation/matchbox // // Web: http://www.fourthdoor.com // // // // Copyright © 2007, Zach Gray // // // // This software is provided free, without restriction, for all // // non-commercial use. If you would like to use it for // // commercial purposes please contact me to receive a (usually // // free) license. // // // // // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" // // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND // // FITNESS fOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT // // SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY // // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED // // AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF // // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // // ////////////////////////////////////////////////////////////////////// // // // Description: // // Allows for matching, mirroring, or exchanging any control // // with another based on a reflection plane. // // // // Core development: Zach Gray // // UI: Aaron Adams/Zach Gray // // Reflect Matrix: Jeff Knox // // // // Thanks to Matt Schiller and Jesse Rademacher for testing, // // Matt Schiller and Aaron for ideas on workflow, Michael Hutchinson// // and Jeff Knox for earlier versions and programming assistance. // // Thanks to Hendel Butoy and the School of Visual Art and Design // // at Southern Adventist University. http://art.southern.edu/ // // // ////////////////////////////////////////////////////////////////////// // // // Installation: place file in script path and source // // // // Usage: matchBoxUI; // // // ////////////////////////////////////////////////////////////////////// //pending //make source = file when full release //add option vars //track down a miniscule descrepancy with +360 rotations //make sure this thing works with differing rotation orders, xyz/zyx WITH over rotations //find a way to generate world rotation table algorithmically //what if matching and destination has +360, should it apply, or ignore? Will it cause flipping? //determine which procs need to be local vs. global //check mac compatibilty (already know of several UI problems and windows only flags) //optimize array sizes [3] etc. //create transparencies for xpms to avoid issues with different schemes //make it easier to change flip axis for odd cases, (like matching hands with flipped widgets) //add manual hierarchy depth/processing order override ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // MAIN UI ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //test for existence of icons before running main proc ////////////////////// global proc matchBoxUI ////////////////////// (){ string $xpmDirectoryList[] = `xbmLangPathList`; string $iconList[] = { "matchBoxActionExchange.xpm", "matchBoxActionExchangeShelf.xpm", "matchBoxActionMatch.xpm", "matchBoxActionMatchShelf.xpm", "matchBoxActionMirror.xpm", "matchBoxActionMirrorShelf.xpm", "matchBoxLinkAttributes.xpm", "matchBoxLinkAttributesDisabled.xpm", "matchBoxPlane.xpm", "matchBoxWidget.xpm", "matchBoxWidgetDisabled.xpm"}; int $iconsNotExist = 0; string $missingIcons = ""; //string $missingIconList[]; for ($icon in $iconList){ int $iconExist=0; for ($directory in $xpmDirectoryList){ $iconExist += `filetest -f ($directory + "/" + $icon)`; } if (!$iconExist){ println ("//matchBox: Missing " + $icon + "!"); $iconsNotExist = 1; $missingIcons += ("\"" + $icon + "\", "); //$missingIconList = stringArrayCatenate({$icon},$missingIconList); } } if ($iconsNotExist){ if (`window -ex installIconsWindow`) deleteUI installIconsWindow; string $window = `window -t "Install MatchBox Icons" -menuBar false -s true -rtf true -tlb 1 installIconsWindow`; columnLayout -w 20 -h 20; text -l "Select icons directory:"; string $mirroPlaneColumns = `rowColumnLayout -nc 2 -cw 1 250 -cs 1 0 -cw 2 24 -cs 2 5`; string $directoryTextField = `textField -tx $xpmDirectoryList[0]`; string $browseSymbolButton = `symbolButton -image "fileOpen.xpm"`; setParent ..; text -vis 0; string $installButton = `button -en 1 -w 280 -label "Install MatchBox Icons"`; string $launchButton = `button -en 0 -w 280 -label "Launch MatchBox" -c ("matchBoxUI; deleteUI -window " + $window)`; button -w 280 -label "Close" -command ("deleteUI -window " + $window); button -e -c ("matchBox:launchDirectoryDialog " + $directoryTextField) $browseSymbolButton; int $iconListSize = size($missingIcons); string $missingIconList = `substring $missingIcons 1 ($iconListSize - 2)`; button -e -c ("matchBox:installIcons(\"" + $installButton + "\", \"" + $launchButton + "\", \"" + $directoryTextField + "\",{" + $missingIconList + "})") $installButton; showWindow $window; error ("Icons not installed properly. Install " + $missingIconList + " in your XMBLANGPATH"); } else matchboxUIiconCheck; } //main UI proc /////////////////////////////// global proc matchboxUIiconCheck /////////////////////////////// (){ string $matchboxUI; int $initalCollapseState = 1; if (`window -ex matchboxUI`) deleteUI matchboxUI; $matchboxUI = `window -t "Character MatchBox v0.9.20" -menuBar true -s true -rtf true -tlb 1 matchboxUI`; menu -l "Clear"; string $clearFieldsMenuItem = `menuItem -l "Reset Attribute Fields" -ann "Reset attribute selection fields" `; menuItem -l "Remove Connected" -ann "Remove widgets and widget pairs zzfrom selected controls" -c "matchBox:stripWidget(0)"; menuItem -l "Remove Attribute" -ann "Remove attribute: Select in channelBox on parent widget" -c matchBox:stripAttribute; menuItem -l "Remove All" -ann "Remove all widgets and reflect planes" -c "matchBox:stripWidget(1)"; menu -l "Advanced"; string $autoClearFieldsMenuItem = `menuItem -l "Auto Reset Attribute Fields" -checkBox false -ann "Automatic reset of attribute selection fields" `; string $zeroRotationsMenuItem = `menuItem -l "Zero Rotations" -checkBox false -ann "Zero rotations on controls before widget construction" `; string $disableFeedbackMenuItem = `menuItem -l "Disable Visual Feedback" -checkBox false -ann "(DANGER!) Auto hide widgets, disable creation of curves and annotations" `; menuItem -e -c ("matchBox:disableConfirm " + $disableFeedbackMenuItem) $disableFeedbackMenuItem; menu -l "Help" -helpMenu true; menuItem -l "Help on Character MatchBox..." -c matchBox:help; //Layout //string $frame = `frameLayout -mw 4 -mh 6 -bv 1 -bs "etchedOut" -lv 0`; string $mainColumn = `columnLayout`; //Reflection Plane Setup Frame string $reflectionSetupFrame = `frameLayout -mw 5 -mh 6 -w 230 -bv 1 -bs "etchedOut" -lv 1 -li 6 -l "Reflection Plane Setup" -cl $initalCollapseState -cll 1 -parent $mainColumn`; string $mirrorColumn = `columnLayout`; string $mirrorFrame = `frameLayout -bv 0 -lv 0`; string $mirroPlaneColumns = `rowColumnLayout -nc 3 -cw 1 65 -cs 1 0 -cw 2 16 -cs 2 5 -cw 3 122 -cs 3 3`; text -l "Name" -align "right"; string $nameCheckBox = `checkBox`; string $nameTextField = `textField -en 0 -tx "optional"`; checkBox -e -onCommand ("textField -edit -enable true -tx \"\"" + $nameTextField) $nameCheckBox; checkBox -e -offCommand ("textField -edit -enable false -tx \"optional\"" + $nameTextField) $nameCheckBox; string $planeFrame = `frameLayout -mh 6 -h 4 -bv 0 -lv 0`; string $planeOptionsColumn = `columnLayout -parent $mirrorColumn`; string $planeOrientation = `radioButtonGrp -numberOfRadioButtons 3 -label "Reflect Axis" -columnWidth 1 95 -columnWidth 2 42 -columnWidth 3 42 -labelArray3 "X" "Y" "Z" -select 1 -parent $mirrorColumn `; string $planeButtonFrame = `frameLayout -mh 6 -bv 0 -lv 0 -parent $mirrorColumn`; string $planeButtonColumn = `rowColumnLayout -nc 2 -cw 1 80 -cs 1 5 -cw 2 120 -cs 2 5 `; text -l "Create Plane" -align "right"; string $planeButton = `symbolButton -image "matchBoxPlane.xpm" -width 32 -height 32 -ann "Align bilateral to your character" `; //Widget Setup Frame string $widgetSetupFrame = `frameLayout -mw 5 -mh 6 -w 230 -li 6 -bv 1 -bs "etchedOut" -lv 1 -l "Widget Setup" -cl $initalCollapseState -cll 1 -parent $mainColumn`; string $widgetSetupColumn = `columnLayout`; string $existingPlaneFrame = `frameLayout -h 32 -bv 0 -lv 0`; string $exitingPlaneColumn = `rowColumnLayout -nc 2 -cw 1 24 -cs 1 61 -cw 2 120 -cs 2 5 `; //text -l "Plane" -align "right"; string $reflectPlaneGrabButton = `iconTextButton -image "selectObj.xpm" -width 24 -height 24 -style "iconOnly" reflectPlaneGrabButton`; string $reflectPlaneTextField = `textField -bgc 1 0 0 -ed 0 -en 0 -tx "select reflect plane"`; string $widgetOptionsColumns = `rowColumnLayout -nc 2 -cw 1 80 -cs 1 5 -cw 2 120 -cs 2 5 -parent $widgetSetupColumn `; text -l "Transforms" -align "right" -parent $widgetOptionsColumns; string $transformCheckBoxGrp = `checkBoxGrp -numberOfCheckBoxes 3 -columnWidth 1 40 -columnWidth 2 40 -columnWidth 3 40 -labelArray3 "Tx" "Rx" "Sx" -valueArray3 1 1 0 -parent $widgetOptionsColumns `; string $layerSetsFrame = `frameLayout -mh 8 -bv 0 -lv 0 -parent $widgetSetupColumn`; string $layerSetColumn = `rowColumnLayout -nc 3 -cw 1 65 -cs 1 0 -cw 2 16 -cs 2 5 -cw 3 122 -cs 3 3`; text -l "Layer" -align "right"; string $layerCheckBox = `checkBox -v 1`; string $newLayerTextField = `textField -en 1 -tx "widgetLayer" -ann "default name : widgetLayer"`; checkBox -e -onCommand ("textField -edit -enable true -tx \"\"" + $newLayerTextField) $layerCheckBox; checkBox -e -offCommand ("textField -edit -enable false -tx \"optional\"" + $newLayerTextField) $layerCheckBox; text -l "Set" -align "right"; string $setCheckBox = `checkBox -v 1`; string $newSetTextField = `textField -en 1 -tx "widgetSet" -ann "default name : widgetSet"`; checkBox -e -onCommand ("textField -edit -enable true -tx \"\"" + $newSetTextField) $setCheckBox; checkBox -e -offCommand ("textField -edit -enable false -tx \"optional\"" + $newSetTextField) $setCheckBox; setParent $widgetSetupColumn; string $scaleFloatSliderGrp = `floatSliderGrp -label "Scale" -field true -minValue .01 -maxValue 10.0 -fieldMinValue .01 -fieldMaxValue 100.0 -value 1 -cw 1 50 -cw 2 35 -cw 3 130 -cat 3 "both" 0`; //link attributes button string $widgetButtonColumn = `rowColumnLayout -nc 2 -cw 1 80 -cs 1 8 -cw 2 120 -cs 2 5 -parent $widgetSetupColumn `; text -l "Create Widget" -align "right"; string $createWidgetButton = `symbolButton -image "matchBoxWidgetDisabled.xpm" -width 32 -height 32 -en 1 -ann "Select a control, or pair or controls" `; window -e -h 10 -w 10 $matchboxUI; //scales window without deleting window prefs //Attribute Setup Frame string $attributeSetupFrame = `frameLayout -mw 5 -mh 6 -w 230 -li 6 -bv 1 -bs "etchedOut" -lv 1 -l "Attribute Setup" -cl $initalCollapseState -cll 1 -parent $mainColumn`; string $attributeSetupColumn = `columnLayout`; //source attribute frame string $sourceExistingAttrFrame = `frameLayout -h 52 -bv 1 -bs "etchedOut" -lv 0`; string $sourceExitingAttrColumn = `rowColumnLayout -nc 2 -cw 1 24 -cs 1 61 -cw 2 120 -cs 2 5 `; string $sourceWidgetGrabButton = `iconTextButton -image "selectObj.xpm" -width 24 -height 24 -style "iconOnly" sourceWidgetGrabButton`; string $sourceWidgetTextField = `textField -bgc 1 0 0 -ed 0 -en 0 -tx "select proc widget"`; string $sourceAttributeGrabButton = `iconTextButton -image "selectObj.xpm" -width 24 -height 24 -style "iconOnly" sourceAttributeGrabButton`; string $sourceAttributeTextField = `textField -bgc 1 0 0 -ed 0 -en 0 -tx "highlight attribute"`; setParent $attributeSetupColumn; string $sourceAttributeMelFrame = `frameLayout -mh 2 -bv 0 -lv 0`; string $sourceAttributeMelColumn = `rowColumnLayout -nc 3 -cw 1 65 -cs 1 3 -cw 2 16 -cs 2 5 -cw 3 122 -cs 3 3`; text -l "Custom Mel" -align "right"; string $sourceAttributeMelCheckBox = `checkBox`; string $sourceAttributeMelTextField = `textField -en 0 -tx "$v" -ann "default name : widgetLayer"`; checkBox -e -onCommand ("textField -edit -enable true -tx \"$v\"" + $sourceAttributeMelTextField) $sourceAttributeMelCheckBox; checkBox -e -offCommand ("textField -edit -enable false -tx \"$v\"" + $sourceAttributeMelTextField) $sourceAttributeMelCheckBox; //match attribute frame string $matchExistingAttrFrame = `frameLayout -h 52 -bv 1 -bs "etchedOut" -lv 0 -p $attributeSetupColumn`; string $matchExitingAttrColumn = `rowColumnLayout -nc 2 -cw 1 24 -cs 1 61 -cw 2 120 -cs 2 5 `; string $matchWidgetGrabButton = `iconTextButton -image "selectObj.xpm" -width 24 -height 24 -style "iconOnly" matchWidgetGrabButton`; string $matchWidgetTextField = `textField -bgc 1 0 0 -ed 0 -en 0 -tx "select proc widget"`; string $matchAttributeGrabButton = `iconTextButton -image "selectObj.xpm" -width 24 -height 24 -style "iconOnly" matchAttributeGrabButton`; string $matchAttributeTextField = `textField -bgc 1 0 0 -ed 0 -en 0 -tx "highlight attribute"`; string $matchAttributeMelFrame = `frameLayout -mh 2 -bv 0 -lv 0 -parent $attributeSetupColumn`; string $matchAttributeMelColumn = `rowColumnLayout -nc 3 -cw 1 65 -cs 1 3 -cw 2 16 -cs 2 5 -cw 3 122 -cs 3 3`; text -l "Custom Mel" -align "right"; string $matchAttributeMelCheckBox = `checkBox`; string $matchAttributeMelTextField = `textField -en 0 -tx "$v" -ann "default name : widgetLayer"`; checkBox -e -onCommand ("textField -edit -enable true -tx \"$v\"" + $matchAttributeMelTextField) $matchAttributeMelCheckBox; checkBox -e -offCommand ("textField -edit -enable false -tx \"$v\"" + $matchAttributeMelTextField) $matchAttributeMelCheckBox; //link attributes button string $attributeButtonColumn = `rowColumnLayout -nc 2 -cw 1 80 -cs 1 8 -cw 2 120 -cs 2 5 -parent $attributeSetupColumn `; text -l "Link Attributes" -align "right"; setParent $attributeButtonColumn; string $linkAttributeButton = `symbolButton -image "matchBoxLinkAttributesDisabled.xpm" -width 32 -height 32 -en 1 -ann "Select a pair of widgets and attributes" `; //Actions Frame string $actionFrame = `frameLayout -mw 5 -mh 6 -w 230 -li 6 -bv 1 -bs "etchedOut" -lv 1 -l "Actions" -cl 0 -cll 1 -parent $mainColumn`; string $actionColumn = `columnLayout`; string $actionButtonColumn = `rowColumnLayout -nc 3 -cw 1 47 -cs 1 5 -cw 2 32 -cs 2 0 -cw 3 120 -cs 2 8 -parent $actionColumn`; text -vis 0; text -l "shelf" -en 0 -fn "smallObliqueLabelFont" -h 6; text -l "Action" -en 1 -align "center" -h 6;; text -l "Mirror" -align "right"; string $mirrorShelfButton = `symbolButton -image "matchBoxActionMirrorShelf.xpm" -width 24 -height 32 `; string $mirrorButton = `symbolButton -image "matchBoxActionMirror.xpm" -width 24 -height 32 `; text -l "Match" -align "right"; string $matchShelfButton = `symbolButton -image "matchBoxActionMatchShelf.xpm" -width 24 -height 32 `; string $matchButton = `symbolButton -image "matchBoxActionMatch.xpm" -width 24 -height 32 `; text -l "Exchange" -align "right"; string $exchangeShelfButton = `symbolButton -image "matchBoxActionExchangeShelf.xpm" -width 24 -height 32 `; string $exchangeButton = `symbolButton -image "matchBoxActionExchange.xpm" -width 24 -height 32 `; text -vis false; text -vis false; text -vis false; text -l "Calculate" -align "right" -parent $actionButtonColumn; text -vis 0; string $calculateCheckBoxGrp1 = `checkBoxGrp -numberOfCheckBoxes 2 -columnWidth 1 68 -columnWidth 2 80 -labelArray2 "Translate" "Rotate" -valueArray2 1 1 -parent $actionButtonColumn `; text -vis 0; text -vis 0; string $calculateCheckBoxGrp2 = `checkBoxGrp -numberOfCheckBoxes 2 -columnWidth 1 68 -columnWidth 2 80 -labelArray2 "Scale" "Attr" -valueArray2 0 1 -parent $actionButtonColumn `; //dynamic resize commands string $resizeString[] = {$matchboxUI, $reflectionSetupFrame, $widgetSetupFrame, $attributeSetupFrame, $actionFrame}; string $resizeCommand = ( "{\"" + (stringArrayToString($resizeString, "\", \"")) + "\"}" ); frameLayout -e -cc ("matchBox:matchboxUIResize " + $resizeCommand) $reflectionSetupFrame; frameLayout -e -ec ("matchBox:matchboxUIResize " + $resizeCommand) $reflectionSetupFrame; frameLayout -e -cc ("matchBox:matchboxUIResize " + $resizeCommand) $widgetSetupFrame; frameLayout -e -ec ("matchBox:matchboxUIResize " + $resizeCommand) $widgetSetupFrame; frameLayout -e -cc ("matchBox:matchboxUIResize " + $resizeCommand) $attributeSetupFrame; frameLayout -e -ec ("matchBox:matchboxUIResize " + $resizeCommand) $attributeSetupFrame; frameLayout -e -cc ("matchBox:matchboxUIResize " + $resizeCommand) $actionFrame; frameLayout -e -ec ("matchBox:matchboxUIResize " + $resizeCommand) $actionFrame; window -e -rtf true $matchboxUI; //attribute setup command string $linkAttributeCommand; $linkAttributeCommand += ($sourceWidgetTextField + " "); $linkAttributeCommand += ($matchWidgetTextField + " "); $linkAttributeCommand += ($sourceAttributeTextField + " "); $linkAttributeCommand += ($matchAttributeTextField + " "); $linkAttributeCommand += ($sourceAttributeMelTextField + " "); $linkAttributeCommand += ($matchAttributeMelTextField + " "); $linkAttributeCommand += ($autoClearFieldsMenuItem); string $matchBoxWidgetGrabberCommand; $matchBoxWidgetGrabberCommand += ($linkAttributeButton + " "); $matchBoxWidgetGrabberCommand += ("\"" + $linkAttributeCommand + "\" "); $matchBoxWidgetGrabberCommand += ($sourceWidgetTextField + " "); $matchBoxWidgetGrabberCommand += ($sourceAttributeTextField + " "); $matchBoxWidgetGrabberCommand += ($matchWidgetTextField + " "); $matchBoxWidgetGrabberCommand += ($matchAttributeTextField); string $matchBoxAttributeGrabberCommand; $matchBoxAttributeGrabberCommand += ($linkAttributeButton + " "); $matchBoxAttributeGrabberCommand += ("\"" + $linkAttributeCommand + "\" "); $matchBoxAttributeGrabberCommand += ($sourceWidgetTextField + " "); $matchBoxAttributeGrabberCommand += ($sourceAttributeTextField + " "); $matchBoxAttributeGrabberCommand += ($matchWidgetTextField + " "); $matchBoxAttributeGrabberCommand += ($matchAttributeTextField); iconTextButton -e -c ("matchBox:widgetGrabber " + $sourceWidgetTextField + " " + $matchBoxWidgetGrabberCommand) $sourceWidgetGrabButton; iconTextButton -e -c ("matchBox:attributeGrabber " + $sourceAttributeTextField + " " + $matchBoxAttributeGrabberCommand) $sourceAttributeGrabButton; iconTextButton -e -c ("matchBox:widgetGrabber " + $matchWidgetTextField + " " + $matchBoxWidgetGrabberCommand) $matchWidgetGrabButton; iconTextButton -e -c ("matchBox:attributeGrabber " + $matchAttributeTextField + " " + $matchBoxAttributeGrabberCommand) $matchAttributeGrabButton; //button -e -c ("matchBox:doAttributeSetup " + $linkAttributeCommand) $linkAttributeButton; button -e -c ("warning \"matchBox: Select two widgets and attributes!\"") $linkAttributeButton; string $clearButtonCommand; $clearButtonCommand += ($sourceWidgetTextField + " "); $clearButtonCommand += ($matchWidgetTextField + " "); $clearButtonCommand += ($sourceAttributeTextField + " "); $clearButtonCommand += ($matchAttributeTextField + " "); $clearButtonCommand += ($linkAttributeButton); menuItem -e -c ("matchBox:clearAttributeFields " + $clearButtonCommand) $clearFieldsMenuItem; //widget setup command string $createWidgetCommand; $createWidgetCommand += ($reflectPlaneTextField + " "); $createWidgetCommand += ($transformCheckBoxGrp + " "); $createWidgetCommand += ($layerCheckBox + " "); $createWidgetCommand += ($newLayerTextField + " "); $createWidgetCommand += ($setCheckBox + " "); $createWidgetCommand += ($newSetTextField + " "); $createWidgetCommand += ($scaleFloatSliderGrp + " "); $createWidgetCommand += ($zeroRotationsMenuItem + " "); $createWidgetCommand += ($disableFeedbackMenuItem); iconTextButton -e -c ("matchBox:grabReflectPlane " + $reflectPlaneTextField + " " + $createWidgetButton + " \"" + $createWidgetCommand + "\"") $reflectPlaneGrabButton; //reflection plane command string $planeButtonCommand; $planeButtonCommand += ($nameCheckBox + " "); $planeButtonCommand += ($nameTextField + " "); $planeButtonCommand += ($planeOrientation); button -e -c ("matchBox:doCreateReflectPlane " + $planeButtonCommand + " " + $reflectPlaneTextField + " " + $createWidgetButton + " \"" + $createWidgetCommand + "\"") $planeButton; //widget creation button //button -e -c ("matchBox:doWidgetSetup " + $createWidgetCommand) $createWidgetButton; button -e -c ("warning \"matchBox: Select a reflect plane!\"") $createWidgetButton; //reflect setup command string $mirrorCommand; $mirrorCommand += ($calculateCheckBoxGrp1 + " "); $mirrorCommand += ($calculateCheckBoxGrp2); button -e -c ("matchBox:doReflectOptions " + $mirrorCommand + " \"mirror\"" + 0) $mirrorButton; button -e -c ("matchBox:doReflectOptions " + $mirrorCommand + " \"match\"" + 0) $matchButton; button -e -c ("matchBox:doReflectOptions " + $mirrorCommand + " \"exchange\"" + 0) $exchangeButton; button -e -c ("matchBox:doReflectOptions " + $mirrorCommand + " \"mirror\"" + 1) $mirrorShelfButton; button -e -c ("matchBox:doReflectOptions " + $mirrorCommand + " \"match\"" + 1) $matchShelfButton; button -e -c ("matchBox:doReflectOptions " + $mirrorCommand + " \"exchange\"" + 1) $exchangeShelfButton; showWindow $matchboxUI; } //matchboxUI; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // UI SUPPORT PROCS ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////// proc matchBox:help ///////////////////// (){ string $helpString = ""; $helpString += "\r\n"; $helpString += "GENERAL MATCHBOX 9.20 USAGE\r"; $helpString += "\r\n"; $helpString += " REFLECTION PLANE SETUP\r"; $helpString += " Create a reflection plane oriented to the bilateral \r"; $helpString += " symmetry line of your character. \r"; $helpString += "\r\n"; $helpString += " WIDGET SETUP\r"; $helpString += " Select the reflection plane to use with newly created widgets. \r"; $helpString += " Ceate different planes to correspond to different widgets\r"; $helpString += "\r\n"; $helpString += " Create single widgets or mirror/exchange pairs. \r"; $helpString += " Default setup names: widgetLayer; widgetSet;\r"; $helpString += "\r\n"; $helpString += " ATTRIBUTE SETUP\r"; $helpString += " Link attributes for matching. \r"; $helpString += " Attributes are processed in the order of the widget to \r"; $helpString += " which it is bound, then creation order. \r"; $helpString += "\r\n"; $helpString += " Select widgets, then highlight attributes in channel box.\r"; $helpString += " Attributes can be completely independant of the widget to \r"; $helpString += " which they are bound for processing. \r"; $helpString += "\r\n"; $helpString += " ACTIONS\r"; $helpString += " Select any combination and number of the following:\r"; $helpString += " Processed in hierarchy order, then select order. \r"; $helpString += "\r\n"; $helpString += " A: Controls (With widgets as children)\r"; $helpString += "\r\n"; $helpString += " B: Widgets\r"; $helpString += "\r\n"; $helpString += " C: Annotation Curves\r"; $helpString += "\r\n"; $helpString += " D: Reflection Planes (processes all connected widgets)\r"; $helpString += "\r\n"; $helpString += " E: Sets/Subsets (used for common combinations)\r"; $helpString += "\r\n"; $helpString += " Process / save to shelf: \r"; $helpString += "\r\n"; $helpString += " Mirror: Reflects single object or mirrors a pair\r"; $helpString += " across reflect plane.\r"; $helpString += " Match: Match the position of the FIRST object. \r"; $helpString += " Ignores single widgets & reflect plane. \r"; $helpString += " Widgets on separate characters to copy anim. \r"; $helpString += " Exchange: Swap match pairs across reflect plane.\r"; $helpString += "\r\n"; $helpString += " Calculate: Allows you to globally ignore transforms/attributes.\r"; $helpString += "\r\n"; $helpString += " Note to TD's: When you save to shelf, check command feedback.\r"; $helpString += "\r\n"; $helpString += " ADDITIONAL HELP\r"; $helpString += " Contact zcgray@southern.edu\r"; $helpString += "\r\n"; $helpString += " http://art.southern.edu/animation/matchbox\r"; $helpString += "\r\n"; $helpString += " Hover over selected controls for annotations.\r"; $helpString += "\r\n"; if (`window -q -exists matchBox:helpWindow`) deleteUI -window matchBox:helpWindow; string $windowName = `window -w 10 -h 10 matchBox:helpWindow`; columnLayout -columnAttach "both" 0 -columnWidth 600; scrollField -h 560 -wordWrap true -ip 0 -text $helpString -editable false; window -e -rtf true $windowName; showWindow $windowName; } ///////////////////////////////////// global proc matchBox:disableConfirm ///////////////////////////////////// (string $menuItem){ if (`menuItem -q -cb $menuItem`){ string $confirmDialog = `confirmDialog -title "Disable Feedback" -message "Disabling this removes the ability to check if widgets are built properly! \rDo this only if you have tested the controls previously!" -button "Ok" -button "Cancel" -defaultButton "Cancel" -cancelButton "Cancel" -dismissString "Cancel" `; if ($confirmDialog == "Cancel") menuItem -e -cb false $menuItem; } } ///////////////////////////////////// global proc matchBox:doReflectOptions ///////////////////////////////////// (string $calculateCheckBoxGrp1, string $calculateCheckBoxGrp2, string $reflectType, int $saveToShelf){ int $match = 0; int $mirror = 0; int $exchange = 0; switch ($reflectType){ case "match": $match = 1; break; case "mirror": $mirror = 1; break; case "exchange": $exchange = 1; break; } int $rotation = `checkBoxGrp -q -v2 $calculateCheckBoxGrp1`; int $translation = `checkBoxGrp -q -v1 $calculateCheckBoxGrp1`; int $scale = `checkBoxGrp -q -v1 $calculateCheckBoxGrp2`; int $attribute = `checkBoxGrp -q -v2 $calculateCheckBoxGrp2`; string $overlay; if ($saveToShelf){ string $result = `promptDialog -title "Save Command to Shelf" -message "Enter Overlay Name:" -button "OK" -button "Cancel" -defaultButton "OK" -cancelButton "Cancel" -dismissString "Canceled"`; if ($result == "OK") { $overlay = `promptDialog -query -text`; if ($overlay == "") $overlay = $reflectType; matchBox:doReflect($match,$mirror,$exchange,$rotation,$translation,$scale,$attribute,$saveToShelf,$overlay); }else{ error "matchBox: Save to Shelf Canceled"; } }else { string $command; $command += ("matchBox:doReflect("); $command += ($match + ","); $command += ($mirror + ","); $command += ($exchange + ","); $command += ($rotation + ","); $command += ($translation + ","); $command += ($scale + ","); $command += ($attribute + ","); $command += ($saveToShelf + ","); $command += ("\"" + $overlay + "\")"); eval($command); addToRecentCommandQueue $command "matchBox"; //matchBox:doReflect($match,$mirror,$exchange,$rotation,$translation,$scale,$attribute,$saveToShelf,$overlay); } } ////////////////////////////////////////// global proc matchBox:clearAttributeFields ////////////////////////////////////////// (string $sourceWidgetTextField, string $matchWidgetTextField, string $sourceAttributeTextField, string $matchAttributeTextField, string $linkAttributeButton){ string $sourceWidget = `textField -q -tx $sourceWidgetTextField`; string $matchWidget = `textField -q -tx $matchWidgetTextField`; string $sourceAttribute = `textField -q -tx $sourceAttributeTextField`; string $matchAttribute = `textField -q -tx $matchAttributeTextField`; textField -e -en 0 -tx "select proc widget" $sourceWidgetTextField; textField -e -en 0 -tx "select proc widget" $matchWidgetTextField; textField -e -en 0 -tx "highlight attribute" $sourceAttributeTextField; textField -e -en 0 -tx "highlight attribute" $matchAttributeTextField; symbolButton -e -c ("warning \"matchBox: Select two widgets and attributes!\"") -image "matchBoxLinkAttributesDisabled.xpm" $linkAttributeButton; } //////////////////////////////////////// global proc matchBox:doAttributeSetup //////////////////////////////////////// (string $sourceWidgetTextField, string $matchWidgetTextField, string $sourceAttributeTextField, string $matchAttributeTextField, string $sourceMelTextField, string $matchMelTextField, string $autoClearFieldsMenuItem){ string $sourceWidget = `textField -q -tx $sourceWidgetTextField`; string $matchWidget = `textField -q -tx $matchWidgetTextField`; string $sourceAttribute = `textField -q -tx $sourceAttributeTextField`; string $matchAttribute = `textField -q -tx $matchAttributeTextField`; string $sourceMel = `textField -q -tx $sourceMelTextField`; string $matchMel = `textField -q -tx $matchMelTextField`; int $clearFields = `menuItem -q -cb $autoClearFieldsMenuItem`; string $sourceEncodeMel = encodeString($sourceMel); string $matchEncodeMel = encodeString($matchMel); if ($clearFields){ textField -e -en 0 -tx "select proc widget" $sourceWidgetTextField; textField -e -en 0 -tx "select proc widget" $matchWidgetTextField; textField -e -en 0 -tx "highlight attribute" $sourceAttributeTextField; textField -e -en 0 -tx "highlight attribute" $matchAttributeTextField; } string $linkAttrCommand; $linkAttrCommand += ($sourceWidget + " "); $linkAttrCommand += ($matchWidget + " "); $linkAttrCommand += ($sourceAttribute + " "); $linkAttrCommand += ($matchAttribute + " "); $linkAttrCommand += ("\"" + $sourceEncodeMel + "\" "); $linkAttrCommand += ("\"" + $matchEncodeMel + "\""); //println ("matchBox:linkAttributeSetup " + $linkAttrCommand); eval("matchBox:linkAttributeSetup " + $linkAttrCommand); } /////////////////////////////////// global proc matchBox:doWidgetSetup /////////////////////////////////// (string $reflectPlaneTextField, string $transformsCheckBoxGrp, string $layerCheckBox, string $layerTextField, string $setCheckBox, string $setTextField, string $scaleFloatSliderGrp, string $zeroRotateMenuItem, string $disableFeedbackMenuItem){ string $reflectPlane = `textField -q -tx $reflectPlaneTextField`; int $processRotation = `checkBoxGrp -q -v2 $transformsCheckBoxGrp`; int $processTranslation = `checkBoxGrp -q -v1 $transformsCheckBoxGrp`; int $processScale = `checkBoxGrp -q -v3 $transformsCheckBoxGrp`; int $doLayer = `checkBox -q -v $layerCheckBox`; int $doSet = `checkBox -q -v $setCheckBox`; string $layer = `textField -q -tx $layerTextField`; string $set = `textField -q -tx $setTextField`; float $scale = `floatSliderGrp -q -v $scaleFloatSliderGrp`; int $doZeroRotate = `menuItem -q -cb $zeroRotateMenuItem`; int $disableFeedback = `menuItem -q -cb $disableFeedbackMenuItem`; if ($layer == "") $layer = "widgetLayer"; if ($set == "") $set = "widgetSet"; // matchBox:doBuildMatchWidget($reflectPlane,$processRotation,$processTranslation,$processScale,$doLayer,$doSet,$layer,$set,$scale,$doZeroRotate,$disableFeedback); string $command; $command += ("matchBox:doBuildMatchWidget("); $command += ("\"" + $reflectPlane +"\","); $command += ($processRotation +","); $command += ($processTranslation +","); $command += ($processScale +","); $command += ($doLayer +","); $command += ($doSet +","); $command += ("\"" + $layer +"\","); $command += ("\"" + $set +"\","); $command += ($scale +","); $command += ($doZeroRotate +","); $command += ($disableFeedback + ")"); eval($command); addToRecentCommandQueue $command "CreateWidget"; //repeatLast -ac $command -acl "CreateWidget"; } ////////////////////////////////// global proc matchBox:installIcons ////////////////////////////////// (string $installButton, string $launchButton, string $directoryTextField, string $missingIconList[]){ string $path = `textField -q -tx $directoryTextField`; for ($icon in $missingIconList){ matchBox:writeIcon($icon,$path); println ("//matchBox: Installed " + $icon); } button -e -en 1 $launchButton; button -e -en 0 $installButton; println "//matchBox: Installed Icons"; } /////////////////////////////////////////// global proc matchBox:launchDirectoryDialog /////////////////////////////////////////// (string $directoryTextField){ fileBrowserDialog -m 4 -fc ("matchBox:xpmPath \"" + $directoryTextField + "\"") -an "Select"; } ///////////////////////////// global proc matchBox:xpmPath ///////////////////////////// (string $directoryTextField, string $filepath, string $fileType){ textField -e -tx $filepath $directoryTextField; } //matchBox:writeIcon("example.xpm","C:/"); ////////////////////////////// global proc matchBox:writeIcon ////////////////////////////// (string $iconName, string $path){ int $xpmNameLength = size($iconName); string $xpmStringProc = `substring $iconName 1 ($xpmNameLength - 4)`; string $xpmData = eval($xpmStringProc); if (!endsWith($path, "/")){ $path += "/"; } // Print a string into a file $xpmFileName = ( $path + $iconName ); $fileId=`fopen $xpmFileName "w"`; fprint $fileId $xpmData; fclose $fileId; } //global proc addToRecentCommandQueue(string $cmd, string $label) //{ // repeatLast -ac $cmd -acl $label; //} ////////////////////////////////////// global proc matchBox:grabReflectPlane ////////////////////////////////////// (string $textField, string $createWidgetSymbolButton, string $createWidgetCommand){ string $selectedObjects[] = `ls -sl -type "transform"`; if (!size($selectedObjects) || (!size(`ls($selectedObjects[0] + ".reflectPlaneObject")`)) ) { textField -edit -en 0 -text "select reflect plane" $textField; symbolButton -edit -c ("warning \"Select a reflect plane!\"") -image "matchBoxWidgetDisabledClean.xpm" $createWidgetSymbolButton; warning ("matchBox: No valid plane selected, create in reflection plane setup"); return; } textField -edit -en 1 -text $selectedObjects[0] $textField; symbolButton -edit -c ("matchBox:doWidgetSetup " + $createWidgetCommand) -image "matchBoxWidget.xpm" $createWidgetSymbolButton; select -cl; } ////////////////////////////////////////// global proc matchBox:doCreateReflectPlane ////////////////////////////////////////// (string $nameBox, string $nameTextField, string $reflectAxisRadio, string $reflectPlaneTextField, string $createWidgetButton, string $createWidgetCommand){ int $nameBoxState = `checkBox -q -v $nameBox`; string $nameValue = `textField -q -tx $nameTextField`; int $reflectValue = `radioButtonGrp -q -select $reflectAxisRadio`; string $planeName; if ($nameBoxState) $planeName = $nameValue; else $planeName = "reflectPlane"; string $axis; switch ($reflectValue) { case 1: $axis = "x"; break; case 2: $axis = "y"; break; case 3: $axis = "z"; break; } matchBox:createReflectPlane($planeName,$axis); evalDeferred("matchBox:grabReflectPlane " + $reflectPlaneTextField + " " + $createWidgetButton + " \"" + $createWidgetCommand + "\""); } ////////////////////////////////// global proc matchBox:widgetGrabber ////////////////////////////////// (string $textField, string $linkAttributeButton, string $linkAttributeCommand, string $linkFields1, string $linkFields2, string $linkFields3, string $linkFields4){ string $selectedObjects[] = `ls -sl -type "transform"`; if (!size($selectedObjects)) { textField -e -en 0 -tx "select proc widget" $textField; error ("matchBox: No object selected"); symbolButton -e -c ("warning \"matchBox: Select two widgets and attributes!\"") -image "matchBoxLinkAttributesDisabled.xpm" $linkAttributeButton; error "matchBox: No object selected"; }else{ if (!`attributeExists "reflectPlane" $selectedObjects[0]`){ textField -e -en 0 -tx "select proc widget" $textField; error ("matchBox: " + $selectedObjects[0] + " not a matchBox:Widget!"); }else textField -e -en 1 -edit -text $selectedObjects[0] $textField; if (size($selectedObjects) > 1){ if (!`attributeExists "reflectPlane" $selectedObjects[1]`){ if ($textField != $linkFields1) textField -e -en 0 -tx "select proc widget" $linkFields1; if ($textField != $linkFields3) textField -e -en 0 -tx "select proc widget" $linkFields3; error ("matchBox: " + $selectedObjects[1] + " not a matchBox:Widget!"); }else{ textField -e -en 1 -edit -text $selectedObjects[0] $textField; if ($textField != $linkFields1) textField -e -en 1 -edit -text $selectedObjects[1] $linkFields1; if ($textField != $linkFields3) textField -e -en 1 -edit -text $selectedObjects[1] $linkFields3; } } int $field1 = `textField -q -en $linkFields1`; int $field2 = `textField -q -en $linkFields2`; int $field3 = `textField -q -en $linkFields3`; int $field4 = `textField -q -en $linkFields4`; int $fieldState = $field1 + $field2 + $field3 + $field4; if ($fieldState >= 4) symbolButton -e -c ("matchBox:doAttributeSetup " + $linkAttributeCommand) -image "matchBoxLinkAttributes.xpm" $linkAttributeButton; } } ///////////////////////////////////// global proc matchBox:attributeGrabber //////////////////////////////////// (string $textField, string $linkAttributeButton, string $linkAttributeCommand, string $linkFields1, string $linkFields2, string $linkFields3, string $linkFields4){ string $attrs[] = `selectedChannelBoxPlugs`; if (size($attrs)>2) warning "matchBox: More than two channels selected, others ignored"; if (size($attrs)>0){ textField -e -en 1 -edit -text $attrs[0] $textField; if (size($attrs)==2) if ($textField != $linkFields2) textField -e -en 1 -edit -text $attrs[1] $linkFields2; if ($textField != $linkFields4) textField -e -en 1 -edit -text $attrs[1] $linkFields4; int $field1 = `textField -q -en $linkFields1`; int $field2 = `textField -q -en $linkFields2`; int $field3 = `textField -q -en $linkFields3`; int $field4 = `textField -q -en $linkFields4`; int $fieldState = $field1 + $field2 + $field3 + $field4; if ($fieldState >= 4) symbolButton -e -c ("matchBox:doAttributeSetup " + $linkAttributeCommand) -image "matchBoxLinkAttributes.xpm" $linkAttributeButton; } else{ textField -e -en 0 -edit -text "highlight attribute" $textField; symbolButton -e -c ("warning \"matchBox: Select two widgets and attributes!\"") -image "matchBoxLinkAttributesDisabled.xpm" $linkAttributeButton; error "matchBox: No object/attribute highlighted. Highlight attributes in channel box"; } } //////////////////////////// global proc matchBox:grabber //////////////////////////// (string $textField){ string $selectedObjects[] = `ls -sl -type "transform"`; if (size($selectedObjects) > 1) {error "matchBox: More than one object selected";} if (size($selectedObjects) > 0) { if ((`textField -q -en $textField`) == 0) { textField -e -en 1 $textField; } if (!size($selectedObjects)) { error ("matchBox: No object selected"); return; } textField -edit -text $selectedObjects[0] $textField; } else error "matchBox: No object selected"; } ////////////////////////////////////// global proc matchBox:matchboxUIResize ////////////////////////////////////// (string $resizeList[]) { string $windowName = $resizeList[0]; string $paneList[] = stringArrayRemove({$windowName},$resizeList); int $sizeCounter; for ($pane in $paneList){ int $paneSize = `frameLayout -q -h $pane`; $sizeCounter += ($paneSize + 11); } window -e -h $sizeCounter $windowName; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // REFLECTION CORE ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///test junk //matchBox:doReflect 0 0 1 1 1 1 "fudgy"; //matchBox:doBuildMatchWidget reflectPlane 1 1 1 1 layer set; //matchBox:createReflectPlane "reflectPlane" x; ////////////////////////////// global proc matchBox:doReflect ////////////////////////////// (int $match, int $mirror, int $exchange, int $rotation, int $translation, int $scale, int $attribute, int $saveToShelf, string $overlay){ string $list[]; string $selection[] = `ls -sl`; $list = stringArrayCatenate($list, $selection); //expand all the sets for ($select in $selection){ //string $select = "set2"; if (`objectType -isType "objectSet" $select`){ select -add $select; //stupid workaround to list set contents string $setMemberList[] = `ls -sl`; $list = stringArrayCatenate($setMemberList, $list); $list = stringArrayRemove({$select},$list); } } $list = stringArrayRemoveDuplicates($list); //get the widgets string $widgetList[]; for ($object in $list){ if (`attributeExists "matchObject" $object`) { $widgetList = stringArrayCatenate($widgetList, {$object}); }else if (`attributeExists "widget" $object`) { string $connectedWidgets[]= `listConnections -d on -s on ($object + ".widget")`; //look for center curves connected to widgets AND reflect plane widgets if (size($connectedWidgets)) for ($connectedWidget in $connectedWidgets) $widgetList = stringArrayCatenate($widgetList, {$connectedWidget}); }else{ string $immediateChildren[] = `listRelatives -pa -type "transform" -c $object`; for ($child in $immediateChildren){ if (`attributeExists "matchObject" $child`) { $widgetList = stringArrayCatenate($widgetList, {$child}); } } } } $widgetList = stringArrayRemoveDuplicates($widgetList); //strip connected widgets for ($widget in $widgetList){ string $connectedWidget[]= `listConnections -d on -s on ($widget + ".matchObject")`; if (size($connectedWidget)) $widgetList = stringArrayRemove({$connectedWidget[0]},$widgetList); } string $sortedWidgetList[] = matchBox:hierarchyDepthSort($widgetList); //println ""; //println "Widget list:"; //print $sortedWidgetList; string $reflectType; if (!$saveToShelf) matchBox:reflect($match,$mirror,$exchange,$rotation,$translation,$scale,$attribute,$sortedWidgetList); else { string $iconName; if ($match){ $iconName = "matchBoxActionMatch.xpm"; $reflectType = "match"; }else if ($mirror){ $iconName = "matchBoxActionMirror.xpm"; $reflectType = "mirror"; }else if ($exchange){ $iconName = "matchBoxActionExchange.xpm"; $reflectType = "exchange"; } string $unwoundWidgetList = stringArrayToString($sortedWidgetList,"\",\""); string $shelfCommand = ("string $selection[] = `ls -sl`; matchBox:reflect(" + $match + "," + $mirror + "," + $exchange + "," + $rotation + "," + $translation + "," + $scale + "," + $attribute + ",{\"" + $unwoundWidgetList + "\"}); select -r $selection;" ); println ("//matchBox: Execution command: "+ $shelfCommand + " //" +$reflectType); matchBox:commandToShelf ($overlay, $iconName, $shelfCommand); } select -r -ne $selection; //restore selection... somehow the other code deselects during the rotate operations }//end proc matchBox:doReflect //////////////////////////// global proc matchBox:reflect //////////////////////////// (int $match, int $mirror, int $exchange, int $rotation, int $translation, int $scale, int $attribute, string $widgetList[]){ //widget verts to compare, cardan axis points. int $px = 46; int $py = 45; int $pz = 44; //setup output strings int $i = 0; string $objectList[]; vector $objectRotate[]; vector $objectTranslate[]; vector $objectScale[]; int $processObjectRotate[]; int $processObjectTranslate[]; int $processObjectScale[]; int $processWidgetAttributes[]; vector $overRotate[]; float $attributeValue[]; for ($widget in $widgetList){ string $reflectPlaneConn[]= `listConnections -d on -s on ($widget + ".reflectPlane")`; //the corresponding control thru the message attr string $reflectPlane = $reflectPlaneConn[0]; //find matching widget string $matchWidgets[]= `listConnections -d on -s on ($widget + ".matchObject")`; //the corresponding control thru the message attr string $matchWidget = $matchWidgets[0]; //if no matching widget source = destination if (!size($matchWidget)) $matchWidget = $widget; //get override attributes for p and r int $processRotation = `getAttr ($widget + ".processRotation")`; int $processTranslation = `getAttr ($widget + ".processTranslation")`; int $processScale = `getAttr ($widget + ".processScale")`; //get overries for attrs int $processAttributes = 0; if(attributeExists ("processAttributes", $widget)) $processAttributes = `getAttr ($widget + ".processAttributes")`; int $doRotation = $rotation; int $doTranslation = $translation; int $doScale = $scale; int $doAttributes = $attribute; //reset p and r based on overrides if ($rotation) $doRotation = $processRotation; if ($translation) $doTranslation = $processTranslation; if ($scale) $doScale = $processScale; if ($attribute) $doAttributes = $processAttributes; //might need to ad !$processRotation,Translate back in //get control names and over rotations string $sourceControl = matchBox:findWidgetControl($widget); vector $sourceOverRotate = matchBox:findOverRotation($sourceControl,$widget,$matchWidget); string $matchControl = matchBox:findWidgetControl($matchWidget); vector $matchOverRotate = matchBox:findOverRotation($matchControl,$widget,$matchWidget); //get world control translations for source and destination vector $sourcePosition = `xform -q -ws -rp $sourceControl`; vector $matchPosition = `xform -q -ws -rp $matchControl`; //get normalized point rotation positions for source and destination vector $sourceX = matchBox:normalizePoint($widget,$px); vector $sourceY = matchBox:normalizePoint($widget,$py); vector $sourceZ = matchBox:normalizePoint($widget,$pz); vector $matchX = matchBox:normalizePoint($matchWidget,$px); vector $matchY = matchBox:normalizePoint($matchWidget,$py); vector $matchZ = matchBox:normalizePoint($matchWidget,$pz); //get reflection matrix float $reflectNormal[] = matchBox:getNormal($reflectPlane); float $reflMatrix[] = matchBox:getReflect($reflectNormal); //get pivot offset vector $reflectPiv = `xform -q -ws -rp $reflectPlane`; //if match and target != source (this accounts for single objects, doing nothing) if ($match && $widget != $matchWidget){ $objectList[$i] = $matchControl; $processObjectRotate[$i] = 0; //this is for later in the list processing $processObjectTranslate[$i] = 0; $processObjectScale[$i] = 0; $processWidgetAttributes[$i] = 0; if ($doRotation){ $objectRotate[$i] = matchBox:matchRotation ($sourceX, $sourceY, $sourceZ, $widget, $matchWidget); //use raw point positions $overRotate[$i] = $sourceOverRotate; $processObjectRotate[$i] = 1; } if ($doTranslation){ $objectTranslate[$i] = $sourcePosition; $processObjectTranslate[$i] = 1; //xform -ws -rp ($sourcePosition.x) ($sourcePosition.y) ($sourcePosition.z) $matchControl; } if ($doScale){ $objectScale[$i] = matchBox:swapScaleValues($sourceControl,$widget,$matchWidget); $processObjectScale[$i] = 1; } if ($doAttributes){ //get the list string $attributeList[] = matchBox:getLinkAttributes($widget); int $a; for ($a = 0; $a < size($attributeList); $a+=4){ $i++; //list should read, source plug, dest plug, mel script float $attributeSourceValue = `getAttr $attributeList[$a]`; string $mel = $attributeList[$a+2]; float $processedValue = matchBox:processMelString($mel,$attributeSourceValue); $objectList[$i] = $attributeList[$a+1]; $attributeValue[$i] = $processedValue; $processWidgetAttributes[$i] = $attributeList[$a+3]; } } } //if mirror or reflect (this flips single objects even if source = dest if ($mirror || $exchange){ $objectList[$i] = $matchControl; $processObjectRotate[$i] = 0; //this is for later in the list processing $processObjectTranslate[$i] = 0; $processObjectTranslate[$i] = 0; $processWidgetAttributes[$i] = 0; //reflect target point positions if ($doRotation){ //get source direction vectors //above //flip source points vector $flipX = pointMatrixMult({($sourceX.x),($sourceX.y),($sourceX.z)}, $reflMatrix); vector $flipY = pointMatrixMult({($sourceY.x),($sourceY.y),($sourceY.z)}, $reflMatrix); vector $flipZ = pointMatrixMult({($sourceZ.x),($sourceZ.y),($sourceZ.z)}, $reflMatrix); //calculate inverted axes float $flipAxis[] = `getAttr ($widget + ".flipAxisInvert")`; $flipX = $flipX * $flipAxis[0]; $flipY = $flipY * $flipAxis[1]; $flipZ = $flipZ * $flipAxis[2]; //process flipped rotation $objectRotate[$i] = matchBox:matchRotation ($flipX, $flipY, $flipZ, $widget, $matchWidget); //use flipped positions $overRotate[$i] = $sourceOverRotate; $processObjectRotate[$i] = 1; } if ($doTranslation){ vector $flipControlSourcePosition = pointMatrixMult({($sourcePosition.x),($sourcePosition.y),($sourcePosition.z)}, $reflMatrix); vector $flipControlSourcePivot = pointMatrixMult({-($reflectPiv.x),-($reflectPiv.y),-($reflectPiv.z)}, $reflMatrix); vector $flipReflectOffsetPosition = $flipControlSourcePosition + $flipControlSourcePivot + $reflectPiv; //apply translation $objectTranslate[$i] = $flipReflectOffsetPosition; $processObjectTranslate[$i] = 1; //xform -ws -t ($flipReflectOffsetPosition.x) ($flipReflectOffsetPosition.y) ($flipReflectOffsetPosition.z) $matchControl; } if ($doScale){ $objectScale[$i] = matchBox:swapScaleValues($sourceControl,$widget,$matchWidget); $processObjectScale[$i] = 1; } if ($doAttributes){ //get the list string $attributeList[] = matchBox:getLinkAttributes($widget); int $a; for ($a = 0; $a < size($attributeList); $a+=4){ $i++; //list should read, source plug, dest plug, mel script float $attributeSourceValue = `getAttr $attributeList[$a]`; string $mel = $attributeList[$a+2]; float $processedValue = matchBox:processMelString($mel,$attributeSourceValue); $objectList[$i] = $attributeList[$a+1]; $attributeValue[$i] = $processedValue; $processWidgetAttributes[$i] = $attributeList[$a+3]; } } } //if reflect and target != source if ($exchange && $widget != $matchWidget){ $i++; $objectList[$i] = $sourceControl; $processObjectRotate[$i] = 0; //this is for later in the list processing $processObjectTranslate[$i] = 0; //reflect source point positions if ($doRotation){ //get target direction vectors //above //flip target points vector $flipX = pointMatrixMult({($matchX.x),($matchX.y),($matchX.z)}, $reflMatrix); vector $flipY = pointMatrixMult({($matchY.x),($matchY.y),($matchY.z)}, $reflMatrix); vector $flipZ = pointMatrixMult({($matchZ.x),($matchZ.y),($matchZ.z)}, $reflMatrix); //calculate inverted axes float $flipAxis[] = `getAttr ($matchWidget + ".flipAxisInvert")`; $flipX = $flipX * $flipAxis[0]; $flipY = $flipY * $flipAxis[1]; $flipZ = $flipZ * $flipAxis[2]; //process flipped rotation $objectRotate[$i] = matchBox:matchRotation ($flipX, $flipY, $flipZ, $matchWidget, $widget); //use flipped positions, change control order $overRotate[$i] = $matchOverRotate; $processObjectRotate[$i] = 1; } if ($doTranslation){ vector $flipControlSourcePosition = pointMatrixMult({($matchPosition.x),($matchPosition.y),($matchPosition.z)}, $reflMatrix); vector $flipControlSourcePivot = pointMatrixMult({-($reflectPiv.x),-($reflectPiv.y),-($reflectPiv.z)}, $reflMatrix); vector $flipReflectOffsetPosition = $flipControlSourcePosition + $flipControlSourcePivot + $reflectPiv; //apply translation $objectTranslate[$i] = $flipReflectOffsetPosition; $processObjectTranslate[$i] = 1; //xform -ws -t ($flipReflectOffsetPosition.x) ($flipReflectOffsetPosition.y) ($flipReflectOffsetPosition.z) $sourceControl; } if ($doScale){ $objectScale[$i] = matchBox:swapScaleValues($matchControl,$widget,$matchWidget); $processObjectScale[$i] = 1; } if ($doAttributes){ //get the list string $attributeList[] = matchBox:getLinkAttributes($matchWidget); int $a; for ($a = 0; $a < size($attributeList); $a+=4){ $i++; //list should read, source plug, dest plug, mel script float $attributeSourceValue = `getAttr $attributeList[$a]`; string $mel = $attributeList[$a+2]; float $processedValue = matchBox:processMelString($mel,$attributeSourceValue); $objectList[$i] = $attributeList[$a+1]; $attributeValue[$i] = $processedValue; $processWidgetAttributes[$i] = $attributeList[$a+3]; } } } $i++; }// end for in //process all that stuff in hierarchy order, after it's all calculated, so it doesn't go crazy matchBox:processTransforms ($objectList, $objectRotate, $objectTranslate, $objectScale, $processObjectRotate, $processObjectTranslate, $processObjectScale, $overRotate, $attributeValue, $processWidgetAttributes); }// end proc //in process transforms //if attribute //setattr object to matched float value /////////////////////////////////////// global proc matchBox:processTransforms /////////////////////////////////////// (string $objectList[], vector $objectRotate[], vector $objectTranslate[], vector $objectScale[], int $processObjectRotate[], int $processObjectTranslate[], int $processObjectScale[], vector $overRotate[], float $attributeValue[], int $processAttributes[]){ // println "ALL FREAKING OBJECTS"; // print $objectList; int $i; for ($i = 0; $i < size($objectList); $i++){ vector $oRotate = $objectRotate[$i]; vector $oTranslate = $objectTranslate[$i]; vector $oScale = $objectScale[$i]; vector $rotFactor = $overRotate[$i]; //over 360 rotation string $object = $objectList[$i]; println ("//matchBox: processing... " + $object); int $processRotate = $processObjectRotate[$i]; int $processTranslate = $processObjectTranslate[$i]; int $processScale = $processObjectScale[$i]; int $processAttr = $processAttributes[$i]; if ($processAttr){ string $attrLockedState[] = `listAttr -l $objectList[$i]`; if (size($attrLockedState)) warning "matchBox: Attribute locked! Unable to calculate. Disable attribute processing on widget"; else setAttr $objectList[$i] $attributeValue[$i]; } else { //check for locked attributes if( `objExists $object` ) { string $lockedAttributes[] = `listAttr -l $object`; int $lockedTranslation = 0; int $lockedRotation = 0; for ($attribute in $lockedAttributes){ if ($processRotate && $attribute == "rotateX" || $attribute == "rotateY" || $attribute == "rotateZ"){ $lockedRotation = 1; } if ($processTranslate && $attribute == "translateX" || $attribute == "translateY" || $attribute == "translateZ"){ $lockedTranslation = 1; } } if ($lockedTranslation) warning "matchBox: Translation locked! Unable to calculate. Disable translation processing on widget."; if ($lockedRotation) warning "matchBox: Rotation locked! Unable to calculate. Disable rotation processing on widget."; if ($processTranslate) move -rpr ($oTranslate.x) ($oTranslate.y) ($oTranslate.z) $object; if ($processRotate){ xform -ro 0 0 0 $object; xform -ws -ro ($oRotate.x) ($oRotate.y) ($oRotate.z) $object; rotate -r ($rotFactor.x*360) ($rotFactor.y*360) ($rotFactor.z*360) $object; //over 360 rotation } if ($processScale) scale -a ($oScale.x) ($oScale.y) ($oScale.z) $object; } } } println ("//matchBox: processing... complete"); } ///////////////////////////////////////// global proc vector matchBox:matchRotation ///////////////////////////////////////// (vector $targetPointX, vector $targetPointY, vector $targetPointZ, string $widget, string $matchWidget){ //setup axis vertices int $px = 46; int $py = 45; int $pz = 44; //get matchControl name string $matchControl = matchBox:findWidgetControl($matchWidget); vector $initalRotation = `getAttr ($matchControl + ".rotate")`; //check for locked attributes string $lockedAttributes[] = `listAttr -l $matchControl`; for ($attribute in $lockedAttributes){ if ($attribute == "rotateX" || $attribute == "rotateY" || $attribute == "rotateZ"){ //warning "Rotation locked! Unable to calculate. Disable rotation attribute on widget."; return $initalRotation; } } setAttr ($matchControl + ".rotate") 0 0 0; //zero rotations to get rid of any funky stuff //match X direction vectors vector $matchX = matchBox:normalizePoint($matchWidget,$px); vector $angleBetweenX = `angleBetween -euler -v1 ($matchX.x) ($matchX.y) ($matchX.z) -v2 ($targetPointX.x) ($targetPointX.y) ($targetPointX.z) `; rotate -r -ws ($angleBetweenX.x) ($angleBetweenX.y) ($angleBetweenX.z) $matchControl; //match Y direction vectors vector $matchY = matchBox:normalizePoint($matchWidget,$py); vector $angleBetweenY = `angleBetween -euler -v1 ($matchY.x) ($matchY.y) ($matchY.z) -v2 ($targetPointY.x) ($targetPointY.y) ($targetPointY.z) `; rotate -r -ws ($angleBetweenY.x) ($angleBetweenY.y) ($angleBetweenY.z) $matchControl; //match Z direction vectors vector $matchZ = matchBox:normalizePoint($matchWidget,$pz); vector $angleBetweenZ = `angleBetween -euler -v1 ($matchZ.x) ($matchZ.y) ($matchZ.z) -v2 ($targetPointZ.x) ($targetPointZ.y) ($targetPointZ.z) `; rotate -r -ws ($angleBetweenZ.x) ($angleBetweenZ.y) ($angleBetweenZ.z) $matchControl; //new over rotation implementation does this in another proc //get rotation to pass back to proc vector $finalObjRotation = `xform -q -ws -ro $matchControl`; setAttr ($matchControl + ".rotate") ($initalRotation.x) ($initalRotation.y) ($initalRotation.z); return $finalObjRotation; } ////////////////////////////////// /////////////////////////////////////////// global proc float matchBox:processMelString /////////////////////////////////////////// (string $melCode, float $incomingVal){ string $variableCommand = ("float $v = " + $incomingVal + "; float $processedValue = (float)" + $melCode + ";"); float $newValue = `eval{$variableCommand}`; return $newValue; } //////////////////////////////////////////// global proc vector matchBox:swapScaleValues //////////////////////////////////////////// (string $control, string $widget, string $matchWidget){ vector $sourceRotation = `xform -q -r -s $control`; //get axes to calc inverted axes and +360 rotations string $sourceWorldRotAxis[] = `getAttr ($widget + ".worldRotation")`; //read the attrs created in worldLocalEulerOffsetTable string $matchInverseWorldRotAxis[] = `getAttr ($matchWidget + ".inverseWorldRotation")`;//read attrs created in matchBox:findInverseWorldRotation and buildWidget //swap axes to account for +360 rotations vector $sourceSwap = `matchBox:swapRotationAxes {"x","y","z"} $sourceWorldRotAxis {$sourceRotation.x,$sourceRotation.y,$sourceRotation.z}`; //euler cardan swap into inverse destintation vector $rotFactor = `matchBox:swapRotationAxes {"x","y","z"} $matchInverseWorldRotAxis {$sourceSwap.x,$sourceSwap.y,$sourceSwap.z}`; //swap rotation channels to local return $rotFactor; } //////////////////////////////////////////// global proc vector matchBox:findOverRotation //////////////////////////////////////////// (string $control, string $widget, string $matchWidget){ vector $sourceRotation = `xform -q -ro $control`; //calculate rotations over 360 degrees, use int to round down int $rotationFactorX = $sourceRotation.x / 360; int $rotationFactorY = $sourceRotation.y / 360; int $rotationFactorZ = $sourceRotation.z / 360; //convert to floats so can be passed back as single vector float $rotFactorX = $rotationFactorX; float $rotFactorY = $rotationFactorY; float $rotFactorZ = $rotationFactorZ; //println ("Over rotation factor for " + $control); //println $rotFactorX; println $rotFactorY; println $rotFactorZ; vector $overRotation = <<$rotFactorX,$rotFactorY,$rotFactorZ>>; //get axes to calc inverted axes and +360 rotations string $sourceWorldRotAxis[] = `getAttr ($widget + ".worldRotation")`; //read the attrs created in worldLocalEulerOffsetTable string $matchInverseWorldRotAxis[] = `getAttr ($matchWidget + ".inverseWorldRotation")`;//read attrs created in matchBox:findInverseWorldRotation and buildWidget //swap axes to account for +360 rotations vector $sourceSwap = `matchBox:swapRotationAxes {"x","y","z"} $sourceWorldRotAxis {$overRotation.x,$overRotation.y,$overRotation.z}`; //euler cardan swap into inverse destintation vector $rotFactor = `matchBox:swapRotationAxes {"x","y","z"} $matchInverseWorldRotAxis {$sourceSwap.x,$sourceSwap.y,$sourceSwap.z}`; //swap rotation channels to local return $rotFactor; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // HIERARCHY SORT PROCS ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /* string $testWidgetSort[] = { "head_reflectionWidget", "back_reflectionWidget", "L_hand_reflectionWidget", "chest_head_reflectionWidget", "hips_reflectionWidget", "chest_reflectionWidget"}; matchBox:hierarchyDepthSort($testWidgetSort); */ ///////////////////////////////////// global proc string[] matchBox:hierarchyDepthSort ///////////////////////////////////// (string $widgetList[]){ //string $widgetList[] = $processList; string $sortList[] = {}; for ($widget in $widgetList){ if (objExists($widget)){ int $depth = matchBox:hierarchyDepth($widget,0); //do padding so proper sort order string $padDepth; if ($depth < 10) $padDepth = ("000" + $depth); else if ($depth < 100) $padDepth = ("00" + $depth); else if ($depth < 1000) $padDepth = ("0" + $depth); else if ($depth < 10000) $padDepth = ($depth); string $prefixWidget = ("-%" + $padDepth + "%-" + $widget); $sortList = stringArrayCatenate({$prefixWidget},$sortList); } } $sortedList = sort($sortList); string $sortListClean[] = {}; string $sorted; for($sorted in $sortedList){ //print ($sorted + "\n"); string $regularExpr = "-%.*%-"; string $clean = `substitute $regularExpr $sorted ""`; //print ($clean + "\n"); $sortListClean = stringArrayCatenate($sortListClean,{$clean}); } return $sortListClean; } // end hierarchy DepthSort /////////////////////////////////////// global proc int matchBox:hierarchyDepth /////////////////////////////////////// (string $object, int $depth){ while ($object != matchBox:traceConstraintParent($object) ){ $object = matchBox:traceConstraintParent($object); $depth++; } string $parent[] = `listRelatives -p $object`; if (!size($parent)) return $depth; $depth++; return(matchBox:hierarchyDepth($parent[0],$depth)); } ///////////////////////////////////////////////// global proc string matchBox:traceConstraintParent ///////////////////////////////////////////////// (string $object){ //list connections on translate, rotate shouldn't matter since it's absolute string $transConnections[] = {}; string $transConnectionsX[] = `listConnections -scn true -destination false -source true ($object + ".translateX")`; string $transConnectionsY[] = `listConnections -scn true -destination false -source true ($object + ".translateY")`; string $transConnectionsZ[] = `listConnections -scn true -destination false -source true ($object + ".translateZ")`; string $rotConnectionsX[] = `listConnections -scn true -destination false -source true ($object + ".rotateX")`; string $rotConnectionsY[] = `listConnections -scn true -destination false -source true ($object + ".rotateY")`; string $rotConnectionsZ[] = `listConnections -scn true -destination false -source true ($object + ".rotateZ")`; $transConnections = stringArrayCatenate($transConnectionsX,$transConnections); $transConnections = stringArrayCatenate($transConnectionsY,$transConnections); $transConnections = stringArrayCatenate($transConnectionsZ,$transConnections); $transConnections = stringArrayCatenate($rotConnectionsX,$transConnections); $transConnections = stringArrayCatenate($rotConnectionsY,$transConnections); $transConnections = stringArrayCatenate($rotConnectionsZ,$transConnections); $transConnections = stringArrayRemoveDuplicates($transConnections); string $returnString = $object; if (size($transConnections)){ //for ($connected in $transConnections){ string $connected = $transConnections[0]; //check to see if type is parent or point //string $connected = "pSphere1_pointConstraint1"; if (`objectType -isType "pointConstraint" $connected` || `objectType -isType "parentConstraint" $connected` ){ int $weightListSize = `getAttr -size ($connected + ".target")`; //find the biggest weight in the weight list //compare each item to every other item, and see if the previous larger is still bigest int $targetIndex = 0; float $targetWeight = `getAttr ($connected + ".target[0].targetWeight")`; int $i; for ($i = 1; $i < $weightListSize; $i++){ float $compareWeight = `getAttr ($connected + ".target[" + $i + "].targetWeight")`; if ($targetWeight < $compareWeight){ $targetWeight = $compareWeight; $targetIndex = $i; } } string $connectedTransform[] = `listConnections ($connected + ".target[" + $targetIndex + "].targetParentMatrix")`; //string $list[] = `listConnections -destination false -source true $connected`; //$list = stringArrayRemove({$connected, $object},$list); //should eventually check weights to see where greatest weight //for now take first connection, also what if both parent and point $returnString = $connectedTransform[0]; } //} } return $returnString; } // end matchBox:traceConstraintParent ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // LINK ATTRIBUTE PROCS ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //matchBox:getLinkAttributes pCube2_reflectionWidget; /////////////////////////////////////////////// global proc string[] matchBox:getLinkAttributes /////////////////////////////////////////////// (string $widget){ string $plug, $mel; string $attributeMelList[]; string $attributeList[] = `listAttr $widget`; for ($attribute in $attributeList){ string $attrSuffix = endString($attribute, 5); //8.0+ if ($attrSuffix == "_sAtr" && (`attributeQuery -n $widget -msg $attribute`)){ if ($attrSuffix == "_sAtr"){ string $connectedPlugs[]= `listConnections -p true -destination false -source true ($widget + "." + $attribute)`; $plug = $connectedPlugs[0]; //println $plug; //println $mel; $attributeMelList = stringArrayCatenate($attributeMelList,{$plug}); } //8.0+ if ($attrSuffix == "_mAtr" && (`attributeQuery -n $widget -msg $attribute`)){ else if ($attrSuffix == "_mAtr"){ string $connectedPlugs[]= `listConnections -p true -destination false -source true ($widget + "." + $attribute)`; $plug = $connectedPlugs[0]; //println $plug; string $melAttr = substitute("_mAtr",$attribute,""); $mel = `getAttr ($widget +"." + $melAttr + "_mMel")`; //println $mel; $attributeMelList = stringArrayCatenate($attributeMelList,{$plug,$mel}); } else if ($attrSuffix == "_calc"){ string $calcAttr = substitute("_calc",$attribute,""); string $processIndividual = `getAttr ($widget +"." + $calcAttr + "_calc")`; $attributeMelList = stringArrayCatenate($attributeMelList,{$processIndividual}); } } return $attributeMelList; } //matchBox:matchAttributeSetup("pCube2_reflectionWidget","pCube3_reflectionWidget","pCube2.ty","pCube3.ty","$v = $v","$v = $v"); //////////////////////////////////////// global proc matchBox:linkAttributeSetup //////////////////////////////////////// (string $sourceWidget, string $matchWidget, string $sourceAttribute, string $matchAttribute, string $sourceMel, string $matchMel){ if(!attributeExists ("processAttributes", $sourceWidget)){ addAttr -ln "processAttributes" -at bool -s true -r true -w true -h false $sourceWidget; setAttr ($sourceWidget + ".processAttributes") -cb true; setAttr ($sourceWidget + ".processAttributes") 1; } if(!attributeExists ("processAttributes", $matchWidget)){ addAttr -ln "processAttributes" -at bool -s true -r true -w true -h false $matchWidget; setAttr ($matchWidget + ".processAttributes") -cb true; setAttr ($matchWidget + ".processAttributes") 1; } $cleanSourceAttribute = substituteAllString($sourceAttribute, ".", "_"); $cleanMatchAttribute = substituteAllString($matchAttribute, ".", "_"); //build message/mel attrs on source if(!attributeExists (($cleanSourceAttribute + "_sAtr"), $sourceWidget)) addAttr -ln ($cleanSourceAttribute + "_sAtr") -at message -s true -r true -w true -h false $sourceWidget; else warning ("matchBox: Attribute exists, " + $cleanSourceAttribute + " on " + $sourceWidget + "overwriting"); if(!attributeExists (($cleanSourceAttribute + "_mAtr"), $sourceWidget)) addAttr -ln ($cleanSourceAttribute + "_mAtr") -at message -s true -r true -w true -h false $sourceWidget; else warning ("matchBox: Attribute exists, " + $cleanSourceAttribute + " on " + $sourceWidget + "overwriting"); if(!attributeExists (($cleanSourceAttribute + "_mMel"), $sourceWidget)) addAttr -ln ($cleanSourceAttribute + "_mMel") -dt "string" -s true -r true -w true -h false $sourceWidget; if(!attributeExists (($cleanSourceAttribute + "_calc"), $sourceWidget)){ addAttr -ln ($cleanSourceAttribute + "_calc") -at bool -s true -r true -w true -h false $sourceWidget; setAttr ($sourceWidget + "." + $cleanSourceAttribute + "_calc") -cb true; setAttr ($sourceWidget + "." + $cleanSourceAttribute + "_calc") 1; } //build message/mel attrs on match if(!attributeExists (($cleanMatchAttribute + "_sAtr"), $matchWidget)) addAttr -ln ($cleanMatchAttribute + "_sAtr") -at message -s true -r true -w true -h false $matchWidget; else warning ("matchBox: Attribute exists, " + $cleanMatchAttribute + " on " + $matchWidget + "overwriting"); if(!attributeExists (($cleanMatchAttribute + "_mAtr"), $matchWidget)) addAttr -ln ($cleanMatchAttribute + "_mAtr") -at message -s true -r true -w true -h false $matchWidget; else warning ("matchBox: Attribute exists, " + $cleanMatchAttribute + " on " + $matchWidget + "overwriting"); if(!attributeExists (($cleanMatchAttribute + "_mMel"), $matchWidget)) addAttr -ln ($cleanMatchAttribute + "_mMel") -dt "string" -s true -r true -w true -h false $matchWidget; if(!attributeExists (($cleanMatchAttribute + "_calc"), $matchWidget)){ addAttr -ln ($cleanMatchAttribute + "_calc") -at bool -s true -r true -w true -h false $matchWidget; setAttr ($matchWidget + "." + $cleanMatchAttribute + "_calc") -cb true; setAttr ($matchWidget + "." + $cleanMatchAttribute + "_calc") 1; } setAttr -type "string" ($sourceWidget + "."+ $cleanSourceAttribute + "_mMel") $sourceMel; setAttr -type "string" ($matchWidget + "."+ $cleanMatchAttribute + "_mMel") $matchMel; //connect message to attributes to process connectAttr -f $sourceAttribute ($sourceWidget + "."+ $cleanSourceAttribute + "_sAtr"); connectAttr -f $matchAttribute ($sourceWidget + "." + $cleanSourceAttribute + "_mAtr"); connectAttr -f $matchAttribute ($matchWidget + "."+ $cleanMatchAttribute + "_sAtr"); connectAttr -f $sourceAttribute ($matchWidget + "."+ $cleanMatchAttribute + "_mAtr"); print ("// Connected " + $sourceAttribute + " to " + $matchAttribute + " with " + $sourceWidget + " " + $matchWidget); } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // UTILITY PROCS ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////// global proc matchBox:stripWidget //////////////////////////////// (int $all){ string $selectedObjects[]; string $allTransforms[] = `ls -type "transform"`; if ($all) $selectedObjects = $allTransforms; else $selectedObjects = `ls -sl -type "transform"`; string $groupList[]; for ($object in $allTransforms){ if (size(`ls($object + ".groupReflectPlane")`)) $groupList = stringArrayCatenate({$object},$groupList); } //find widgets string $widgetList[]; for ($object in $selectedObjects){ if (size(`ls($object + ".reflectPlane")`)) //widget $widgetList = stringArrayCatenate({$object},$widgetList); else{ string $children[] = `listRelatives -path -c $object`; //control for ($child in $children){ if (size(`ls($child + ".reflectPlane")`)) //widget $widgetList = stringArrayCatenate({$child},$widgetList); } } if (size(`ls($object + ".widget")`)){ //connect curve/reflect plane string $connectedWidget[]= `listConnections -d on -s on ($object + ".widget")`; //widgets if(size($connectedWidget)){ //if ($all) $widgetList =stringArrayCatenate({$object},$widgetList); //reflect plane for($widget in $connectedWidget){ //widget if (size(`ls($widget + ".reflectPlane")`)){ $widgetList = stringArrayCatenate({$widget},$widgetList); } } } if ($all) $widgetList = stringArrayCatenate({$object},$widgetList); } if (size(`ls($object + ".reflectPlaneObject")`)){ //reflect plane $widgetList = stringArrayCatenate({$object},$widgetList); } } //find connected widgets and curves string $expandedWidgetList[] = $widgetList; for ($widget in $widgetList){ if (size(`ls($widget + ".matchObject")`)){ //match object string $connectedWidgets[]= `listConnections -d on -s on ($widget + ".matchObject")`; if(size($connectedWidgets)) $expandedWidgetList = stringArrayCatenate($connectedWidgets,$expandedWidgetList); } } string $expandedCurveList[]; for ($widget in $expandedWidgetList){ if (size(`ls($widget + ".message")`)){ //guide curve string $connectedMessage[]= `listConnections -d on -s on ($widget + ".message")`; if(size($connectedMessage)){ for($message in $connectedMessage){ //in case multiple message attrs connected if (size(`ls($message + ".widget")`)){ //if connected to widget is a curve or reflect plane $expandedCurveList =stringArrayCatenate({$message},$expandedCurveList); //curve or widget added to list } } } } } $expandedWidgetList = stringArrayCatenate($expandedCurveList,$expandedWidgetList); string $cleanWidgetList[] = stringArrayRemoveDuplicates($expandedWidgetList); string $cleanGroupList[] = stringArrayRemoveDuplicates($groupList); string $cleanShaderList[]; if ($all){ //find the shaders string $shaders[]; $shaders = stringArrayCatenate(`ls -type "lambert"`,$shaders); $shaders = stringArrayCatenate(`ls -type "shadingEngine"`,$shaders); print $shaders; if (size($shaders)){ for ($shader in $shaders){ if (attributeExists("matchBoxShader", $shader)){ $cleanShaderList = stringArrayCatenate({$shader},$cleanShaderList); print "_A_"; } } } } string $messageString; if ($all) $messageString = "Delete all matchBox items including the following objects? \r\r"; else $messageString = "Delete the following objects? \r\r"; int $t; for($t = 0; $t 100) break; } if (size($cleanWidgetList) || size($cleanGroupList) || size($cleanShaderList)){ string $confirmDialog = `confirmDialog -title "matchBox: Delete Widgets" -message $messageString -button "Ok" -button "Cancel" -defaultButton "Ok" -cancelButton "Cancel" -dismissString "Cancel" `; if ($confirmDialog != "Cancel"){ println "//matchBox: Deleting Widgets"; print $cleanWidgetList; if (size($cleanShaderList)) delete $cleanShaderList; if (size($cleanWidgetList)) delete $cleanWidgetList; if (size($cleanGroupList)){ for ($group in $cleanGroupList){ string $groupChildren[] = `listRelatives -pa -c $group`; if (!size($groupChildren)){ println ("//matchBox: Deleting empty guideCurveGroup: " + $group); delete $group; } } } } }else warning "matchBox: Nothing to delete! Select a control, widget, plane, or curve"; } /////////////////////////////////// global proc matchBox:stripAttribute /////////////////////////////////// (){ string $attrs[] = `selectedChannelBoxPlugs`; if (size($attrs)){ string $deleteList[]; string $allNodeAttributes[]; for ($dirtyPlug in $attrs){ string $plug = substituteAllString($dirtyPlug,".","_"); string $widgets[]; tokenize $dirtyPlug "." $widgets; string $widget = $widgets[0]; string $longName = `substring $plug 1 (size($plug) - 5)`; string $prefix = `substitute ($widget + "_" ) $longName ""`; $allNodeAttributes = `listAttr -ud $widget`; for ($attribute in $allNodeAttributes){ string $attrPrefix = `substring $attribute 1 (size($attribute) - 5)`; if ($attrPrefix == $prefix) $deleteList = stringArrayCatenate({($widget + "." + $attribute)},$deleteList); } } string $messageString = "Delete the following attributes?\r\r"; int $t; for($t = 0; $t 100) break; } string $confirmDialog = `confirmDialog -title "matchBox: Delete Attributes" -message $messageString -button "Ok" -button "Cancel" -defaultButton "Ok" -cancelButton "Cancel" -dismissString "Cancel" `; if ($confirmDialog != "Cancel"){ println "//matchBox: Deleting Attributes"; print $deleteList; for ($attribute in $deleteList){ if (size(`ls($attribute)`)) deleteAttr $attribute; } } } else warning "//matchbox: No plugs selected"; }//end stripAttribute /////////////////////////////////// global proc matchBox:commandToShelf /////////////////////////////////// (string $label, string $image, string $script) { global string $gShelfTopLevel; if (!size($image)) $image = "commandButton.xpm"; if (`tabLayout -exists $gShelfTopLevel`) { string $currentShelf = `tabLayout -query -selectTab $gShelfTopLevel`; setParent $currentShelf; // Create the shelf button on the current shelf. // Give it the default MEL script icon, // and set the short label too. // shelfButton -command $script -label $label -annotation $script -imageOverlayLabel $label -image1 $image -style `shelfLayout -query -style $currentShelf` -width `shelfLayout -query -cellWidth $currentShelf` -height `shelfLayout -query -cellHeight $currentShelf`; } } /////////////////// global proc println /////////////////// (string $printme){ print ($printme + "\r\n"); } ///////////////////////////////////////////// global proc string matchBox:findWidgetControl ///////////////////////////////////////////// (string $widget){ string $controls[] = `listRelatives -pa -p $widget`; if (!size($controls)){ error "matchBox: Reflection widget has no parent control"; return ""; }else{ string $control = $controls[0]; return $control; } } ////////////////////////////////////////// global proc vector matchBox:normalizePoint ////////////////////////////////////////// (string $object, int $vertex){ vector $sourceNormal = <<0,0,0>>; vector $source = `xform -q -ws -t ($object + ".vtx[" + $vertex + "]")`; vector $sourcePivot = `xform -q -ws -rp $object`; $sourceNormal = $source+<<-($sourcePivot.x),-($sourcePivot.y),-($sourcePivot.z)>>; return $sourceNormal; } //keyable Attr Locker ///////////////////// global proc lock_key ///////////////////// (string $object, string $attributes, int $action){ string $split_attr[]; tokenize $attributes " " $split_attr; if ($action == "0") { for ($a in $split_attr) { setAttr -l 1 ($object + "." + $a) ; setAttr -k 0 ($object + "." + $a) ; } } if ($action == "1") { for ($a in $split_attr) { setAttr -l 0 ($object + "." + $a) ; setAttr -k 1 ($object + "." + $a) ; } } if ($action == "2") { for ($a in $split_attr) { setAttr -k 0 ($object + "." + $a) ; } } if ($action == "3") { for ($a in $split_attr) { setAttr -l 1 ($object + "." + $a) ; } } } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // BUILD WIDGETS ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////// global proc matchBox:doBuildMatchWidget /////////////////////////////////////// (string $reflectPlane, int $processRotation, int $processTranslation, int $processScale, int $doLayer, int $doSet, string $layer, string $set, float $scale, int $zeroRotate, int $disableFeedback){ string $selection[] = `ls -sl -type "transform"`; //check here for transform and joint types if ((size($selection) > 2) || (size($selection) < 1) ){ error "matchBox: Select a single control OR two controls to reflect!"; }else{ for ($selected in $selection){ if (size(`ls($selected + ".matchObject")`)){ error "//matchBox: You can't put a widget on a widget! Selecte controls only! "; return; } } if ($doLayer){ if (!objExists($layer)) createDisplayLayer -name $layer -empty; setAttr ($layer + ".color") 17; } if ($doSet){ if (!objExists($set)) sets -n $set -em; } string $sourceWidget = matchBox:buildMatchWidget($reflectPlane,$processRotation,$processTranslation,$processScale,$selection[0],$scale,$zeroRotate); if ($sourceWidget == "CANCEL") return; if ($disableFeedback) setAttr ($sourceWidget + ".visibility") 0; if ($doSet) sets -add $set $sourceWidget; if ($doLayer) editDisplayLayerMembers $layer $sourceWidget; if (size($selection)>1){ string $matchWidget = matchBox:buildMatchWidget($reflectPlane,$processRotation,$processTranslation,$processScale,$selection[1],$scale,$zeroRotate); if ($matchWidget == "CANCEL") return; string $linkCurve = matchBox:createMatchSet($sourceWidget,$matchWidget,$reflectPlane,$disableFeedback); if ($disableFeedback) setAttr ($matchWidget + ".visibility") 0; if ($doSet) sets -add $set $matchWidget; if ($doLayer){ editDisplayLayerMembers $layer $matchWidget; if (size($linkCurve)) editDisplayLayerMembers $layer $linkCurve; } } } select -r $selection; } //////////////////////////////////////////// global proc string matchBox:buildMatchWidget //////////////////////////////////////////// (string $reflectPlane, int $processRotation, int $processTranslation, int $processScale, string $control, float $scale, int $zeroRotate){ string $returnString = ""; int $pointX = "46"; int $pointY = "45"; int $pointZ = "44"; //define rotation plane and get refl normal //need to add functionality to get this into closest xyz as possible, for now, assume //construction at axis. should be able to match back the closest world axes to the vector //returning axis and angle? should work, because will be closest to a particular angle //string $reflectPlane = "reflectPlane"; vector $flipAxisInvert = <<1,1,1>>; float $reflectNormal[] = matchBox:getNormal($reflectPlane); // float $reflectNormal[] = matchBox:getNormal($reflectPlane); float $angleBetX[] = `angleBetween -v1 ($reflectNormal[0]) ($reflectNormal[1]) ($reflectNormal[2]) -v2 -1 0 0`; float $angleBetY[] = `angleBetween -v1 ($reflectNormal[0]) ($reflectNormal[1]) ($reflectNormal[2]) -v2 0 -1 0`; float $angleBetZ[] = `angleBetween -v1 ($reflectNormal[0]) ($reflectNormal[1]) ($reflectNormal[2]) -v2 0 0 -1`; float $tolerance = 0.1; //this is if it's on world normal, then it shouldn't flip int $singularity = 0; $singularity += equivalentTol($angleBetX[3], $angleBetY[3], $tolerance); $singularity += equivalentTol($angleBetX[3], $angleBetZ[3], $tolerance); $singularity += equivalentTol($angleBetZ[3], $angleBetY[3], $tolerance); int $cardanSingularity = 0; if ($angleBetX[3] > $tolerance && $angleBetY[3] > $tolerance && $angleBetZ[3] > $tolerance) $cardanSingularity = 1; if ($cardanSingularity && $singularity) warning "matchBox: Reflect plane singularity! Plane needs to be oriented to a cardan axis! Defaulting in XYZ order."; if ($angleBetX[3] < $tolerance || $angleBetX[3] <= $angleBetY[3] && $angleBetX[3] <= $angleBetZ[3]) $flipAxisInvert = <<-1,1,1>>; else if ($angleBetY[3] < $tolerance || $angleBetY[3] <= $angleBetX[3] && $angleBetY[3] <= $angleBetZ[3]) $flipAxisInvert = <<1,-1,1>>; else if ($angleBetZ[3] < $tolerance || $angleBetZ[3] <= $angleBetX[3] && $angleBetZ[3] <= $angleBetY[3]) $flipAxisInvert = <<1,1,-1>>; //print $flipAxisInvert; //check for existing widgets int $existingWidget = 0; string $reflectionWidget; string $existingWidgetName; string $controlChildren[] = `listRelatives -path -children -type "transform" $control`; for ($child in $controlChildren){ if(attributeExists ("reflectPlane", $child)){ $existingWidget = 1; $existingWidgetName = $child; //println $child; } } if ($existingWidget){ string $result = `confirmDialog -title "Widget Exists!" -message "Choose Behavior: (Use Existing may cause matching problems!)" -button "Replace" -button "Use Existing" -button "Cancel" -defaultButton "Replace" -dismissString "Cancel" `; if ($result == "Cancel"){ return "CANCEL"; }else { if (size(`ls($existingWidgetName + ".rotatePivot")`)){ //string $existingWidgetName = "pCube2_reflectionWidget" string $connectedPMM[] = `listConnections -d on -s on ($existingWidgetName + ".rotatePivot")`; if (size(`ls ($connectedPMM[0] + ".output")`)){ string $connectedGuideCurveShape[] = `listConnections -d on -s on ($connectedPMM[0] + ".output")`; string $curveTransform[] = `listRelatives -path -parent $connectedGuideCurveShape[1]`; delete $curveTransform[0]; } } } if ($result == "Use Existing") { $existingWidget = 1; $reflectionWidget = $existingWidgetName; } if ($result == "Replace") { //this cleans the old widget and the guide curve if it exists delete $child; $existingWidget = 0; } } //setupWidget if (!$existingWidget) $reflectionWidget = matchBox:createMatchWidget(($control + "_reflectionWidget")); setAttr ($reflectionWidget + ".scale") $scale $scale $scale; //add attributes //println $reflectionWidget; if(!attributeExists ("worldRotation", $reflectionWidget)) addAttr -ln "worldRotation" -dt "stringArray" -h false $reflectionWidget; if(!attributeExists ("inverseWorldRotation", $reflectionWidget)) addAttr -ln "inverseWorldRotation" -dt "stringArray" -h false $reflectionWidget; if(!attributeExists ("flipAxisInvert", $reflectionWidget)) addAttr -ln "flipAxisInvert" -dt "short3" -h false $reflectionWidget; if(!attributeExists ("matchObject", $reflectionWidget)) addAttr -ln "matchObject" -at message -s true -r true -w true -h false $reflectionWidget; if(!attributeExists ("reflectPlane", $reflectionWidget)) addAttr -ln "reflectPlane" -at message -s true -r true -w true -h false $reflectionWidget; if(!attributeExists ("processRotation", $reflectionWidget)) addAttr -ln "processRotation" -at bool -s true -r true -w true -h false $reflectionWidget; if(!attributeExists ("processTranslation", $reflectionWidget)) addAttr -ln "processTranslation" -at bool -s true -r true -w true -h false $reflectionWidget; if(!attributeExists ("processScale", $reflectionWidget)) addAttr -ln "processScale" -at bool -s true -r true -w true -h false $reflectionWidget; if(!attributeExists ("widget", $reflectPlane)) addAttr -ln "widget" -at message -s true -r true -w true -h false $reflectPlane; setAttr ($reflectionWidget + ".processRotation") $processRotation; setAttr ($reflectionWidget + ".processTranslation") $processTranslation; setAttr ($reflectionWidget + ".processScale") $processScale; //show in channel box setAttr ($reflectionWidget + ".processRotation") -cb true; setAttr ($reflectionWidget + ".processTranslation") -cb true; setAttr ($reflectionWidget + ".processScale") -cb true; setAttr ($reflectionWidget + ".flipAxisInvert") -type "short3" ($flipAxisInvert.x) ($flipAxisInvert.y) ($flipAxisInvert.z); //connect next obj in reflect plane if (!`isConnected ($reflectPlane+".widget") ($reflectionWidget + ".reflectPlane")`) connectAttr -f ($reflectPlane+".widget") ($reflectionWidget + ".reflectPlane"); //move widget into position vector $controlPivot = `xform -q -ws -rp $control`; xform -ws -t ($controlPivot.x) ($controlPivot.y) ($controlPivot.z) $reflectionWidget; //check to see if channels are unlocked, //if locked, warn and skip, suggest connecting single attributes string $lockedAttributes[] = `listAttr -l $control`; int $lockedRotationX = 0; int $lockedRotationY = 0; int $lockedRotationZ = 0; for ($attribute in $lockedAttributes){ if ($attribute == "rotateX") $lockedRotationX = 1; if ($attribute == "rotateY") $lockedRotationY = 1; if ($attribute == "rotateZ") $lockedRotationY = 1; } if ($lockedRotationX || $lockedRotationY || $lockedRotationZ){ $processRotation = 0; warning "matchBox: One or more rotation channels are locked! May cause unxpected rotation behavior. Ignore if translate only."; setAttr -l false ($control + ".rotateX"); setAttr -l false ($control + ".rotateY"); setAttr -l false ($control + ".rotateZ"); } setAttr ($reflectionWidget + ".processRotation") $processRotation; setAttr ($reflectionWidget + ".processTranslation") $processTranslation; // This section is a bit crazy... not sure it's a good implementation. // Could simply error out if rotation really needs to stay locked // Could add config options to menu for different handling of thse things //get initalRotation vector $initalRotation = `getAttr ($control + ".rotate")`; //check for open and available rotation channels if it's processing //if (!$lockedRotation){ if($zeroRotate) catchQuiet(`setAttr ($control + ".rotate") 0 0 0`); //} vector $controlRotation = `xform -q -ws -ro $control`; xform -ws -ro ($controlRotation.x) ($controlRotation.y) ($controlRotation.z) $reflectionWidget; string $testParent[] = `listRelatives -parent -path $reflectionWidget`; if ($testParent[0] != $control){ string $reflectionWidgetParent[] = `parent -a $reflectionWidget $control`; $reflectionWidget = $reflectionWidgetParent[0]; } // if (!$lockedRotation){ //calculate first component of inverse rotation, store the vectors to compare to world vectors vector $normalizedInverseX = matchBox:worldNormalizedPoint($reflectionWidget,$pointX); vector $normalizedInverseY = matchBox:worldNormalizedPoint($reflectionWidget,$pointY); vector $normalizedInverseZ = matchBox:worldNormalizedPoint($reflectionWidget,$pointZ); string $worldAxis[] = worldLocalEulerOffsetTable($reflectionWidget,$pointX,$pointY,$pointZ); if ($worldAxis[0] == "e" || $worldAxis[1] == "e" || $worldAxis[2] == "e"){ error "matchBox: Could not determine world rotation. This usually means major failure, and wont match properly."; return $returnString; } println ("//matchBox: World rotation for " + $reflectionWidget + " = " + $worldAxis[0] +" "+ $worldAxis[1]+" "+ $worldAxis[2]); setAttr ($reflectionWidget + ".worldRotation") -type stringArray 3 $worldAxis[0] $worldAxis[1] $worldAxis[2]; //calculate the inverse rotation //get the world vectors vector $normalizedWorldX = matchBox:worldNormalizedPoint($reflectionWidget,$pointX); vector $normalizedWorldY = matchBox:worldNormalizedPoint($reflectionWidget,$pointY); vector $normalizedWorldZ = matchBox:worldNormalizedPoint($reflectionWidget,$pointZ); string $inverseWorldAxis[] = matchBox:findInverseWorldRotation($normalizedWorldX,$normalizedWorldY,$normalizedWorldZ,$normalizedInverseX,$normalizedInverseY,$normalizedInverseZ); if ($inverseWorldAxis[0] == "e" || $inverseWorldAxis[1] == "e" || $inverseWorldAxis[2] == "e"){ error "matchBox: Could not determine inverse world rotation. Manually orient and set axis attrs on widget."; return $returnString; } println ("//matchBox: Inverse world rotation for " + $reflectionWidget + " = " + $inverseWorldAxis[0] +" "+ $inverseWorldAxis[1]+" "+ $inverseWorldAxis[2]); setAttr ($reflectionWidget + ".inverseWorldRotation") -type stringArray 3 $inverseWorldAxis[0] $inverseWorldAxis[1] $inverseWorldAxis[2]; catchQuiet(`setAttr ($control + ".rotate") ($initalRotation.x) ($initalRotation.y) ($initalRotation.z)`); //}//end if rotation if ($lockedRotationX) setAttr -l true ($control + ".rotateX"); if ($lockedRotationY) setAttr -l true ($control + ".rotateY"); if ($lockedRotationZ) setAttr -l true ($control + ".rotateZ"); setAttr ($reflectionWidget + ".rotateX") -k false -cb true; setAttr ($reflectionWidget + ".rotateY") -k false -cb true; setAttr ($reflectionWidget + ".rotateZ") -k false -cb true; lock_key $reflectionWidget "tx ty tz" 0; return $reflectionWidget; } //////////////////////////////////////////////// global proc vector matchBox:worldNormalizedPoint //////////////////////////////////////////////// (string $reflectionWidget, int $point){ vector $pivot = `xform -q -ws -rp $reflectionWidget`; vector $pointWorld = `xform -q -ws -t ($reflectionWidget + ".vtx[" + $point + "]")`; vector $normalPoint = unit($pointWorld - $pivot); return $normalPoint; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // CONNECT WIDGETS ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////// global proc string matchBox:createMatchSet ////////////////////////////////////////// (string $sourceWidget, string $matchWidget, string $reflectPlane, int $disableFeedback){ //need to error check for missing axis attribs too.... if (!attributeExists("matchObject", $sourceWidget)) addAttr -ln "matchObject" -at message -s true -r true -w true $sourceWidget; if (!attributeExists("matchObject", $matchWidget)) addAttr -ln "matchObject" -at message -s true -r true -w true $matchWidget; if (!`isConnected($sourceWidget+".matchObject") ($matchWidget+".matchObject")`) connectAttr -f ($sourceWidget+".matchObject") ($matchWidget+".matchObject"); string $guideCurve; if (!$disableFeedback){ //matchBox:findWidgetControls string $sourceControl = matchBox:findWidgetControl($sourceWidget); string $destControl = matchBox:findWidgetControl($matchWidget); string $guideCurveGroup; string $connectedPlanes[]= `listConnections -d on -s on ($reflectPlane + ".message")`; if (size($connectedPlanes)){ $guideCurveGroup = $connectedPlanes[0]; }else{ if (!`objExists ($reflectPlane + "GuideCurves")`) $guideCurveGroup = `group -em -n ($reflectPlane + "GuideCurves")`; else $guideCurveGroup = ($reflectPlane + "GuideCurves"); if (!attributeExists("groupReflectPlane", $guideCurveGroup)) addAttr -ln "groupReflectPlane" -at message -s true -r true -w true -h false $guideCurveGroup; if (!`isConnected($reflectPlane+".message") ($guideCurveGroup+".groupReflectPlane")`) connectAttr -f ($reflectPlane+".message") ($guideCurveGroup+".groupReflectPlane"); } string $annotation = `createNode annotationShape `; setAttr -type "string" ($annotation + ".text") ($sourceControl + ":" + $destControl); setAttr ($annotation + ".displayArrow") false; string $annotateTransforms[] = `listRelatives -path -p $annotation`; string $annotateTransform = $annotateTransforms[0]; string $cleanSourceControl = substitute(":", $sourceControl, "_"); string $cleanDestControl = substitute(":", $destControl, "_"); $annotateTransform = `rename $annotateTransform ($cleanSourceControl + "_" + $cleanDestControl)`; lock_key $annotateTransform "tx ty tz rx ry rz sx sz sy " 0; vector $sourcePivot = `xform -q -ws -rp $sourceWidget`; vector $destPivot = `xform -q -ws -rp $matchWidget`; //create guide curves $guideCurve = `curve -d 1 -p ($sourcePivot.x) ($sourcePivot.y) ($sourcePivot.z) -p ($destPivot.x) ($destPivot.y) ($destPivot.z) -k 0 -k 1`; $guideCurve = `rename $guideCurve ($cleanDestControl + "_" + $cleanSourceControl + "_curve")`; string $sourceMatrixMult = `matchBox:connectCurvePoint ($guideCurve + ".cv[0]") $sourceWidget`; string $destMatrixMult = `matchBox:connectCurvePoint ($guideCurve + ".cv[1]") $matchWidget`; lock_key $guideCurve "tx ty tz rx ry rz sx sz sy " 0; if (!attributeExists("widget", $guideCurve)) addAttr -ln "widget" -at message -s true -r true -w true -h false $guideCurve; if (!`isConnected($sourceWidget+".message") ($guideCurve+".widget")`) connectAttr -f ($sourceWidget+".message") ($guideCurve+".widget"); string $plusMinusAverage = `createNode plusMinusAverage`; setAttr ($plusMinusAverage + ".operation") 3; connectAttr -f ($sourceMatrixMult + ".output") ($plusMinusAverage + ".input3D[0]"); connectAttr -f ($destMatrixMult + ".output") ($plusMinusAverage + ".input3D[1]"); connectAttr -f ($plusMinusAverage + ".output3D") ($annotateTransform + ".translate"); catch(`setAttr ($annotateTransform + ".overrideEnabled") 1`); catch(`setAttr ($annotateTransform + ".overrideColor") 17`); catch(`setAttr ($annotateTransform + ".overrideDisplayType") 2`); catch(`setAttr ($guideCurve+ ".overrideEnabled") 1`); catch(`setAttr ($guideCurve+ ".overrideColor") 17`); parent $annotateTransform $guideCurve; parent $guideCurve $guideCurveGroup; } return $guideCurve; } ///////////////////////////////////////////// global proc string matchBox:connectCurvePoint ///////////////////////////////////////////// (string $controlPoint, string $manip){ string $matrixMult = `createNode pointMatrixMult -name "pointMatrixMult"`; setAttr ($matrixMult + ".isHistoricallyInteresting") 0; connectAttr -f ($manip + ".rotatePivot") ($matrixMult + ".inPoint"); connectAttr -f ($manip + ".worldMatrix[0]") ($matrixMult + ".inMatrix"); connectAttr -f ($matrixMult + ".output") $controlPoint; return $matrixMult; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // FACE NORMAL MATRIX FOR REFLECTION ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////// global proc float[] matchBox:getNormal ////////////////////////////////////// ( string $face ){ int $index = 10; // get matrix of the plane float $matrix[16] = `getAttr ($face + ".worldMatrix")`; // get the relative normal of the plane float $relNormal[] = `polyNormalPerVertex -q -normalXYZ ($face + ".vtx[" + $index + "]")`; if (size($relNormal) > 3) $relNormal = {$relNormal[0],$relNormal[1],$relNormal[2]}; // calculate world space normal and normalize $nn = pointMatrixMult($relNormal, $matrix); normalize($nn); return( $nn ); } /////////////////////////////////////// global proc float[] matchBox:getReflect /////////////////////////////////////// ( float $nn[] ){ normalize($nn); float $x = $nn[0], $y = $nn[1], $z = $nn[2]; float $x2 = $x * $x; float $y2 = $y * $y; float $z2 = $z * $z; float $reflectMatrix[16] = { (-($x2) + $z2 + $y2), (-2 * $x * $y), (-2 * $x * $z), 0, (-2 * $y * $x), (-($y2) + $x2 + $z2), (-2 * $y * $z), 0, (-2 * $x * $z), (-2 * $y * $z), (-($z2) + $y2 + $x2), 0, 0, 0, 0, 1}; return $reflectMatrix; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // LOCAL / WORLD AXIS CONVERSION ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////// global proc string[] matchBox:findInverseWorldRotation ////////////////////////////////////////////////////// (vector $worldX, vector $worldY, vector $worldZ, vector $inverseX, vector $inverseY, vector $inverseZ){ string $axis[] = {"e","e","e"}; float $tolerance = 1; float $angleX; float $angleY; float $angleZ; $angleX = rad_to_deg(`angle $inverseX $worldX`); $angleY = rad_to_deg(`angle $inverseX $worldY`); $angleZ = rad_to_deg(`angle $inverseX $worldZ`); if ($angleX < $tolerance){ $axis[0] = "x"; }else if ($angleY < $tolerance){ $axis[0] = "y"; }else if ($angleZ < $tolerance){ $axis[0] = "z"; }else if ($angleX > (180 - $tolerance) && $angleX < (180 + $tolerance)){ $axis[0] = "-x"; }else if ($angleY > (180 - $tolerance) && $angleY < (180 + $tolerance)){ $axis[0] = "-y"; }else if ($angleZ > (180 - $tolerance) && $angleZ < (180 + $tolerance)){ $axis[0] = "-z"; } $angleX = rad_to_deg(`angle $inverseY $worldX`); $angleY = rad_to_deg(`angle $inverseY $worldY`); $angleZ = rad_to_deg(`angle $inverseY $worldZ`); if ($angleX < $tolerance){ $axis[1] = "x"; }else if ($angleY < $tolerance){ $axis[1] = "y"; }else if ($angleZ < $tolerance){ $axis[1] = "z"; }else if ($angleX > (180 - $tolerance) && $angleX < (180 + $tolerance)){ $axis[1] = "-x"; }else if ($angleY > (180 - $tolerance) && $angleY < (180 + $tolerance)){ $axis[1] = "-y"; }else if ($angleZ > (180 - $tolerance) && $angleZ < (180 + $tolerance)){ $axis[1] = "-z"; } $angleX = rad_to_deg(`angle $inverseZ $worldX`); $angleY = rad_to_deg(`angle $inverseZ $worldY`); $angleZ = rad_to_deg(`angle $inverseZ $worldZ`); if ($angleX < $tolerance){ $axis[2] = "x"; }else if ($angleY < $tolerance){ $axis[2] = "y"; }else if ($angleZ < $tolerance){ $axis[2] = "z"; }else if ($angleX > (180 - $tolerance) && $angleX < (180 + $tolerance)){ $axis[2] = "-x"; }else if ($angleY > (180 - $tolerance) && $angleY < (180 + $tolerance)){ $axis[2] = "-y"; }else if ($angleZ > (180 - $tolerance) && $angleZ < (180 + $tolerance)){ $axis[2] = "-z"; } return $axis; } //Given a set of rotations, and source and destination axes // for example matchBox:swapRotationAxes {"x","y","z"} {"z","-y","x"} {1,2,3}; // would equal 3 -2 1 // where x1 y2 z3 turned into z -y x would be x3 y-2 z1. ///////////////////////////////////////////// global proc float[] matchBox:swapRotationAxes ///////////////////////////////////////////// (string $sourceRotationOrder[], string $destinationRotationOrder[], float $incomingRotation[]){ float $outgoingRotation[] = $incomingRotation; for ($s = 0; $s <= 2; $s++){ //get sign from source axis int $signSource; if ((size($sourceRotationOrder[$s])) == 1) $signSource = 1; else $signSource = -1; string $sourceClean = substitute("-",$sourceRotationOrder[$s],""); for($d = 0; $d <= 2; $d++){ //get sign from dest axis int $signDestination; if ((size($destinationRotationOrder[$d])) == 1) $signDestination = 1; else $signDestination = -1; string $destinationClean = substitute("-",$destinationRotationOrder[$d],""); if ($sourceClean == $destinationClean) $outgoingRotation[$d] = ($signSource*($signDestination*($incomingRotation[$s]))); } } return $outgoingRotation; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // CUSTOM GEO CREATION ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //creates the geometry for a widget and assigns shaders //dependant on matchBox:createMatchBoxShaders ///////////////////////////////////////////// global proc string matchBox:createMatchWidget ///////////////////////////////////////////// (string $name){ string $matchBoxSG[] = matchBox:createMatchBoxShaders(); string $baseCubeMesh[] = `polyCube -w .3 -h .3 -d .3 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -ch 0`; string $baseCube = $baseCubeMesh[0]; polyExtrudeFacet -ch 0 -kft 0 -pvx 0 -pvy 0 -pvz 0 -tx 0 -ty 0 -tz 0 -rx 0 -ry 0 -rz 0 -sx 1 -sy 1 -sz 1 -ran 0 -divisions 1 -twist 0 -taper 1 -off 0 -ltz 0 -ws 0 -ltx 0 -lty 0 -lrx 0 -lry 0 -lrz 0 -lsx 0.5 -lsy 0.5 -lsz 0.5 -ldx 1 -ldy 0 -ldz 0 -w 0 -gx 0 -gy -1 -gz 0 -att 0 -mx 0 -my 0 -mz 0 -sma 0 ($baseCube + ".f[0]") ($baseCube + ".f[1]") ($baseCube + ".f[4]"); polyExtrudeFacet -ch 0 -kft 0 -pvx 0.03750000149 -pvy 0.03750000149 -pvz 0.03750000149 -tx 0 -ty 0 -tz 0 -rx 0 -ry 0 -rz 0 -sx 1 -sy 1 -sz 1 -ran 0 -divisions 1 -twist 0 -taper 1 -off 0 -ltz 0.5 -ws 0 -ltx 0 -lty 0 -lrx 0 -lry 0 -lrz 0 -lsx 1 -lsy 1 -lsz 1 -ldx 1 -ldy 0 -ldz 0 -w 0 -gx 0 -gy -1 -gz 0 -att 0 -mx 0 -my 0 -mz 0 -sma 0 ($baseCube + ".f[0]") ($baseCube + ".f[1]") ($baseCube + ".f[4]"); polyExtrudeFacet -ch 0 -kft 0 -pvx 0.2874999866 -pvy 0.2874999791 -pvz 0.2874999866 -tx 0 -ty 0 -tz 0 -rx 0 -ry 0 -rz 0 -sx 1 -sy 1 -sz 1 -ran 0 -divisions 1 -twist 0 -taper 1 -off 0 -ltz 0 -ws 0 -ltx 0 -lty 0 -lrx 0 -lry 0 -lrz 0 -lsx 2 -lsy 2 -lsz 2 -ldx 1 -ldy 0 -ldz 0 -w 0 -gx 0 -gy -1 -gz 0 -att 0 -mx 0 -my 0 -mz 0 -sma 0 ($baseCube + ".f[0]") ($baseCube + ".f[1]") ($baseCube + ".f[4]"); polyExtrudeFacet -ch 0 -kft 0 -pvx 0.2499999851 -pvy 0.2499999776 -pvz 0.2499999851 -tx 0 -ty 0 -tz 0 -rx 0 -ry 0 -rz 0 -sx 1 -sy 1 -sz 1 -ran 0 -divisions 1 -twist 0 -taper 1 -off 0 -ltz 0.35 -ws 0 -ltx 0 -lty 0 -lrx 0 -lry 0 -lrz 0 -lsx 0 -lsy 0 -lsz 0 -ldx 1 -ldy 0 -ldz 0 -w 0 -gx 0 -gy -1 -gz 0 -att 0 -mx 0 -my 0 -mz 0 -sma 0 ($baseCube + ".f[0]") ($baseCube + ".f[1]") ($baseCube + ".f[4]"); polyCollapseFacet -ch 0 ($baseCube + ".f[0]") ($baseCube + ".f[1]") ($baseCube + ".f[4]"); polyMapDel -ch 0 $baseCube; select -cl; sets -e -forceElement $matchBoxSG[0] ($baseCube +".f[23:26]") ($baseCube +".f[35:38]") ($baseCube +".f[47:50]"); sets -e -forceElement $matchBoxSG[1] ($baseCube +".f[19:22]") ($baseCube +".f[31:34]") ($baseCube +".f[43:46]"); sets -e -forceElement $matchBoxSG[2] ($baseCube +".f[15:18]") ($baseCube +".f[27:30]") ($baseCube +".f[39:42]"); sets -e -forceElement $matchBoxSG[3] ($baseCube +".f[0:14]"); setAttr ($baseCube + ".displayRotatePivot") 1; $baseCube = `rename $baseCube $name`; string $cubeShape[] = `listRelatives -path -s $baseCube`; setAttr ($cubeShape[0] + ".allowTopologyMod") 0; int $p; for ($p=0; $p<=46; $p++){ setAttr -lock true ($cubeShape[0] + ".pt["+ $p +"].px"); setAttr -lock true ($cubeShape[0] + ".pt["+ $p +"].py"); setAttr -lock true ($cubeShape[0] + ".pt["+ $p +"].pz"); } select -r $baseCube; return $baseCube; } ///////////////////////////////////////////// global proc string matchBox:createReflectPlane ///////////////////////////////////////////// (string $name, string $creationAxis){ if (!size($name)) $name = "reflectPlane"; string $matchBoxSG[] = matchBox:createMatchBoxShaders(); vector $axis = <<-1,0,0>>; switch ($creationAxis) { case "x": $axis = <<-1,0,0>>; break; case "y": $axis = <<0,-1,0>>; break; case "z": $axis = <<0,0,-1>>; break; } string $reflectPlaneMesh[] = `polyPlane -ch 0 -o on -ax ($axis.x) ($axis.y) ($axis.z) -w 6 -h 6 -sw 1 -sh 1`; string $reflectPlane = $reflectPlaneMesh[0]; polyExtrudeFacet -ch 0 -kft 0 -pvx 0 -pvy 0 -pvz 0 -tx 0 -ty 0 -tz 0 -rx 0 -ry 0 -rz 0 -sx 1 -sy 1 -sz 1 -ran 0 -divisions 1 -twist 0 -taper 1 -off 0 -ltz 0 -ws 0 -ltx 0 -lty 0 -lrx 0 -lry 0 -lrz 0 -lsx 0.95 -lsy 0.95 -lsz 0.95 -ldx 1 -ldy 0 -ldz 0 -w 0 -gx 0 -gy -1 -gz 0 -att 0 -mx 0 -my 0 -mz 0 -sma 0 ($reflectPlane + ".f[0]"); polyExtrudeFacet -ch 0 -kft 0 -pvx 0 -pvy 0 -pvz 0 -tx 0 -ty 0 -tz 0 -rx 0 -ry 0 -rz 0 -sx 1 -sy 1 -sz 1 -ran 0 -divisions 1 -twist 0 -taper 1 -off 0 -ltz 0 -ws 0 -ltx 0 -lty 0 -lrx 0 -lry 0 -lrz 0 -lsx 0.2 -lsy 0.2 -lsz 0.2 -ldx 1 -ldy 0 -ldz 0 -w 0 -gx 0 -gy -1 -gz 0 -att 0 -mx 0 -my 0 -mz 0 -sma 0 ($reflectPlane + ".f[0]"); delete ($reflectPlane + ".f[6:9]") ($reflectPlane + ".f[1]"); delete -ch $reflectPlane; polyMapDel -ch 0 $reflectPlane; select -cl; sets -e -forceElement $matchBoxSG[3] ($reflectPlane +".f[1:4]"); sets -e -forceElement $matchBoxSG[3] ($reflectPlane +".f[0]"); setAttr ($reflectPlane + ".displayRotatePivot") 1; $reflectPlane = `rename $reflectPlane $name`; if(!attributeExists ("reflectPlaneObject", $reflectPlane)) addAttr -ln "reflectPlaneObject" -at message -s true -r true -w false -h false $reflectPlane; string $reflectPlaneShape[] = `listRelatives -path -s $reflectPlane`; setAttr ($reflectPlaneShape[0] + ".allowTopologyMod") 0; int $p; for ($p=0; $p<=11; $p++){ setAttr -lock true ($reflectPlaneShape[0] + ".pt["+ $p +"].px"); setAttr -lock true ($reflectPlaneShape[0] + ".pt["+ $p +"].py"); setAttr -lock true ($reflectPlaneShape[0] + ".pt["+ $p +"].pz"); } select -r $reflectPlane; return $reflectPlane; } /////////////////////////////////////////////////// global proc string[] matchBox:createMatchBoxShaders /////////////////////////////////////////////////// (){ string $redName = "matchBoxRed"; string $greenName = "matchBoxGreen"; string $blueName = "matchBoxBlue"; string $clearName = "matchBoxClear"; string $redSG = ($redName + "SG"); string $greenSG = ($greenName + "SG"); string $blueSG = ($blueName + "SG"); string $clearSG = ($clearName + "SG"); if (!objExists($redName) || (!`objectType -isType "lambert" $redName`)){ $redName =`shadingNode -asShader lambert -name $redName`; $redSG = `sets -renderable true -noSurfaceShader true -empty -name ($redName + "SG")`; connectAttr -f ($redName + ".outColor") ($redSG + ".surfaceShader"); setAttr ($redName + ".color") -type double3 1 0 0 ; if(!attributeExists (("matchBoxShader"), $redName)) addAttr -ln ("matchBoxShader") -at message -s true -r true -w true -h false $redName; if(!attributeExists (("matchBoxShader"), $redSG)) addAttr -ln ("matchBoxShader") -at message -s true -r true -w true -h false $redSG; } if (!objExists($greenName) || (!`objectType -isType "lambert" $greenName`)){ $greenName =`shadingNode -asShader lambert -name $greenName`; $greenSG = `sets -renderable true -noSurfaceShader true -empty -name ($greenName + "SG")`; connectAttr -f ($greenName + ".outColor") ($greenSG + ".surfaceShader"); setAttr ($greenName + ".color") -type double3 0 1 0 ; if(!attributeExists (("matchBoxShader"), $greenName)) addAttr -ln ("matchBoxShader") -at message -s true -r true -w true -h false $greenName; if(!attributeExists (("matchBoxShader"), $greenSG)) addAttr -ln ("matchBoxShader") -at message -s true -r true -w true -h false $greenSG; } if (!objExists($blueName) || (!`objectType -isType "lambert" $blueName`)){ $blueName =`shadingNode -asShader lambert -name $blueName`; $blueSG = `sets -renderable true -noSurfaceShader true -empty -name ($blueName + "SG")`; connectAttr -f ($blueName + ".outColor") ($blueSG + ".surfaceShader"); setAttr ($blueName + ".color") -type double3 0 0 1 ; if(!attributeExists (("matchBoxShader"), $blueName)) addAttr -ln ("matchBoxShader") -at message -s true -r true -w true -h false $blueName; if(!attributeExists (("matchBoxShader"), $blueSG)) addAttr -ln ("matchBoxShader") -at message -s true -r true -w true -h false $blueSG; } if (!objExists($clearName) || (!`objectType -isType "lambert" $clearName`)){ $clearName =`shadingNode -asShader lambert -name $clearName`; $clearSG = `sets -renderable true -noSurfaceShader true -empty -name ($clearName + "SG")`; connectAttr -f ($clearName + ".outColor") ($clearSG + ".surfaceShader"); setAttr ($clearName + ".transparency") -type double3 .75 .75 .75 ; if(!attributeExists (("matchBoxShader"), $clearName)) addAttr -ln ("matchBoxShader") -at message -s true -r true -w true -h false $clearName; if(!attributeExists (("matchBoxShader"), $clearSG)) addAttr -ln ("matchBoxShader") -at message -s true -r true -w true -h false $clearSG; } return {$redSG,$greenSG,$blueSG,$clearSG}; }//end build shaders ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // OFFSET TABLES ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Matches widget points to world cardan axes to determine closest world rotation for control //worldLocalEulerOffsetTable is dependant on this //////////////////////////////////////////////////////// global proc int matchBox:calculateWorldLocalEulerOffset //////////////////////////////////////////////////////// (vector $pivot, string $pointX, string $pointY, string $pointZ){ int $return = 0; //refresh; vector $pX = `xform -q -ws -t $pointX`; $pX = $pX - $pivot; vector $oX = `angleBetween -euler -v1 ($pX.x) ($pX.y) ($pX.z) -v2 1.0 0.0 0.0`; vector $pY = `xform -q -ws -t $pointY`; $pY = $pY - $pivot; vector $oY = `angleBetween -euler -v1 ($pY.x) ($pY.y) ($pY.z) -v2 0.0 1.0 0.0`; vector $pZ = `xform -q -ws -t $pointZ`; $pZ = $pZ - $pivot; vector $oZ = `angleBetween -euler -v1 ($pZ.x) ($pZ.y) ($pZ.z) -v2 0.0 0.0 1.0`; float $t = 45.5; if ($oX.x < $t && $oX.x > -$t && $oX.y < $t && $oX.y > -$t && $oX.z < $t&& $oX.z > -$t && $oY.x < $t && $oY.x > -$t && $oY.y < $t && $oY.y > -$t && $oY.z < $t && $oY.z > -$t && $oZ.x < $t && $oZ.x > -$t && $oZ.y < $t && $oZ.y > -$t && $oZ.z < $t&& $oZ.z > -$t) $return = 1; return $return; } //Rotates the widget into all of the possible 126 combinations of cardan rotations (in increments on 90 degrees) //and finds the closest matching world axes /////////////////////////////////////////////// global proc string[] worldLocalEulerOffsetTable /////////////////////////////////////////////// (string $rotateObject, string $x, string $y, string $z){ //string $rotateObject = "world"; string $pointX = ($rotateObject + ".vtx["+$x+"]"); string $pointY = ($rotateObject + ".vtx["+$y+"]"); string $pointZ = ($rotateObject + ".vtx["+$z+"]"); vector $pivot = `xform -q -ws -rp $rotateObject`; vector $angle = <<0,0,0>>; string $axis[]= {"e","e","e"}; for ($i = 0; $i < 1; $i++){ //list sorted in order of least rotation to most extreme //need to determine if i even need the associated xyz values //and if i'm still using them in other procs //if so, will be easy to simplify //with a simple algorithim //62 -------------------------- rotate 0 0 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","y","z"}; break;} //61 -------------------------- rotate 0 0 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-y","x","z"}; break;} //63 -------------------------- rotate 0 0 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"y","-x","z"}; break;} //60 -------------------------- rotate 0 0 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-x","-y","z"}; break;} //64 -------------------------- rotate 0 0 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-x","-y","z"}; break;} //59 -------------------------- rotate 0 -90 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","-y","x"}; break;} //65 -------------------------- rotate 0 90 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","-y","-x"}; break;} //58 -------------------------- rotate 0 -90 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","-x","-y"}; break;} //66 -------------------------- rotate 0 90 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","x","-y"}; break;} //57 -------------------------- rotate 0 -90 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","y","-x"}; break;} //67 -------------------------- rotate 0 90 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","y","x"}; break;} //56 -------------------------- rotate 0 -90 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","x","y"}; break;} //68 -------------------------- rotate 0 90 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","-x","y"}; break;} //55 -------------------------- rotate 0 -90 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","-y","x"}; break;} //69 -------------------------- rotate 0 90 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","-y","-x"}; break;} //54 -------------------------- rotate 0 -180 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","-y","-z"}; break;} //70 -------------------------- rotate 0 180 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","-y","-z"}; break;} //53 -------------------------- rotate 0 -180 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-y","-x","-z"}; break;} //71 -------------------------- rotate 0 180 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"y","x","-z"}; break;} //52 -------------------------- rotate 0 -180 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-x","y","-z"}; break;} //72 -------------------------- rotate 0 180 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-x","y","-z"}; break;} //51 -------------------------- rotate 0 -180 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"y","x","-z"}; break;} //73 -------------------------- rotate 0 180 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-y","-x","-z"}; break;} //50 -------------------------- rotate 0 -180 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","-y","-z"}; break;} //74 -------------------------- rotate 0 180 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","-y","-z"}; break;} //49 -------------------------- rotate -90 180 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","z","-y"}; break;} //75 -------------------------- rotate 90 -180 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","-z","y"}; break;} //48 -------------------------- rotate -90 180 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-y","z","-x"}; break;} //76 -------------------------- rotate 90 -180 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"y","-z","-x"}; break;} //47 -------------------------- rotate -90 180 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-x","z","y"}; break;} //77 -------------------------- rotate 90 -180 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-x","-z","-y"}; break;} //46 -------------------------- rotate -90 180 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"y","z","x"}; break;} //78 -------------------------- rotate 90 -180 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-y","-z","x"}; break;} //45 -------------------------- rotate -90 180 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","z","-y"}; break;} //79 -------------------------- rotate 90 -180 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","-z","y"}; break;} //44 -------------------------- rotate -90 90 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","x","-y"}; break;} //80 -------------------------- rotate 90 -90 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","x","y"}; break;} //43 -------------------------- rotate -90 90 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","-y","-x"}; break;} //81 -------------------------- rotate 90 -90 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","y","-x"}; break;} //42 -------------------------- rotate -90 90 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","-x","y"}; break;} //82 -------------------------- rotate 90 -90 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","-x","-y"}; break;} //41 -------------------------- rotate -90 90 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","y","x"}; break;} //83 -------------------------- rotate 90 -90 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","-y","x"}; break;} //40 -------------------------- rotate -90 90 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","x","-y"}; break;} //84 -------------------------- rotate 90 -90 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","x","y"}; break;} //39 -------------------------- rotate -90 0 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-x","-z","-y"}; break;} //85 -------------------------- rotate 90 0 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-x","z","y"}; break;} //38 -------------------------- rotate -90 0 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"y","-z","-x"}; break;} //86 -------------------------- rotate 90 0 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-y","z","-x"}; break;} //37 -------------------------- rotate -90 0 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","-z","y"}; break;} //87 -------------------------- rotate 90 0 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","z","-y"}; break;} //36 -------------------------- rotate -90 0 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-y","-z","x"}; break;} //88 -------------------------- rotate 90 0 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"y","z","x"}; break;} //35 -------------------------- rotate -90 0 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-x","-z","-y"}; break;} //89 -------------------------- rotate 90 0 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-x","z","y"}; break;} //34 -------------------------- rotate -90 -90 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","-x","-y"}; break;} //90 -------------------------- rotate 90 90 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","-x","y"}; break;} //33 -------------------------- rotate -90 -90 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","y","-x"}; break;} //91 -------------------------- rotate 90 90 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","-y","-x"}; break;} //32 -------------------------- rotate -90 -90 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","x","y"}; break;} //92 -------------------------- rotate 90 90 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","x","-y"}; break;} //31 -------------------------- rotate -90 -90 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","-y","x"}; break;} //93 -------------------------- rotate 90 90 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","y","x"}; break;} //30 -------------------------- rotate -90 -90 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","-x","-y"}; break;} //94 -------------------------- rotate 90 90 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","-x","y"}; break;} //29 -------------------------- rotate -90 -180 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","z","-y"}; break;} //95 -------------------------- rotate 90 180 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","-z","y"}; break;} //28 -------------------------- rotate -90 -180 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-y","z","-x"}; break;} //96 -------------------------- rotate 90 180 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"y","-z","-x"}; break;} //27 -------------------------- rotate -90 -180 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-x","z","y"}; break;} //97 -------------------------- rotate 90 180 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-x","-z","-y"}; break;} //26 -------------------------- rotate -90 -180 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"y","z","x"}; break;} //98 -------------------------- rotate 90 180 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-y","-z","x"}; break;} //25 -------------------------- rotate -90 -180 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","z","-y"}; break;} //99 -------------------------- rotate 90 180 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","-z","y"}; break;} //24 -------------------------- rotate -180 180 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","y","z"}; break;} //100 -------------------------- rotate 180 -180 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","y","z"}; break;} //23 -------------------------- rotate -180 180 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-y","x","z"}; break;} //101 -------------------------- rotate 180 -180 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"y","-x","z"}; break;} //22 -------------------------- rotate -180 180 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-x","-y","z"}; break;} //102 -------------------------- rotate 180 -180 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-x","-y","z"}; break;} //21 -------------------------- rotate -180 180 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"y","-x","z"}; break;} //103 -------------------------- rotate 180 -180 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-y","x","z"}; break;} //20 -------------------------- rotate -180 180 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","y","z"}; break;} //104 -------------------------- rotate 180 -180 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","y","z"}; break;} //19 -------------------------- rotate -180 90 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","y","x"}; break;} //105 -------------------------- rotate 180 -90 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","y","-x"}; break;} //18 -------------------------- rotate -180 90 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","x","-y"}; break;} //106 -------------------------- rotate 180 -90 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","-x","-y"}; break;} //17 -------------------------- rotate -180 90 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","-y","-x"}; break;} //107 -------------------------- rotate 180 -90 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","-y","x"}; break;} //16 -------------------------- rotate -180 90 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","-x","y"}; break;} //108 -------------------------- rotate 180 -90 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","x","y"}; break;} //15 -------------------------- rotate -180 90 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","y","x"}; break;} //109 -------------------------- rotate 180 -90 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","y","-x"}; break;} //14 -------------------------- rotate -180 0 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-x","y","-z"}; break;} //110 -------------------------- rotate 180 0 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-x","y","-z"}; break;} //13 -------------------------- rotate -180 0 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"y","x","-z"}; break;} //111 -------------------------- rotate 180 0 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-y","-x","-z"}; break;} //12 -------------------------- rotate -180 0 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","-y","-z"}; break;} //112 -------------------------- rotate 180 0 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","-y","-z"}; break;} //11 -------------------------- rotate -180 0 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-y","-x","-z"}; break;} //113 -------------------------- rotate 180 0 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"y","x","-z"}; break;} //10 -------------------------- rotate -180 0 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-x","y","-z"}; break;} //114 -------------------------- rotate 180 0 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-x","y","-z"}; break;} //9 -------------------------- rotate -180 -90 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","y","-x"}; break;} //115 -------------------------- rotate 180 90 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","y","x"}; break;} //8 -------------------------- rotate -180 -90 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","x","y"}; break;} //116 -------------------------- rotate 180 90 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","-x","y"}; break;} //7 -------------------------- rotate -180 -90 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","-y","x"}; break;} //117 -------------------------- rotate 180 90 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","-y","-x"}; break;} //6 -------------------------- rotate -180 -90 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","-x","-y"}; break;} //118 -------------------------- rotate 180 90 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","x","-y"}; break;} //5 -------------------------- rotate -180 -90 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"z","y","-x"}; break;} //119 -------------------------- rotate 180 90 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-z","y","x"}; break;} //4 -------------------------- rotate -180 -180 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","y","z"}; break;} //120 -------------------------- rotate 180 180 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","y","z"}; break;} //3 -------------------------- rotate -180 -180 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-y","x","z"}; break;} //121 -------------------------- rotate 180 180 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"y","-x","z"}; break;} //2 -------------------------- rotate -180 -180 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-x","-y","z"}; break;} //122 -------------------------- rotate 180 180 0 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-x","-y","z"}; break;} //1 -------------------------- rotate -180 -180 -90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"y","-x","z"}; break;} //123 -------------------------- rotate 180 180 90 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"-y","x","z"}; break;} //0 -------------------------- rotate -180 -180 -180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","y","z"}; break;} //124 -------------------------- rotate 180 180 180 $rotateObject; if (matchBox:calculateWorldLocalEulerOffset($pivot,$pointX,$pointY,$pointZ)){ $axis = {"x","y","z"}; break;} } return $axis; } global proc int attributeExists(string $attr, string $node) { if ("" == $attr || "" == $node) return 0; //thanks to Michael Hutchinson and Matt Schiller for this tip return (size(`ls($node + "." + $attr)`)); //below is the old stinky version //// First check to see if the attribute matches the short names // //string $attrList[] = `listAttr -shortNames $node`; //int $max = size($attrList); //int $i; //for( $i = 0; $i<$max; $i++ ) //{ // if( $attr == $attrList[$i] ) // { // return 1; // } //} //// Now check against the long names // //$attrList = `listAttr $node`; //$max = size($attrList); //for( $i = 0; $i<$max; $i++ ) //{ // if( $attr == $attrList[$i] ) // { // return 1; // } //} //return 0; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // EMBEDED XPM ICONS ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// global proc string matchBoxActionExchange(){ string $xpm; $xpm += ("/* XPM */\n"); $xpm += ("static char *magick[] = {\n"); $xpm += ("/* columns rows colors chars-per-pixel */\n"); $xpm += ("\"32 32 25 1\",\n"); $xpm += ("\" c #892f00\",\n"); $xpm += ("\". c #8e390d\",\n"); $xpm += ("\"X c #974d26\",\n"); $xpm += ("\"o c #9c5732\",\n"); $xpm += ("\"O c #a1623f\",\n"); $xpm += ("\"+ c #aa7658\",\n"); $xpm += ("\"@ c #ae7f64\",\n"); $xpm += ("\"# c #fd2a00\",\n"); $xpm += ("\"$ c #fa340d\",\n"); $xpm += ("\"% c #f54926\",\n"); $xpm += ("\"& c #f35432\",\n"); $xpm += ("\"* c #f05e3f\",\n"); $xpm += ("\"= c #eb7358\",\n"); $xpm += ("\"- c #e97d64\",\n"); $xpm += ("\"; c #b38970\",\n"); $xpm += ("\": c #e68770\",\n"); $xpm += ("\"> c #bc9d89\",\n"); $xpm += ("\", c #c1a896\",\n"); $xpm += ("\"< c #dea696\",\n"); $xpm += ("\"1 c #cbbcaf\",\n"); $xpm += ("\"2 c #d9bbaf\",\n"); $xpm += ("\"3 c #e19c89\",\n"); $xpm += ("\"4 c #cfc6bb\",\n"); $xpm += ("\"5 c #d7c6bb\",\n"); $xpm += ("\"6 c #d4d0c8\",\n"); $xpm += ("/* pixels */\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"666666666666666666666*3666666666\",\n"); $xpm += ("\"666666666666666666666&#=66666666\",\n"); $xpm += ("\"666666666666666666666&##%2666666\",\n"); $xpm += ("\"666666666666666666666&###$<66666\",\n"); $xpm += ("\"666666666666666666666&#####-6666\",\n"); $xpm += ("\"&&&&&&&&&&&&&&&&&&&&&$######&566\",\n"); $xpm += ("\"#############################$<6\",\n"); $xpm += ("\"###############################:\",\n"); $xpm += ("\"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\",\n"); $xpm += ("\"; \",\n"); $xpm += ("\"6,. \",\n"); $xpm += ("\"664o .ooooooooooooooooooooo\",\n"); $xpm += ("\"6666@ o666666666666666666666\",\n"); $xpm += ("\"66666,. o666666666666666666666\",\n"); $xpm += ("\"6666661X o666666666666666666666\",\n"); $xpm += ("\"66666666+ o666666666666666666666\",\n"); $xpm += ("\"666666666>O666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\"\n"); $xpm += ("};\n"); return $xpm; } //end matchBoxActionExchange; global proc string matchBoxActionExchangeShelf(){ string $xpm; $xpm += ("/* XPM */\n"); $xpm += ("static char *matchBoxActionExchangeShelf[] = {\n"); $xpm += ("/* columns rows colors chars-per-pixel */\n"); $xpm += ("\"32 32 85 1\",\n"); $xpm += ("\" c #995732\",\n"); $xpm += ("\". c #9C5732\",\n"); $xpm += ("\"X c #9D5B37\",\n"); $xpm += ("\"o c #9F5D39\",\n"); $xpm += ("\"O c #9F5E3B\",\n"); $xpm += ("\"+ c #A0613E\",\n"); $xpm += ("\"@ c #A16340\",\n"); $xpm += ("\"# c #A56B4A\",\n"); $xpm += ("\"$ c #AB775A\",\n"); $xpm += ("\"% c #AC795C\",\n"); $xpm += ("\"& c #ED5332\",\n"); $xpm += ("\"* c #F35432\",\n"); $xpm += ("\"= c #F25634\",\n"); $xpm += ("\"- c #F15939\",\n"); $xpm += ("\"; c #F15A39\",\n"); $xpm += ("\": c #F05D3E\",\n"); $xpm += ("\"> c #EF6345\",\n"); $xpm += ("\", c #ED6B4E\",\n"); $xpm += ("\"< c #EC6F52\",\n"); $xpm += ("\"1 c #EC6F53\",\n"); $xpm += ("\"2 c #E57156\",\n"); $xpm += ("\"3 c #EC7054\",\n"); $xpm += ("\"4 c #EA765C\",\n"); $xpm += ("\"5 c #F06243\",\n"); $xpm += ("\"6 c #E97C63\",\n"); $xpm += ("\"7 c #AE8064\",\n"); $xpm += ("\"8 c #AF8267\",\n"); $xpm += ("\"9 c #AF8368\",\n"); $xpm += ("\"0 c #AD846A\",\n"); $xpm += ("\"q c #B18A72\",\n"); $xpm += ("\"w c #B38A70\",\n"); $xpm += ("\"e c #B38A71\",\n"); $xpm += ("\"r c #B48A72\",\n"); $xpm += ("\"t c #B58F77\",\n"); $xpm += ("\"y c #B69078\",\n"); $xpm += ("\"u c #E48D77\",\n"); $xpm += ("\"i c #B69883\",\n"); $xpm += ("\"p c #B99680\",\n"); $xpm += ("\"a c #ACA9A3\",\n"); $xpm += ("\"s c #AFABA5\",\n"); $xpm += ("\"d c #B2AFA9\",\n"); $xpm += ("\"f c #B4B1A9\",\n"); $xpm += ("\"g c #BBB7B1\",\n"); $xpm += ("\"h c #BCB9B2\",\n"); $xpm += ("\"j c #BEBAB3\",\n"); $xpm += ("\"k c #DA9C8B\",\n"); $xpm += ("\"l c #DF9E8B\",\n"); $xpm += ("\"z c #C4AE9E\",\n"); $xpm += ("\"x c #D8A292\",\n"); $xpm += ("\"c c #D8A898\",\n"); $xpm += ("\"v c #DDAC9D\",\n"); $xpm += ("\"b c #C7B9AD\",\n"); $xpm += ("\"n c #CABAAD\",\n"); $xpm += ("\"m c #CBBCAF\",\n"); $xpm += ("\"M c #C1BDB6\",\n"); $xpm += ("\"N c #CBBDB1\",\n"); $xpm += ("\"B c #D9BBAF\",\n"); $xpm += ("\"V c #D9BCAF\",\n"); $xpm += ("\"C c #D8BDB1\",\n"); $xpm += ("\"Z c #E29581\",\n"); $xpm += ("\"A c #E09986\",\n"); $xpm += ("\"S c #C5C1BA\",\n"); $xpm += ("\"D c #CDC1B5\",\n"); $xpm += ("\"F c #CDC2B6\",\n"); $xpm += ("\"G c #C8C5BD\",\n"); $xpm += ("\"H c #C9C5BE\",\n"); $xpm += ("\"J c #CAC6BE\",\n"); $xpm += ("\"K c #CFC5BB\",\n"); $xpm += ("\"L c #D7C5BB\",\n"); $xpm += ("\"P c #D8C0B5\",\n"); $xpm += ("\"I c #D8C3B8\",\n"); $xpm += ("\"U c #CBC8C0\",\n"); $xpm += ("\"Y c #CDC9C1\",\n"); $xpm += ("\"T c #CFCBC3\",\n"); $xpm += ("\"R c #CFCBC4\",\n"); $xpm += ("\"E c #D0C9C1\",\n"); $xpm += ("\"W c #D0CCC4\",\n"); $xpm += ("\"Q c #D1CDC5\",\n"); $xpm += ("\"! c #D2CEC6\",\n"); $xpm += ("\"~ c #D3CFC7\",\n"); $xpm += ("\"^ c #D4CFC7\",\n"); $xpm += ("\"/ c #D5CEC6\",\n"); $xpm += ("\"( c #D4D0C8\",\n"); $xpm += ("\") c #E1DDD8\",\n"); $xpm += ("\"_ c #E7E6E1\",\n"); $xpm += ("/* pixels */\n"); $xpm += ("\"((~(((((((((((~(((((((((((~(((((\",\n"); $xpm += ("\"((~~((((((((((~~((((((((((~~((((\",\n"); $xpm += ("\"((~~~~~Y~YY~~~Y~Y~~Y~YY~~~~~~~((\",\n"); $xpm += ("\"(~~~YGGGGGGGSGGGGGGGGGGGSGGYR~~(\",\n"); $xpm += ("\"^~~Y)______________________)J~~~\",\n"); $xpm += ("\"^~USY((((((((((((((((((((((RSY~~\",\n"); $xpm += ("\"^~GMR(((((((((((((((((((((^RMG~~\",\n"); $xpm += ("\"^RGjR(((((((((((((((((((((~~jGT~\",\n"); $xpm += ("\"(YGhR((((((((((((((((((((((RhG~~\",\n"); $xpm += ("\"(~GhR^(((((((((((((BuL(((((RhGR~\",\n"); $xpm += ("\"(YGhR^(((((((((((((B;4P((((RhG~~\",\n"); $xpm += ("\"(~Gh~((((((((((((((C:*>v(((RhGR~\",\n"); $xpm += ("\"(~GhY/(////////////B:**;Z/(RhG~~\",\n"); $xpm += ("\"(YGh213311111111113,=****6IRhGY~\",\n"); $xpm += ("\"(YGh&=*=******************:chG~~\",\n"); $xpm += ("\"(~GhkAAllllllllllllllllllllxhS~(\",\n"); $xpm += ("\"(TGhT((((((((((((((((((((((TjGR(\",\n"); $xpm += ("\"(~Ghi89999999999888899999988hGR(\",\n"); $xpm += ("\"(TGhb%X.................... hGR(\",\n"); $xpm += ("\"(TGhY(yo...X9wwwrqrqwrqrrwwqhG!(\",\n"); $xpm += ("\"(TGhT((z#..+D!(((((((((((((ThGR(\",\n"); $xpm += ("\"(~GhT(((D%.OD((((((((((((((ThGR(\",\n"); $xpm += ("\"(TGhT(((((y+b!(((((((((((((ThG!(\",\n"); $xpm += ("\"(TGhT(((((KyD((((((((((((((ThGQ(\",\n"); $xpm += ("\"(~GhY~(((((((((((((((((((((TjGT~\",\n"); $xpm += ("\"(TGh~/(((((((((((((((((((((TjGR(\",\n"); $xpm += ("\"(YGMR((((((!(((((((((((((((TjJR(\",\n"); $xpm += ("\"(~GMhddddddddddddddddddddddhMUR(\",\n"); $xpm += ("\"(~YSgfsaaaaaaaaaaaaaaaaaasfhST!(\",\n"); $xpm += ("\"((YYSMhhhhhhhhhhhhhhhhhhhjMSUR~(\",\n"); $xpm += ("\"(~~YYGGGGGGGGGGGGGGGGGGJGGJTR!~(\",\n"); $xpm += ("\"((~~~~R~QTQTQTQTQTQQ!RRRRTR!~~((\"\n"); $xpm += ("};\n"); return $xpm; } //end matchBoxActionExchangeShelf; global proc string matchBoxActionMatch(){ string $xpm; $xpm += ("/* XPM */\n"); $xpm += ("static char *magick[] = {\n"); $xpm += ("/* columns rows colors chars-per-pixel */\n"); $xpm += ("\"32 32 25 1\",\n"); $xpm += ("\" c #004389\",\n"); $xpm += ("\". c #0d4c8d\",\n"); $xpm += ("\"X c #285e95\",\n"); $xpm += ("\"o c #356699\",\n"); $xpm += ("\"O c #436f9d\",\n"); $xpm += ("\"+ c #249dd9\",\n"); $xpm += ("\"@ c #2fa0d8\",\n"); $xpm += ("\"# c #5d81a5\",\n"); $xpm += ("\"$ c #6a89a8\",\n"); $xpm += ("\"% c #7792ac\",\n"); $xpm += ("\"& c #45a7d6\",\n"); $xpm += ("\"* c #50aad5\",\n"); $xpm += ("\"= c #5badd4\",\n"); $xpm += ("\"- c #71b3d2\",\n"); $xpm += ("\"; c #7cb6d1\",\n"); $xpm += ("\": c #91a4b4\",\n"); $xpm += ("\"> c #9fadb8\",\n"); $xpm += ("\", c #87bacf\",\n"); $xpm += ("\"< c #b9bec0\",\n"); $xpm += ("\"1 c #9dc0cd\",\n"); $xpm += ("\"2 c #a8c3cc\",\n"); $xpm += ("\"3 c #becaca\",\n"); $xpm += ("\"4 c #c7c7c4\",\n"); $xpm += ("\"5 c #c9cdc9\",\n"); $xpm += ("\"6 c #d4d0c8\",\n"); $xpm += ("/* pixels */\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"666666666666666666666=1666666666\",\n"); $xpm += ("\"666666666666666666666*+-66666666\",\n"); $xpm += ("\"666666666666666666666*++&3666666\",\n"); $xpm += ("\"666666666666666666666*+++@266666\",\n"); $xpm += ("\"666666666666666666666*+++++;6666\",\n"); $xpm += ("\"*********************@++++++*566\",\n"); $xpm += ("\"+++++++++++++++++++++++++++++@26\",\n"); $xpm += ("\"+++++++++++++++++++++++++++++++,\",\n"); $xpm += ("\"22222222222222222222222222222222\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\",\n"); $xpm += ("\" %\",\n"); $xpm += ("\" .>6\",\n"); $xpm += ("\"ooooooooooooooooooooo. o466\",\n"); $xpm += ("\"666666666666666666666o $6666\",\n"); $xpm += ("\"666666666666666666666o .>66666\",\n"); $xpm += ("\"666666666666666666666o X<666666\",\n"); $xpm += ("\"666666666666666666666o #66666666\",\n"); $xpm += ("\"666666666666666666666O:666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\"\n"); $xpm += ("};\n"); return $xpm; } //end matchBoxActionMatch; global proc string matchBoxActionMatchShelf(){ string $xpm; $xpm += ("/* XPM */\n"); $xpm += ("static char *matchBoxActionMatchShelf[] = {\n"); $xpm += ("/* columns rows colors chars-per-pixel */\n"); $xpm += ("\"32 32 85 1\",\n"); $xpm += ("\" c #356596\",\n"); $xpm += ("\". c #356699\",\n"); $xpm += ("\"X c #3A699A\",\n"); $xpm += ("\"o c #3D6C9B\",\n"); $xpm += ("\"O c #3E6C9C\",\n"); $xpm += ("\"+ c #426F9D\",\n"); $xpm += ("\"@ c #44709D\",\n"); $xpm += ("\"# c #4F78A0\",\n"); $xpm += ("\"$ c #5F82A6\",\n"); $xpm += ("\"% c #6184A6\",\n"); $xpm += ("\"& c #6A89A8\",\n"); $xpm += ("\"* c #6D8CA9\",\n"); $xpm += ("\"= c #6E8CA9\",\n"); $xpm += ("\"- c #708CA7\",\n"); $xpm += ("\"; c #7793AC\",\n"); $xpm += ("\": c #7992AA\",\n"); $xpm += ("\"> c #7893AC\",\n"); $xpm += ("\", c #7993AD\",\n"); $xpm += ("\"< c #7E97AF\",\n"); $xpm += ("\"1 c #7F98AF\",\n"); $xpm += ("\"2 c #4FA7D0\",\n"); $xpm += ("\"3 c #50AAD5\",\n"); $xpm += ("\"4 c #50ABD5\",\n"); $xpm += ("\"5 c #52ABD5\",\n"); $xpm += ("\"6 c #56ABD4\",\n"); $xpm += ("\"7 c #5BADD4\",\n"); $xpm += ("\"8 c #5FAFD4\",\n"); $xpm += ("\"9 c #61AED3\",\n"); $xpm += ("\"0 c #6FB0CC\",\n"); $xpm += ("\"q c #68B1D2\",\n"); $xpm += ("\"w c #6DB2D2\",\n"); $xpm += ("\"e c #6EB3D2\",\n"); $xpm += ("\"r c #75B4D1\",\n"); $xpm += ("\"t c #7BB7D0\",\n"); $xpm += ("\"y c #8B9DAF\",\n"); $xpm += ("\"u c #889EB2\",\n"); $xpm += ("\"i c #ACA9A3\",\n"); $xpm += ("\"p c #AFABA5\",\n"); $xpm += ("\"a c #A8B3BB\",\n"); $xpm += ("\"s c #B2AFA9\",\n"); $xpm += ("\"d c #B4B1A9\",\n"); $xpm += ("\"f c #B7BBBC\",\n"); $xpm += ("\"g c #BBB7B1\",\n"); $xpm += ("\"h c #BCB9B2\",\n"); $xpm += ("\"j c #BEBAB3\",\n"); $xpm += ("\"k c #8DBBCF\",\n"); $xpm += ("\"l c #95BECE\",\n"); $xpm += ("\"z c #9DBCC7\",\n"); $xpm += ("\"x c #9ABECC\",\n"); $xpm += ("\"c c #A3BEC7\",\n"); $xpm += ("\"v c #B8BDC0\",\n"); $xpm += ("\"b c #BABFC1\",\n"); $xpm += ("\"n c #9FC0CC\",\n"); $xpm += ("\"m c #A9C0C7\",\n"); $xpm += ("\"M c #AEC5CC\",\n"); $xpm += ("\"N c #BBC0C1\",\n"); $xpm += ("\"B c #BEC9CA\",\n"); $xpm += ("\"V c #BECACA\",\n"); $xpm += ("\"C c #C1BDB6\",\n"); $xpm += ("\"Z c #C5C1BA\",\n"); $xpm += ("\"A c #C8C5BD\",\n"); $xpm += ("\"S c #C9C5BE\",\n"); $xpm += ("\"D c #CAC6BE\",\n"); $xpm += ("\"F c #C0C3C2\",\n"); $xpm += ("\"G c #C1C3C3\",\n"); $xpm += ("\"H c #C6C6C4\",\n"); $xpm += ("\"J c #C0CACA\",\n"); $xpm += ("\"K c #C3CBC9\",\n"); $xpm += ("\"L c #C6CCC9\",\n"); $xpm += ("\"P c #CBC8C0\",\n"); $xpm += ("\"I c #CBC9C2\",\n"); $xpm += ("\"U c #CDC9C1\",\n"); $xpm += ("\"Y c #CDCBC4\",\n"); $xpm += ("\"T c #CFCBC4\",\n"); $xpm += ("\"R c #C8CCC9\",\n"); $xpm += ("\"E c #D0CCC4\",\n"); $xpm += ("\"W c #D1CDC5\",\n"); $xpm += ("\"Q c #D2CEC6\",\n"); $xpm += ("\"! c #D3CFC7\",\n"); $xpm += ("\"~ c #D2CFC8\",\n"); $xpm += ("\"^ c #D3CFC8\",\n"); $xpm += ("\"/ c #D3D0C8\",\n"); $xpm += ("\"( c #D4D0C8\",\n"); $xpm += ("\") c #E1DDD8\",\n"); $xpm += ("\"_ c #E7E6E1\",\n"); $xpm += ("/* pixels */\n"); $xpm += ("\"((!(((((((((((((((((((((((((((((\",\n"); $xpm += ("\"((!!((((((((((!!(((((((((((Q((((\",\n"); $xpm += ("\"((!!!!!U!UT!!!U!U!!U!UU!!!!!(Q((\",\n"); $xpm += ("\"(!!!UAAAAAAHZAAAAAAAAAAAZAAD!!Q(\",\n"); $xpm += ("\"!!!U)______________________)A!!!\",\n"); $xpm += ("\"!!PZU((((((((((((((((((((((TZU!Q\",\n"); $xpm += ("\"!!ACT((((((((((((((((((((((TCA!!\",\n"); $xpm += ("\"!TAjT((((((((((((((((((((((ThA!Q\",\n"); $xpm += ("\"(EAgT((((((((((((((((((((((ThA!Q\",\n"); $xpm += ("\"(!AhT((((((((((((((VkR(((((ThA!!\",\n"); $xpm += ("\"Q!AhT((~(((((((((((V5rK((((TgAEQ\",\n"); $xpm += ("\"QTAhT((~(((((((((((J759M(((ThA!!\",\n"); $xpm += ("\"(!AhT!~~~~//////^^^V7445l~(ThAEQ\",\n"); $xpm += ("\"QEAh0wwweeqqqeqewwwq44444tLThA!(\",\n"); $xpm += ("\"(EZh25544444554444544444549mhAEQ\",\n"); $xpm += ("\"(!AhzxxmxmnnnnnnnnnnnmxxmxxchZ!(\",\n"); $xpm += ("\"(UAh!(((((((((((/((((((((((UjAT(\",\n"); $xpm += ("\"(!Ah=*******====********==&uhA!(\",\n"); $xpm += ("\"(!Ah .....................$fgAT!\",\n"); $xpm += ("\"(UAh:;:;,,:::::,,,,*X...Ou(ThA!!\",\n"); $xpm += ("\"(UAhT((((((((((((((G+..#a((ThAT(\",\n"); $xpm += ("\"(!AhT((((((((((((((NO.$G(((ThA!(\",\n"); $xpm += ("\"(UAhT~(((((((((((((v# c #aab389\",\n"); $xpm += ("\", c #b2b996\",\n"); $xpm += ("\"< c #c4c893\",\n"); $xpm += ("\"1 c #c7c99d\",\n"); $xpm += ("\"2 c #c3c4af\",\n"); $xpm += ("\"3 c #cdcdb3\",\n"); $xpm += ("\"4 c #cccabb\",\n"); $xpm += ("\"5 c #d1cebd\",\n"); $xpm += ("\"6 c #d4d0c8\",\n"); $xpm += ("/* pixels */\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"666666666<=6666666666=<666666666\",\n"); $xpm += ("\"66666666-+*6666666666*+-66666666\",\n"); $xpm += ("\"6666663#++*6666666666*++#3666666\",\n"); $xpm += ("\"666661@+++*6666666666*+++@166666\",\n"); $xpm += ("\"6666;+++++*6666666666*+++++;6666\",\n"); $xpm += ("\"665*++++++@**********@++++++*566\",\n"); $xpm += ("\"61@++++++++++++++++++++++++++@16\",\n"); $xpm += ("\":++++++++++++++++++++++++++++++:\",\n"); $xpm += ("\"11111111111111111111111111111111\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\",\n"); $xpm += ("\"& &\",\n"); $xpm += ("\"6,. .,6\",\n"); $xpm += ("\"664o .oooooooooo. o466\",\n"); $xpm += ("\"6666% o6666666666o %6666\",\n"); $xpm += ("\"66666,. o6666666666o .,66666\",\n"); $xpm += ("\"6666662X o6666666666o X2666666\",\n"); $xpm += ("\"66666666$ o6666666666o $66666666\",\n"); $xpm += ("\"666666666>O6666666666O>666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\",\n"); $xpm += ("\"66666666666666666666666666666666\"\n"); $xpm += ("};\n"); return $xpm; } //end matchBoxActionMirror; global proc string matchBoxActionMirrorShelf(){ string $xpm; $xpm += ("/* XPM */\n"); $xpm += ("static char *matchBoxActionMirrorShelf[] = {\n"); $xpm += ("/* columns rows colors chars-per-pixel */\n"); $xpm += ("\"32 32 78 1\",\n"); $xpm += ("\" c #708A32\",\n"); $xpm += ("\". c #738D37\",\n"); $xpm += ("\"X c #748D39\",\n"); $xpm += ("\"o c #768E3B\",\n"); $xpm += ("\"O c #78903E\",\n"); $xpm += ("\"+ c #799140\",\n"); $xpm += ("\"@ c #80964A\",\n"); $xpm += ("\"# c #8A9C5A\",\n"); $xpm += ("\"$ c #8B9E5C\",\n"); $xpm += ("\"% c #91A264\",\n"); $xpm += ("\"& c #93A367\",\n"); $xpm += ("\"* c #94A468\",\n"); $xpm += ("\"= c #9AA871\",\n"); $xpm += ("\"- c #9AA872\",\n"); $xpm += ("\"; c #9DAB77\",\n"); $xpm += ("\": c #9FAB78\",\n"); $xpm += ("\"> c #ADBD49\",\n"); $xpm += ("\", c #AEBD49\",\n"); $xpm += ("\"< c #AEBD4B\",\n"); $xpm += ("\"1 c #AFBD4E\",\n"); $xpm += ("\"2 c #AFBD4F\",\n"); $xpm += ("\"3 c #B0BE52\",\n"); $xpm += ("\"4 c #B2BF58\",\n"); $xpm += ("\"5 c #B2C057\",\n"); $xpm += ("\"6 c #B5C060\",\n"); $xpm += ("\"7 c #B5C164\",\n"); $xpm += ("\"8 c #B6C166\",\n"); $xpm += ("\"9 c #B8C26C\",\n"); $xpm += ("\"0 c #BAC372\",\n"); $xpm += ("\"q c #A3AE83\",\n"); $xpm += ("\"w c #A4AF80\",\n"); $xpm += ("\"e c #B8BD9E\",\n"); $xpm += ("\"r c #ACA9A3\",\n"); $xpm += ("\"t c #AFABA5\",\n"); $xpm += ("\"y c #B2AFA9\",\n"); $xpm += ("\"u c #B4B1A9\",\n"); $xpm += ("\"i c #BBB7B1\",\n"); $xpm += ("\"p c #BCB9B2\",\n"); $xpm += ("\"a c #BEBAB3\",\n"); $xpm += ("\"s c #BFC683\",\n"); $xpm += ("\"d c #C1BDB6\",\n"); $xpm += ("\"f c #C1C78B\",\n"); $xpm += ("\"g c #C2C690\",\n"); $xpm += ("\"h c #C4C794\",\n"); $xpm += ("\"j c #C1C49A\",\n"); $xpm += ("\"k c #C4C69E\",\n"); $xpm += ("\"l c #C0C0AD\",\n"); $xpm += ("\"z c #C2C3AD\",\n"); $xpm += ("\"x c #C4C5AF\",\n"); $xpm += ("\"c c #C9CAA3\",\n"); $xpm += ("\"v c #C4C5B1\",\n"); $xpm += ("\"b c #C7C7B5\",\n"); $xpm += ("\"n c #C5C1BA\",\n"); $xpm += ("\"m c #C8C5BD\",\n"); $xpm += ("\"M c #C9C5BE\",\n"); $xpm += ("\"N c #CAC6BE\",\n"); $xpm += ("\"B c #C8C8B6\",\n"); $xpm += ("\"V c #CDCDB2\",\n"); $xpm += ("\"C c #CDCDB3\",\n"); $xpm += ("\"Z c #CECDB5\",\n"); $xpm += ("\"A c #CBCABB\",\n"); $xpm += ("\"S c #CFCEB8\",\n"); $xpm += ("\"D c #D0CEBA\",\n"); $xpm += ("\"F c #D0CFBD\",\n"); $xpm += ("\"G c #CBC8C0\",\n"); $xpm += ("\"H c #CDC9C1\",\n"); $xpm += ("\"J c #CCCAC0\",\n"); $xpm += ("\"K c #CFCBC4\",\n"); $xpm += ("\"L c #D0CCC4\",\n"); $xpm += ("\"P c #D1CDC5\",\n"); $xpm += ("\"I c #D2CEC6\",\n"); $xpm += ("\"U c #D3CFC7\",\n"); $xpm += ("\"Y c #D3D0C6\",\n"); $xpm += ("\"T c #D3D0C7\",\n"); $xpm += ("\"R c #D4D0C7\",\n"); $xpm += ("\"E c #D4D0C8\",\n"); $xpm += ("\"W c #E1DDD8\",\n"); $xpm += ("\"Q c #E7E6E1\",\n"); $xpm += ("/* pixels */\n"); $xpm += ("\"EEUEEEEEEEEEEETEEEEETEEEEEEEEEEE\",\n"); $xpm += ("\"EEUUEEEEETEEEETTEEEETTEEEEEEEEEE\",\n"); $xpm += ("\"EEUUUUUHKKIKIKKKKKIKKKPKIKIUUIEE\",\n"); $xpm += ("\"EUUUHmmmmmmNmmNmmmmNmmNNNmNAUUEE\",\n"); $xpm += ("\"UUUHWQQQQQQQQQQQQQQQQQQQQQQWmUUI\",\n"); $xpm += ("\"UUGnHEEEEEEEEEEETTEEEEEEEEEKnHUE\",\n"); $xpm += ("\"UUmdKEEEEEEEEEEETEEEEEEEEEEKdmUU\",\n"); $xpm += ("\"UKmaKEEEEEEEEEEEEEEEEEEEEEEKpmUI\",\n"); $xpm += ("\"ELmiKEEEEEEEEEEEEEEEEEEEEEEKpmUI\",\n"); $xpm += ("\"EUmpKEEEEEFsVEEEEEECsAEEEEEKpmUI\",\n"); $xpm += ("\"IUmpHEEEEZ91VEEEEEEC39ZEEEEKpmLI\",\n"); $xpm += ("\"IKmpUEEEc4,3ZEEIEEEZ3,4cEEEKpnUE\",\n"); $xpm += ("\"EUmpKEUf3,>3CIIIIITV3,,3fUUKpmUI\",\n"); $xpm += ("\"ILmpKD0,,,,,68787795,,,,,0DUpmUU\",\n"); $xpm += ("\"ELnpk4<<,,,,,,,,>55>,,,,,,4kpmLI\",\n"); $xpm += ("\"EUmpjfhhhhhhhhhhgggghhhhhhfjpnUU\",\n"); $xpm += ("\"IPmpAEEEEEEEEEEEYUUREEEEEEIKpmKI\",\n"); $xpm += ("\"YPmpq%***************&***&%wpmIT\",\n"); $xpm += ("\"EImpa$ . #apbKT\",\n"); $xpm += ("\"YKmpKYwX .*======*X XXwEKpNIT\",\n"); $xpm += ("\"EKmpKEEe+ OBEEEUREBO +eEEKpMKE\",\n"); $xpm += ("\"EImpKEEEA$ OvEEERRExo $bEEEKpMKE\",\n"); $xpm += ("\"IPmpKEEEEI:+zEEERRRxO:EEEEEKpMKE\",\n"); $xpm += ("\"TKmpKEEEEEA:xEEERRRb:ZEEEEIKpMUE\",\n"); $xpm += ("\"EIbpKEEEEEEEEEEEEEEEEEEEEEEKpMKI\",\n"); $xpm += ("\"TKNaKEEEEEEEEEEEEEEEEEEEEEEKpMKT\",\n"); $xpm += ("\"TKNaKEEEEEEIEEEEEEEEEEEEEEEKaNII\",\n"); $xpm += ("\"EINdpyyyyyyyyyyyyyyyyyyyyyypdNIE\",\n"); $xpm += ("\"EIHnpytrrrrrrrrrrrrrrrrrrtypbGEE\",\n"); $xpm += ("\"EIKGndaapppppppppppppppppadnGKEE\",\n"); $xpm += ("\"EIUKHmmMMMmmMMMbMMMMMMnbmmmHKKEE\",\n"); $xpm += ("\"EEEIUUKKKKUKKKKKKKKKKKEUKUKUEEEE\"\n"); $xpm += ("};\n"); return $xpm; } //end matchBoxActionMirrorShelf; global proc string matchBoxLinkAttributes(){ string $xpm; $xpm += ("/* XPM */\n"); $xpm += ("static char *link[] = {\n"); $xpm += ("/* columns rows colors chars-per-pixel */\n"); $xpm += ("\"32 32 256 2\",\n"); $xpm += ("\" c #0F1B2F\",\n"); $xpm += ("\". c #101F33\",\n"); $xpm += ("\"X c #04243C\",\n"); $xpm += ("\"o c #14203A\",\n"); $xpm += ("\"O c #381E3C\",\n"); $xpm += ("\"+ c #312C28\",\n"); $xpm += ("\"@ c #36302B\",\n"); $xpm += ("\"# c #3A332D\",\n"); $xpm += ("\"$ c #002642\",\n"); $xpm += ("\"% c #0A2943\",\n"); $xpm += ("\"& c #0F2F4E\",\n"); $xpm += ("\"* c #052F52\",\n"); $xpm += ("\"= c #0F304E\",\n"); $xpm += ("\"- c #08345A\",\n"); $xpm += ("\"; c #1C2349\",\n"); $xpm += ("\": c #123658\",\n"); $xpm += ("\"> c #083C6A\",\n"); $xpm += ("\", c #113860\",\n"); $xpm += ("\"< c #133F6D\",\n"); $xpm += ("\"1 c #243B6C\",\n"); $xpm += ("\"2 c #0F4375\",\n"); $xpm += ("\"3 c #16406C\",\n"); $xpm += ("\"4 c #14447A\",\n"); $xpm += ("\"5 c #184578\",\n"); $xpm += ("\"6 c #194A7C\",\n"); $xpm += ("\"7 c #4E253B\",\n"); $xpm += ("\"8 c #413A34\",\n"); $xpm += ("\"9 c #4C3835\",\n"); $xpm += ("\"0 c #583738\",\n"); $xpm += ("\"q c #5C3C3C\",\n"); $xpm += ("\"w c #542345\",\n"); $xpm += ("\"e c #5D305E\",\n"); $xpm += ("\"r c #712E59\",\n"); $xpm += ("\"t c #633063\",\n"); $xpm += ("\"y c #65397E\",\n"); $xpm += ("\"u c #773265\",\n"); $xpm += ("\"i c #4C443C\",\n"); $xpm += ("\"p c #51473E\",\n"); $xpm += ("\"a c #544A42\",\n"); $xpm += ("\"s c #594E46\",\n"); $xpm += ("\"d c #5D5147\",\n"); $xpm += ("\"f c #5D5248\",\n"); $xpm += ("\"g c #53504C\",\n"); $xpm += ("\"h c #4D5C7C\",\n"); $xpm += ("\"j c #4A6377\",\n"); $xpm += ("\"k c #6D4547\",\n"); $xpm += ("\"l c #605449\",\n"); $xpm += ("\"z c #63584E\",\n"); $xpm += ("\"x c #615E5A\",\n"); $xpm += ("\"c c #6A5C51\",\n"); $xpm += ("\"v c #67645F\",\n"); $xpm += ("\"b c #786659\",\n"); $xpm += ("\"n c #7C6B5D\",\n"); $xpm += ("\"m c #736256\",\n"); $xpm += ("\"M c #696660\",\n"); $xpm += ("\"N c #666767\",\n"); $xpm += ("\"B c #6F787E\",\n"); $xpm += ("\"V c #766F66\",\n"); $xpm += ("\"C c #7D6D60\",\n"); $xpm += ("\"Z c #74716C\",\n"); $xpm += ("\"A c #7A736C\",\n"); $xpm += ("\"S c #7A7570\",\n"); $xpm += ("\"D c #3C3DA6\",\n"); $xpm += ("\"F c #174A85\",\n"); $xpm += ("\"G c #184A83\",\n"); $xpm += ("\"H c #1C528A\",\n"); $xpm += ("\"J c #14538D\",\n"); $xpm += ("\"K c #185293\",\n"); $xpm += ("\"L c #19579E\",\n"); $xpm += ("\"P c #1F5C9B\",\n"); $xpm += ("\"I c #1A55A1\",\n"); $xpm += ("\"U c #1C59A8\",\n"); $xpm += ("\"Y c #1B5AA2\",\n"); $xpm += ("\"T c #1C5FB3\",\n"); $xpm += ("\"R c #1C60A9\",\n"); $xpm += ("\"E c #1E60B9\",\n"); $xpm += ("\"W c #1F6BBB\",\n"); $xpm += ("\"Q c #205A9F\",\n"); $xpm += ("\"! c #34539A\",\n"); $xpm += ("\"~ c #3C58BD\",\n"); $xpm += ("\"^ c #2061AC\",\n"); $xpm += ("\"/ c #226BBD\",\n"); $xpm += ("\"( c #2172BB\",\n"); $xpm += ("\") c #247FBE\",\n"); $xpm += ("\"_ c #3F78BB\",\n"); $xpm += ("\"` c #1668C0\",\n"); $xpm += ("\"' c #1B6BC7\",\n"); $xpm += ("\"] c #1B72CD\",\n"); $xpm += ("\"[ c #226AC2\",\n"); $xpm += ("\"{ c #2573CE\",\n"); $xpm += ("\"} c #2277C4\",\n"); $xpm += ("\"| c #2778D3\",\n"); $xpm += ("\" . c #297ED8\",\n"); $xpm += ("\".. c #2673D1\",\n"); $xpm += ("\"X. c #48698D\",\n"); $xpm += ("\"o. c #46709F\",\n"); $xpm += ("\"O. c #4C719C\",\n"); $xpm += ("\"+. c #55708D\",\n"); $xpm += ("\"@. c #4978AF\",\n"); $xpm += ("\"#. c #4872A3\",\n"); $xpm += ("\"$. c #697783\",\n"); $xpm += ("\"%. c #777F83\",\n"); $xpm += ("\"&. c #2888C6\",\n"); $xpm += ("\"*. c #2688C5\",\n"); $xpm += ("\"=. c #2781D5\",\n"); $xpm += ("\"-. c #2881D3\",\n"); $xpm += ("\";. c #2B86DB\",\n"); $xpm += ("\":. c #268CD4\",\n"); $xpm += ("\">. c #2C9FC5\",\n"); $xpm += ("\",. c #2895C4\",\n"); $xpm += ("\"<. c #2B97D6\",\n"); $xpm += ("\"1. c #2D92DB\",\n"); $xpm += ("\"2. c #3491CE\",\n"); $xpm += ("\"3. c #399EDE\",\n"); $xpm += ("\"4. c #309BE6\",\n"); $xpm += ("\"5. c #2DA4CC\",\n"); $xpm += ("\"6. c #2DAAC1\",\n"); $xpm += ("\"7. c #2EA5C5\",\n"); $xpm += ("\"8. c #2DA4D5\",\n"); $xpm += ("\"9. c #2EAAD4\",\n"); $xpm += ("\"0. c #2FB1CA\",\n"); $xpm += ("\"q. c #34AFC6\",\n"); $xpm += ("\"w. c #3DB1CB\",\n"); $xpm += ("\"e. c #35B1C9\",\n"); $xpm += ("\"r. c #32B3D5\",\n"); $xpm += ("\"t. c #38B4D0\",\n"); $xpm += ("\"y. c #3BBBDA\",\n"); $xpm += ("\"u. c #35BCDC\",\n"); $xpm += ("\"i. c #32A2E8\",\n"); $xpm += ("\"p. c #3EBFE0\",\n"); $xpm += ("\"a. c #35B0ED\",\n"); $xpm += ("\"s. c #3BC0E1\",\n"); $xpm += ("\"d. c #39C5E9\",\n"); $xpm += ("\"f. c #38C7EC\",\n"); $xpm += ("\"g. c #3CCAF2\",\n"); $xpm += ("\"h. c #4882BF\",\n"); $xpm += ("\"j. c #5D80A2\",\n"); $xpm += ("\"k. c #5788B7\",\n"); $xpm += ("\"l. c #659CBF\",\n"); $xpm += ("\"z. c #7D91A4\",\n"); $xpm += ("\"x. c #7B9EB7\",\n"); $xpm += ("\"c. c #4D9FC9\",\n"); $xpm += ("\"v. c #4295D3\",\n"); $xpm += ("\"b. c #46AEC6\",\n"); $xpm += ("\"n. c #48AFC8\",\n"); $xpm += ("\"m. c #41B2CB\",\n"); $xpm += ("\"M. c #4CB2CD\",\n"); $xpm += ("\"N. c #40B6D2\",\n"); $xpm += ("\"B. c #43B8D5\",\n"); $xpm += ("\"V. c #43BCDD\",\n"); $xpm += ("\"C. c #4AB4D4\",\n"); $xpm += ("\"Z. c #5FADCF\",\n"); $xpm += ("\"A. c #59B2CD\",\n"); $xpm += ("\"S. c #50BDDD\",\n"); $xpm += ("\"D. c #5BB6D3\",\n"); $xpm += ("\"F. c #57B9D6\",\n"); $xpm += ("\"G. c #45BFE0\",\n"); $xpm += ("\"H. c #64B1CA\",\n"); $xpm += ("\"J. c #6FB4CC\",\n"); $xpm += ("\"K. c #61B6D2\",\n"); $xpm += ("\"L. c #72B3CD\",\n"); $xpm += ("\"P. c #42C4E7\",\n"); $xpm += ("\"I. c #45C5EA\",\n"); $xpm += ("\"U. c #4BC5E8\",\n"); $xpm += ("\"Y. c #4DC1E6\",\n"); $xpm += ("\"T. c #44CBF3\",\n"); $xpm += ("\"R. c #816F60\",\n"); $xpm += ("\"E. c #8C6862\",\n"); $xpm += ("\"W. c #827162\",\n"); $xpm += ("\"Q. c #877568\",\n"); $xpm += ("\"!. c #81786F\",\n"); $xpm += ("\"~. c #8A7667\",\n"); $xpm += ("\"^. c #8F766B\",\n"); $xpm += ("\"/. c #8C7A6B\",\n"); $xpm += ("\"(. c #817F79\",\n"); $xpm += ("\"). c #947E6D\",\n"); $xpm += ("\"_. c #A67A73\",\n"); $xpm += ("\"`. c #8F8277\",\n"); $xpm += ("\"'. c #86837E\",\n"); $xpm += ("\"]. c #968271\",\n"); $xpm += ("\"[. c #9A8473\",\n"); $xpm += ("\"{. c #9D8876\",\n"); $xpm += ("\"}. c #96857C\",\n"); $xpm += ("\"|. c #A08775\",\n"); $xpm += ("\" X c #A48B7D\",\n"); $xpm += ("\".X c #AA8E7D\",\n"); $xpm += ("\"XX c #A9917D\",\n"); $xpm += ("\"oX c #888580\",\n"); $xpm += ("\"OX c #8D8B85\",\n"); $xpm += ("\"+X c #8D8C89\",\n"); $xpm += ("\"@X c #818D96\",\n"); $xpm += ("\"#X c #908E88\",\n"); $xpm += ("\"$X c #95928D\",\n"); $xpm += ("\"%X c #9B938A\",\n"); $xpm += ("\"&X c #989590\",\n"); $xpm += ("\"*X c #9C9993\",\n"); $xpm += ("\"=X c #8DA3B1\",\n"); $xpm += ("\"-X c #9DABB3\",\n"); $xpm += ("\";X c #A09D97\",\n"); $xpm += ("\":X c #A29F99\",\n"); $xpm += ("\">X c #B09582\",\n"); $xpm += ("\",X c #B39984\",\n"); $xpm += ("\"X7X}.h L / *.,.5.9.9.n.-XJXJXJXJXJXJXJX\",\n"); $xpm += ("\"JXJXJXJXJXJXuXV n [.XXiX,Xw 4 L / ,.q.w.w.t.r.y.p.Z.mXJXJXJXJXJX\",\n"); $xpm += ("\"JXJXJXJXHX4Xz R.{.5XpXsX7 > K W 6.n.H.H.A.M.N.B.y.P.A.uXJXJXJXJX\",\n"); $xpm += ("\"JXJXJXJX:Xa n XXaXbXBX0 - F W 6.n.H.L.H.n.m.m.t.B.V.I.D.HXJXJXJX\",\n"); $xpm += ("\"JXJXHXmXi c _.jXNXHXpX% < U ,.m.A.K.C.t.e.>.7.e.w.B.G.T.=XGXJXJX\",\n"); $xpm += ("\"JXJXHXA a C dXFXLXIXp * F ( q.F.F.G.u.2.] ` W } 7.t.y.I.U.NXJXJX\",\n"); $xpm += ("\"JXJXmX# f {.zXLXKXHX. < I &.N.S.U.C.r [..t.p.T.=XHXJX\",\n"); $xpm += ("\"HXHX&X@ z 2XzXHXUXaX$ < E 5.y.U.U.9 l ~.fXPXk - G ( 5.y.g.J.GXHX\",\n"); $xpm += ("\"HXGXZ # c 6XNXHXUX^.$ < [ 9.p.T.~ # s R.2XLXcXX , Y &.9.f.K.FXGX\",\n"); $xpm += ("\"HXFXM # c 7XzXHXIX.X$ 4 [ 8.d.T.O # f W.,XAXCX = G } 8.f.F.mXHX\",\n"); $xpm += ("\"JXNXM @ l 1XlXzXKXHX; 4 ' <.f.d.i a m Q.2XAXVX. & 5 [ <.g.Z.zXHX\",\n"); $xpm += ("\"HXzX(.+ s ).yXlXFXJXjX1 U :.3.t d c C }.5XDXhX% : 5 / 1.g.l.lXHX\",\n"); $xpm += ("\"HXNX:X@ i b wXlXzXzXFXkX XE.W.R.C Q.[.,XhXPX X- 3 H [ 1.g.@XnXHX\",\n"); $xpm += ("\"JXNXeXg 8 l |.tXlXzXzXzXzXdX1X.XXXXX5X6XcXPXe 2 6 Q | i.v.3XmXHX\",\n"); $xpm += ("\"HXNXuX#X@ p m XXrXlXlXlXlXzXlXkXjXgXxXcXSX_.J H Q [ ;.a.%.rXNXHX\",\n"); $xpm += ("\"JXHXmX8Xx 8 s R..XtXyXtXtXlXzXzXnXMXMXAXZX! U ^ / .i.#.:XuXGXHX\",\n"); $xpm += ("\"JXHXNXtX*Xx p z R.{.2XtXlXlXmXnXMXMXHXZXD ' [ .. .4.v.#X9XNXHXJX\",\n"); $xpm += ("\"JXJXHXmXwX&Xv a c R.)..X5X6XdXvXMXZXaX! ' ....;.;.O.+X3XmXGXJXJX\",\n"); $xpm += ("\"JXJXHXGXuX9X&XoXv f C [.XX5XsXsX,Xy ' ] { -.-._ B #X3XuXNXJXJXJX\",\n"); $xpm += ("\"JXJXJXHXHXmXrX*X$X'.Z v A S A A N j X.#.O.+.$.OX&X8XuXNXJXJXJXJX\",\n"); $xpm += ("\"JXJXJXJXJXGXNXyX9X:X$X$X#X#X#X#X+XOX+XOXOX+X$X:XeXzXNXHXJXJXJXJX\",\n"); $xpm += ("\"JXJXJXJXJXJXJXNXmXuXrX9X4XwXwXwX9X9X4X3X4X9XrXuXNXGXJXJXJXJXJXJX\",\n"); $xpm += ("\"JXJXJXJXJXJXJXJXHXGXNXNXmXNXNXNXNXmXmXmXmXmXNXHXHXJXJXJXJXJXJXJX\",\n"); $xpm += ("\"JXJXJXJXJXJXJXJXJXHXJXHXHXGXHXHXHXHXHXGXHXHXJXJXJXJXJXJXJXJXJXJX\",\n"); $xpm += ("\"JXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJX\",\n"); $xpm += ("\"JXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJX\"\n"); $xpm += ("};\n"); return $xpm; } //end matchBoxLinkAttributes; global proc string matchBoxLinkAttributesDisabled(){ string $xpm; $xpm += ("/* XPM */\n"); $xpm += ("static char *linkDisabled[] = {\n"); $xpm += ("/* columns rows colors chars-per-pixel */\n"); $xpm += ("\"32 32 89 1\",\n"); $xpm += ("\" c gray12\",\n"); $xpm += ("\". c #232322\",\n"); $xpm += ("\"X c #282726\",\n"); $xpm += ("\"o c #2C2C2C\",\n"); $xpm += ("\"O c #302F2D\",\n"); $xpm += ("\"+ c #32302F\",\n"); $xpm += ("\"@ c #323232\",\n"); $xpm += ("\"# c #3A3A3A\",\n"); $xpm += ("\"$ c #3B3D42\",\n"); $xpm += ("\"% c #364149\",\n"); $xpm += ("\"& c #3F4346\",\n"); $xpm += ("\"* c #403E3C\",\n"); $xpm += ("\"= c #434343\",\n"); $xpm += ("\"- c #484644\",\n"); $xpm += ("\"; c #4A4845\",\n"); $xpm += ("\": c #4B4B4B\",\n"); $xpm += ("\"> c #464E55\",\n"); $xpm += ("\", c #47515C\",\n"); $xpm += ("\"< c #495159\",\n"); $xpm += ("\"1 c #535353\",\n"); $xpm += ("\"2 c #555A5E\",\n"); $xpm += ("\"3 c #585653\",\n"); $xpm += ("\"4 c #5C5A57\",\n"); $xpm += ("\"5 c #5C5C5C\",\n"); $xpm += ("\"6 c #4B5763\",\n"); $xpm += ("\"7 c #545C63\",\n"); $xpm += ("\"8 c #515C69\",\n"); $xpm += ("\"9 c #54606D\",\n"); $xpm += ("\"0 c #5A636C\",\n"); $xpm += ("\"q c #5A6673\",\n"); $xpm += ("\"w c #5F6972\",\n"); $xpm += ("\"e c #605E5B\",\n"); $xpm += ("\"r c #65625E\",\n"); $xpm += ("\"t c #646464\",\n"); $xpm += ("\"y c #6E6B67\",\n"); $xpm += ("\"u c #6C6C6C\",\n"); $xpm += ("\"i c #646D75\",\n"); $xpm += ("\"p c #65717D\",\n"); $xpm += ("\"a c #6D777D\",\n"); $xpm += ("\"s c #737373\",\n"); $xpm += ("\"d c #787571\",\n"); $xpm += ("\"f c #7E7B77\",\n"); $xpm += ("\"g c #7B7B7B\",\n"); $xpm += ("\"h c #677987\",\n"); $xpm += ("\"j c #737D82\",\n"); $xpm += ("\"k c #778087\",\n"); $xpm += ("\"l c #778388\",\n"); $xpm += ("\"z c #7F8283\",\n"); $xpm += ("\"x c #7C888C\",\n"); $xpm += ("\"c c #728691\",\n"); $xpm += ("\"v c #768993\",\n"); $xpm += ("\"b c #7A8C95\",\n"); $xpm += ("\"n c #83807B\",\n"); $xpm += ("\"m c #838383\",\n"); $xpm += ("\"M c #8D8A85\",\n"); $xpm += ("\"N c #8B8B8B\",\n"); $xpm += ("\"B c #8E9497\",\n"); $xpm += ("\"V c #908E88\",\n"); $xpm += ("\"C c #95928D\",\n"); $xpm += ("\"Z c #939393\",\n"); $xpm += ("\"A c #989690\",\n"); $xpm += ("\"S c #9C9993\",\n"); $xpm += ("\"D c #9A9A9A\",\n"); $xpm += ("\"F c #A09D97\",\n"); $xpm += ("\"G c #A29F99\",\n"); $xpm += ("\"H c #A4A19C\",\n"); $xpm += ("\"J c #A8A59E\",\n"); $xpm += ("\"K c #A2A2A2\",\n"); $xpm += ("\"L c #AAA6A0\",\n"); $xpm += ("\"P c #ADA9A3\",\n"); $xpm += ("\"I c #ACACAC\",\n"); $xpm += ("\"U c #B0ADA6\",\n"); $xpm += ("\"Y c #B2AFA8\",\n"); $xpm += ("\"T c #B5B2AB\",\n"); $xpm += ("\"R c #B8B5AE\",\n"); $xpm += ("\"E c #B3B3B3\",\n"); $xpm += ("\"W c #BDB9B2\",\n"); $xpm += ("\"Q c #BCBCBC\",\n"); $xpm += ("\"! c #C1BDB6\",\n"); $xpm += ("\"~ c #C3BFB8\",\n"); $xpm += ("\"^ c #C5C1BA\",\n"); $xpm += ("\"/ c #C9C5BD\",\n"); $xpm += ("\"( c #C4C4C4\",\n"); $xpm += ("\") c #CDC9C2\",\n"); $xpm += ("\"_ c #CCCCCC\",\n"); $xpm += ("\"` c #D2CEC6\",\n"); $xpm += ("\"' c #D4D0C8\",\n"); $xpm += ("\"] c #D3D3D3\",\n"); $xpm += ("\"[ c gainsboro\",\n"); $xpm += ("/* pixels */\n"); $xpm += ("\"''''''''''''''''''''''''''''''''\",\n"); $xpm += ("\"''''''''''''''''''''''''''''''''\",\n"); $xpm += ("\"''''''''''''''''''''''''''''''''\",\n"); $xpm += ("\"''''''''''''''''''''''''''''''''\",\n"); $xpm += ("\"'''''''''''''''`''''''`'''''''''\",\n"); $xpm += ("\"'''''''''''WRR'`m,>00qj`''''''''\",\n"); $xpm += ("\"''''''''V3egNAu$5ssggmmai`''''''\",\n"); $xpm += ("\"'''''`A=umDKD#:5usgmmmmNNjL'''''\",\n"); $xpm += ("\"''''`y:sNKII##1usmZDZNNNNDjH`'''\",\n"); $xpm += ("\"'''`t=uZIE(;O:usNDKDNmmmNNDx`'''\",\n"); $xpm += ("\"'''P@5NE(_IX&tgmZDNmggggNVZDw'''\",\n"); $xpm += ("\"''`+:uI(_]:o:sgZDZNmsuusgjNDBE`'\",\n"); $xpm += ("\"'`YX1MQ_]]X#5sNZDZ:mK1=1ugmNDi``\",\n"); $xpm += ("\"'`5@5D(_[I $ugNDZ$1gE]2@:sgNDc)`\",\n"); $xpm += ("\"``O@5K(_[g.=smNDg@1uK]Q.#5ggZv/`\",\n"); $xpm += ("\"`/X@5KQ_[Z.:sgZDo#1sD(( O:smZb~`\",\n"); $xpm += ("\"`/o@1DQ(]_O=smNZ#:tgK(( o:szZc~`\",\n"); $xpm += ("\"`^;o1mEQ(_E:tgN:1eumK_Q.@=smZh!`\",\n"); $xpm += ("\"`~C.=tIEQ((QNgguusmKQ]N@&1dmD0~`\",\n"); $xpm += ("\"`)YX#1mEEQ(QQIDZZZKIQ]:=:7nNjG~`\",\n"); $xpm += ("\"`)Rdo;tDEQQEEQQQEEQQ_N:15smZ5Y/`\",\n"); $xpm += ("\"'`^JO#1uDEEEQQQQQQQ((tttsmNwGW)'\",\n"); $xpm += ("\"'`)TS@=5uNKEEQQQQ(_(uusgzNpVI/`'\",\n"); $xpm += ("\"''`^UA#$5sgZKIEE((Isgggmz8mJW``'\",\n"); $xpm += ("\"''`)!PAn=;umZKIYD5ssggni7VG!/``'\",\n"); $xpm += ("\"'''`)~UGCf1-er3e&$,8867MCJ!/``''\",\n"); $xpm += ("\"''''``/RPGCCVVVCNVMMNVCGYW)`''''\",\n"); $xpm += ("\"''''`'`)^WTPPJPUPPJJJLY!/```''''\",\n"); $xpm += ("\"'''''''``))^^^^//~^~^//```''''''\",\n"); $xpm += ("\"''''''''''``'`'````'````''''''''\",\n"); $xpm += ("\"''''''''''''''''''''''''''''''''\",\n"); $xpm += ("\"''''''''''''''''''''''''''''''''\"\n"); $xpm += ("};\n"); return $xpm; } //end matchBoxLinkAttributesDisabled; global proc string matchBoxPlane(){ string $xpm; $xpm += ("/* XPM */\n"); $xpm += ("static char *magick[] = {\n"); $xpm += ("/* columns rows colors chars-per-pixel */\n"); $xpm += ("\"32 32 205 2\",\n"); $xpm += ("\" c #11519f\",\n"); $xpm += ("\". c #1a569e\",\n"); $xpm += ("\"X c #1c589e\",\n"); $xpm += ("\"o c #0046a6\",\n"); $xpm += ("\"O c #0045a8\",\n"); $xpm += ("\"+ c #004ba2\",\n"); $xpm += ("\"@ c #0148a5\",\n"); $xpm += ("\"# c #014ca1\",\n"); $xpm += ("\"$ c #034ca6\",\n"); $xpm += ("\"% c #054ba3\",\n"); $xpm += ("\"& c #064aa4\",\n"); $xpm += ("\"* c #054fa2\",\n"); $xpm += ("\"= c #074fab\",\n"); $xpm += ("\"- c #094ba4\",\n"); $xpm += ("\"; c #0652a3\",\n"); $xpm += ("\": c #0a52a3\",\n"); $xpm += ("\"> c #0e51a0\",\n"); $xpm += ("\", c #0a55a5\",\n"); $xpm += ("\"< c #0c57ad\",\n"); $xpm += ("\"1 c #0d59a6\",\n"); $xpm += ("\"2 c #0d59a8\",\n"); $xpm += ("\"3 c #0e5aae\",\n"); $xpm += ("\"4 c #0f5eb2\",\n"); $xpm += ("\"5 c #1352a0\",\n"); $xpm += ("\"6 c #1257a5\",\n"); $xpm += ("\"7 c #1553a1\",\n"); $xpm += ("\"8 c #1456a3\",\n"); $xpm += ("\"9 c #1559a6\",\n"); $xpm += ("\"0 c #1d5ea6\",\n"); $xpm += ("\"q c #1763ab\",\n"); $xpm += ("\"w c #1460ad\",\n"); $xpm += ("\"e c #1b69af\",\n"); $xpm += ("\"r c #1f6bad\",\n"); $xpm += ("\"t c #1566b4\",\n"); $xpm += ("\"y c #196bb5\",\n"); $xpm += ("\"u c #1e6cb1\",\n"); $xpm += ("\"i c #1d6eb4\",\n"); $xpm += ("\"p c #1e71b7\",\n"); $xpm += ("\"a c #1f75b9\",\n"); $xpm += ("\"s c #1971b9\",\n"); $xpm += ("\"d c #1d78bb\",\n"); $xpm += ("\"f c #1f7fbe\",\n"); $xpm += ("\"g c #235b9a\",\n"); $xpm += ("\"h c #2b5f99\",\n"); $xpm += ("\"j c #2f6197\",\n"); $xpm += ("\"k c #2b609b\",\n"); $xpm += ("\"l c #2e649b\",\n"); $xpm += ("\"z c #366698\",\n"); $xpm += ("\"x c #396795\",\n"); $xpm += ("\"c c #3d6994\",\n"); $xpm += ("\"v c #3e6e98\",\n"); $xpm += ("\"b c #236fae\",\n"); $xpm += ("\"n c #2f69a9\",\n"); $xpm += ("\"m c #2572b1\",\n"); $xpm += ("\"M c #217bbb\",\n"); $xpm += ("\"N c #217cbc\",\n"); $xpm += ("\"B c #2975b0\",\n"); $xpm += ("\"V c #2f7bb2\",\n"); $xpm += ("\"C c #2f7eb5\",\n"); $xpm += ("\"Z c #287bb8\",\n"); $xpm += ("\"A c #2b7fb8\",\n"); $xpm += ("\"S c #3970ad\",\n"); $xpm += ("\"D c #3d73ac\",\n"); $xpm += ("\"F c #466f91\",\n"); $xpm += ("\"G c #497396\",\n"); $xpm += ("\"H c #4c7a96\",\n"); $xpm += ("\"J c #57768e\",\n"); $xpm += ("\"K c #4673a3\",\n"); $xpm += ("\"L c #4476ad\",\n"); $xpm += ("\"P c #4a7aae\",\n"); $xpm += ("\"I c #60798b\",\n"); $xpm += ("\"U c #647f8b\",\n"); $xpm += ("\"Y c #627c92\",\n"); $xpm += ("\"T c #2385bf\",\n"); $xpm += ("\"R c #2582bd\",\n"); $xpm += ("\"E c #2687bf\",\n"); $xpm += ("\"W c #2688bf\",\n"); $xpm += ("\"Q c #2b83bc\",\n"); $xpm += ("\"! c #2887bf\",\n"); $xpm += ("\"~ c #2a88be\",\n"); $xpm += ("\"^ c #2e89be\",\n"); $xpm += ("\"/ c #3282b7\",\n"); $xpm += ("\"( c #3582b5\",\n"); $xpm += ("\") c #3784b5\",\n"); $xpm += ("\"_ c #318bbd\",\n"); $xpm += ("\"` c #328cbd\",\n"); $xpm += ("\"' c #3688ba\",\n"); $xpm += ("\"] c #348bbd\",\n"); $xpm += ("\"[ c #358cbd\",\n"); $xpm += ("\"{ c #3d8ab7\",\n"); $xpm += ("\"} c #398aba\",\n"); $xpm += ("\"| c #3b8ebb\",\n"); $xpm += ("\" . c #398ebc\",\n"); $xpm += ("\".. c #3c8bb9\",\n"); $xpm += ("\"X. c #3d8fbb\",\n"); $xpm += ("\"o. c #3c8fbc\",\n"); $xpm += ("\"O. c #3f90bb\",\n"); $xpm += ("\"+. c #1782c2\",\n"); $xpm += ("\"@. c #1982c1\",\n"); $xpm += ("\"#. c #1c83c1\",\n"); $xpm += ("\"$. c #1e84c0\",\n"); $xpm += ("\"%. c #2185c0\",\n"); $xpm += ("\"&. c #2486c0\",\n"); $xpm += ("\"*. c #428fb9\",\n"); $xpm += ("\"=. c #4291ba\",\n"); $xpm += ("\"-. c #4492ba\",\n"); $xpm += ("\";. c #5280b2\",\n"); $xpm += ("\":. c #5f8ab5\",\n"); $xpm += ("\">. c #6f8488\",\n"); $xpm += ("\",. c #6a8189\",\n"); $xpm += ("\"<. c #668695\",\n"); $xpm += ("\"1. c #7d8988\",\n"); $xpm += ("\"2. c #728e97\",\n"); $xpm += ("\"3. c #618ab4\",\n"); $xpm += ("\"4. c #668cb4\",\n"); $xpm += ("\"5. c #7091b5\",\n"); $xpm += ("\"6. c #7897b7\",\n"); $xpm += ("\"7. c #7a98b7\",\n"); $xpm += ("\"8. c #828986\",\n"); $xpm += ("\"9. c #838d89\",\n"); $xpm += ("\"0. c #8b8e86\",\n"); $xpm += ("\"q. c #898f89\",\n"); $xpm += ("\"w. c #8f9087\",\n"); $xpm += ("\"e. c #8a918b\",\n"); $xpm += ("\"r. c #8e938e\",\n"); $xpm += ("\"t. c #859699\",\n"); $xpm += ("\"y. c #8e9796\",\n"); $xpm += ("\"u. c #93958c\",\n"); $xpm += ("\"i. c #95958a\",\n"); $xpm += ("\"p. c #95988f\",\n"); $xpm += ("\"a. c #919790\",\n"); $xpm += ("\"s. c #939893\",\n"); $xpm += ("\"d. c #909d9c\",\n"); $xpm += ("\"f. c #9a9c95\",\n"); $xpm += ("\"g. c #9c9a90\",\n"); $xpm += ("\"h. c #9b9f98\",\n"); $xpm += ("\"j. c #98a09b\",\n"); $xpm += ("\"k. c #8ba6bc\",\n"); $xpm += ("\"l. c #8ca5bb\",\n"); $xpm += ("\"z. c #94a1a0\",\n"); $xpm += ("\"x. c #99a2a0\",\n"); $xpm += ("\"c. c #9ea7a4\",\n"); $xpm += ("\"v. c #9ea6a1\",\n"); $xpm += ("\"b. c #9fa9a7\",\n"); $xpm += ("\"n. c #97abb9\",\n"); $xpm += ("\"m. c #96abbd\",\n"); $xpm += ("\"M. c #a4a196\",\n"); $xpm += ("\"N. c #a3a299\",\n"); $xpm += ("\"B. c #a0a29c\",\n"); $xpm += ("\"V. c #a5a39a\",\n"); $xpm += ("\"C. c #a6a79f\",\n"); $xpm += ("\"Z. c #aca99f\",\n"); $xpm += ("\"A. c #a6aeac\",\n"); $xpm += ("\"S. c #a8aaa3\",\n"); $xpm += ("\"D. c #aeaba3\",\n"); $xpm += ("\"F. c #aeaea6\",\n"); $xpm += ("\"G. c #abaea8\",\n"); $xpm += ("\"H. c #a0afbe\",\n"); $xpm += ("\"J. c #aab1ae\",\n"); $xpm += ("\"K. c #afb6b3\",\n"); $xpm += ("\"L. c #b0ada2\",\n"); $xpm += ("\"P. c #b0b0a9\",\n"); $xpm += ("\"I. c #b4b2aa\",\n"); $xpm += ("\"U. c #b6b6ae\",\n"); $xpm += ("\"Y. c #b8b4ab\",\n"); $xpm += ("\"T. c #b4b7b1\",\n"); $xpm += ("\"R. c #b5b9b5\",\n"); $xpm += ("\"E. c #b7bdba\",\n"); $xpm += ("\"W. c #b9b9b1\",\n"); $xpm += ("\"Q. c #b8bab6\",\n"); $xpm += ("\"!. c #bcbbb4\",\n"); $xpm += ("\"~. c #bfbcb3\",\n"); $xpm += ("\"^. c #9eb0c0\",\n"); $xpm += ("\"/. c #a7b4c0\",\n"); $xpm += ("\"(. c #afb9c1\",\n"); $xpm += ("\"). c #b6bec2\",\n"); $xpm += ("\"_. c #bfc0bb\",\n"); $xpm += ("\"`. c #bec2bd\",\n"); $xpm += ("\"'. c #bec3c4\",\n"); $xpm += ("\"]. c #c0bcb3\",\n"); $xpm += ("\"[. c #c1bdb5\",\n"); $xpm += ("\"{. c #c0bfb8\",\n"); $xpm += ("\"}. c #c3c1ba\",\n"); $xpm += ("\"|. c #c2c3bc\",\n"); $xpm += ("\" X c #c5c2ba\",\n"); $xpm += ("\".X c #c5c3bc\",\n"); $xpm += ("\"XX c #c7c4bb\",\n"); $xpm += ("\"oX c #c6c6bf\",\n"); $xpm += ("\"OX c #c8c4bb\",\n"); $xpm += ("\"+X c #c9c6be\",\n"); $xpm += ("\"@X c #c3c6c1\",\n"); $xpm += ("\"#X c #c3c6c5\",\n"); $xpm += ("\"$X c #c6c7c3\",\n"); $xpm += ("\"%X c #c5c7c5\",\n"); $xpm += ("\"&X c #cac9c2\",\n"); $xpm += ("\"*X c #cacbc5\",\n"); $xpm += ("\"=X c #cbccc7\",\n"); $xpm += ("\"-X c #cdcac2\",\n"); $xpm += ("\";X c #ceccc3\",\n"); $xpm += ("\":X c #cecdc7\",\n"); $xpm += ("\">X c #cecec8\",\n"); $xpm += ("\",X c #d2cec6\",\n"); $xpm += ("\" e [ ] ] ^ ^ ] ` [ [ . .X.X.X.O.=.=.=.r 9 %X1X2X2X2X\",\n"); $xpm += ("\"2X,X+XD.i.J @ A ] ^ ~ ~ ~ ^ ^ ] [ [ . .| | X.X.O.} + ;.1X1X2X2X\",\n"); $xpm += ("\"2X2X,X].N.0.g $ ~ ~ ~ W E ! ~ ^ ^ ^ ] [ [ [ . .| X.C + ^.1X1X2X\",\n"); $xpm += ("\"2X2X1X&XI.p.,.% i ~ E %.T E E E ! ~ ^ ^ ^ ] ] [ [ .| q 0 :X1X1X\",\n"); $xpm += ("\"2X2X2X,X XC.e.c o R E T %.#.%.%.T E E ~ ~ ^ ^ ] ` [ .' + :.1X1X\",\n"); $xpm += ("\"2X2X2X1X;XW.f.1.5 3 E %.#.#.#.#.#.#.%.%.&.E ! ~ ^ ] [ ' + * #X1X\",\n"); $xpm += ("\"2X2X2X1X,X+XF.r.J o a T %.@.@.@.@.@.#.#.#.%.&.E ~ ^ Z @ 8 n..& t T #.@.@.+.+.@.@.@.#.%.N = & G j.T.&XXXX c #58565b\",\n"); $xpm += ("\", c #5f5b56\",\n"); $xpm += ("\"< c #5e5f5b\",\n"); $xpm += ("\"1 c #56535b\",\n"); $xpm += ("\"2 c #464477\",\n"); $xpm += ("\"3 c #585664\",\n"); $xpm += ("\"4 c #5b5a62\",\n"); $xpm += ("\"5 c #46744a\",\n"); $xpm += ("\"6 c #586b58\",\n"); $xpm += ("\"7 c #556b52\",\n"); $xpm += ("\"8 c #5c7f5b\",\n"); $xpm += ("\"9 c #46694a\",\n"); $xpm += ("\"0 c #635b55\",\n"); $xpm += ("\"q c #615e59\",\n"); $xpm += ("\"w c #705f5d\",\n"); $xpm += ("\"e c #64625b\",\n"); $xpm += ("\"r c #6b655f\",\n"); $xpm += ("\"t c #6f6d66\",\n"); $xpm += ("\"y c #696362\",\n"); $xpm += ("\"u c #6f7064\",\n"); $xpm += ("\"i c #75736e\",\n"); $xpm += ("\"p c #747171\",\n"); $xpm += ("\"a c #7b7d7c\",\n"); $xpm += ("\"s c #03058a\",\n"); $xpm += ("\"d c #09099d\",\n"); $xpm += ("\"f c #0b0ba9\",\n"); $xpm += ("\"g c #1218a3\",\n"); $xpm += ("\"h c #353585\",\n"); $xpm += ("\"j c #2328bc\",\n"); $xpm += ("\"k c #2231b2\",\n"); $xpm += ("\"l c #0b0bc0\",\n"); $xpm += ("\"z c #0b0dd8\",\n"); $xpm += ("\"x c #0c11db\",\n"); $xpm += ("\"c c #111bcc\",\n"); $xpm += ("\"v c #1017e1\",\n"); $xpm += ("\"b c #1d29e8\",\n"); $xpm += ("\"n c #2333cd\",\n"); $xpm += ("\"m c #2537ed\",\n"); $xpm += ("\"M c #2334e3\",\n"); $xpm += ("\"N c #2939f0\",\n"); $xpm += ("\"B c #3744ba\",\n"); $xpm += ("\"V c #2d45f1\",\n"); $xpm += ("\"C c #314bf2\",\n"); $xpm += ("\"Z c #3d57ee\",\n"); $xpm += ("\"A c #3c5cef\",\n"); $xpm += ("\"S c #3755f5\",\n"); $xpm += ("\"D c #3b5bf5\",\n"); $xpm += ("\"F c #3958f9\",\n"); $xpm += ("\"G c #3552f9\",\n"); $xpm += ("\"H c #3e60f3\",\n"); $xpm += ("\"J c #504f89\",\n"); $xpm += ("\"K c #5f5f8e\",\n"); $xpm += ("\"L c #545491\",\n"); $xpm += ("\"P c #454799\",\n"); $xpm += ("\"I c #6f6e83\",\n"); $xpm += ("\"U c #6a6993\",\n"); $xpm += ("\"Y c #72719b\",\n"); $xpm += ("\"T c #444cc0\",\n"); $xpm += ("\"R c #5465dd\",\n"); $xpm += ("\"E c #4565f3\",\n"); $xpm += ("\"W c #4266fb\",\n"); $xpm += ("\"Q c #476ffc\",\n"); $xpm += ("\"! c #4870fd\",\n"); $xpm += ("\"~ c #6b6dcc\",\n"); $xpm += ("\"^ c #6e75c2\",\n"); $xpm += ("\"/ c #7474cc\",\n"); $xpm += ("\"( c #048504\",\n"); $xpm += ("\") c #068d06\",\n"); $xpm += ("\"_ c #0a830a\",\n"); $xpm += ("\"` c #0b8a0b\",\n"); $xpm += ("\"' c #0b970b\",\n"); $xpm += ("\"] c #0c980b\",\n"); $xpm += ("\"[ c #039203\",\n"); $xpm += ("\"{ c #1d8f1b\",\n"); $xpm += ("\"} c #118a12\",\n"); $xpm += ("\"| c #11990f\",\n"); $xpm += ("\" . c #1f971e\",\n"); $xpm += ("\".. c #1e8621\",\n"); $xpm += ("\"X. c #0ba50b\",\n"); $xpm += ("\"o. c #15bd10\",\n"); $xpm += ("\"O. c #1eba16\",\n"); $xpm += ("\"+. c #258629\",\n"); $xpm += ("\"@. c #228d26\",\n"); $xpm += ("\"#. c #3f803e\",\n"); $xpm += ("\"$. c #358d3a\",\n"); $xpm += ("\"%. c #22ab18\",\n"); $xpm += ("\"&. c #23bc1c\",\n"); $xpm += ("\"*. c #2dba1f\",\n"); $xpm += ("\"=. c #1ac914\",\n"); $xpm += ("\"-. c #28cc1c\",\n"); $xpm += ("\";. c #36c62b\",\n"); $xpm += ("\":. c #3aca28\",\n"); $xpm += ("\">. c #37c928\",\n"); $xpm += ("\",. c #36d225\",\n"); $xpm += ("\"<. c #3ad527\",\n"); $xpm += ("\"1. c #3cd428\",\n"); $xpm += ("\"2. c #47be3b\",\n"); $xpm += ("\"3. c #47934c\",\n"); $xpm += ("\"4. c #529c57\",\n"); $xpm += ("\"5. c #4db053\",\n"); $xpm += ("\"6. c #52ab52\",\n"); $xpm += ("\"7. c #51b44e\",\n"); $xpm += ("\"8. c #53b450\",\n"); $xpm += ("\"9. c #55ba54\",\n"); $xpm += ("\"0. c #6da26c\",\n"); $xpm += ("\"q. c #68b161\",\n"); $xpm += ("\"w. c #7aaf75\",\n"); $xpm += ("\"e. c #7ca97e\",\n"); $xpm += ("\"r. c #7ca57e\",\n"); $xpm += ("\"t. c #45dd2d\",\n"); $xpm += ("\"y. c #48dd2f\",\n"); $xpm += ("\"u. c #7780cb\",\n"); $xpm += ("\"i. c #9b0303\",\n"); $xpm += ("\"p. c #9a0e0e\",\n"); $xpm += ("\"a. c #940b0a\",\n"); $xpm += ("\"s. c #93110e\",\n"); $xpm += ("\"d. c #9d1415\",\n"); $xpm += ("\"f. c #991e20\",\n"); $xpm += ("\"g. c #912627\",\n"); $xpm += ("\"h. c #913436\",\n"); $xpm += ("\"j. c #9c3033\",\n"); $xpm += ("\"k. c #a50a08\",\n"); $xpm += ("\"l. c #ac0606\",\n"); $xpm += ("\"z. c #b50404\",\n"); $xpm += ("\"x. c #be0303\",\n"); $xpm += ("\"c. c #bb0806\",\n"); $xpm += ("\"v. c #b40c0d\",\n"); $xpm += ("\"b. c #b1181b\",\n"); $xpm += ("\"n. c #b12f34\",\n"); $xpm += ("\"m. c #b8393e\",\n"); $xpm += ("\"M. c #824645\",\n"); $xpm += ("\"N. c #9a595a\",\n"); $xpm += ("\"B. c #984546\",\n"); $xpm += ("\"V. c #9c5f60\",\n"); $xpm += ("\"C. c #9b6462\",\n"); $xpm += ("\"Z. c #a24c4f\",\n"); $xpm += ("\"A. c #ab6768\",\n"); $xpm += ("\"S. c #c10000\",\n"); $xpm += ("\"D. c #c70a06\",\n"); $xpm += ("\"F. c #c90a06\",\n"); $xpm += ("\"G. c #c90403\",\n"); $xpm += ("\"H. c #cc1d1f\",\n"); $xpm += ("\"J. c #d60101\",\n"); $xpm += ("\"K. c #d80f0d\",\n"); $xpm += ("\"L. c #d4100a\",\n"); $xpm += ("\"P. c #db180e\",\n"); $xpm += ("\"I. c #d81c10\",\n"); $xpm += ("\"U. c #c92314\",\n"); $xpm += ("\"Y. c #e30a08\",\n"); $xpm += ("\"T. c #e11713\",\n"); $xpm += ("\"R. c #eb2817\",\n"); $xpm += ("\"E. c #e32d19\",\n"); $xpm += ("\"W. c #e4341d\",\n"); $xpm += ("\"Q. c #e13920\",\n"); $xpm += ("\"!. c #e83220\",\n"); $xpm += ("\"~. c #ec3c23\",\n"); $xpm += ("\"^. c #d54238\",\n"); $xpm += ("\"/. c #ee4626\",\n"); $xpm += ("\"(. c #eb462b\",\n"); $xpm += ("\"). c #f14929\",\n"); $xpm += ("\"_. c #f3502c\",\n"); $xpm += ("\"`. c #ca5358\",\n"); $xpm += ("\"'. c #cd5b59\",\n"); $xpm += ("\"]. c #cb6566\",\n"); $xpm += ("\"[. c #c46e72\",\n"); $xpm += ("\"{. c #cf716d\",\n"); $xpm += ("\"}. c #d16c66\",\n"); $xpm += ("\"|. c #d77365\",\n"); $xpm += ("\" X c #807e9e\",\n"); $xpm += ("\".X c #868277\",\n"); $xpm += ("\"XX c #84827e\",\n"); $xpm += ("\"oX c #a6817c\",\n"); $xpm += ("\"OX c #8c8a83\",\n"); $xpm += ("\"+X c #868499\",\n"); $xpm += ("\"@X c #918d89\",\n"); $xpm += ("\"#X c #8c89a0\",\n"); $xpm += ("\"$X c #8186b4\",\n"); $xpm += ("\"%X c #9996a1\",\n"); $xpm += ("\"&X c #9395b6\",\n"); $xpm += ("\"*X c #8faf87\",\n"); $xpm += ("\"=X c #82ac84\",\n"); $xpm += ("\"-X c #8bb084\",\n"); $xpm += ("\";X c #8eb689\",\n"); $xpm += ("\":X c #90ae8d\",\n"); $xpm += ("\">X c #99a08f\",\n"); $xpm += ("\",X c #96be93\",\n"); $xpm += ("\"X..) = & 9 NXJXKXKXLXLXLXLXLXLXLXLXLXLXLX\",\n"); $xpm += ("\"LXLXLXLXKXKXFXVXmXuX6Xi ; [ ( * 6 p a KXKXKXKXKXKXLXLXLXLXLXLXLX\",\n"); $xpm += ("\"LXLXLXLXKXKXFXVXmX5Xi q e 8 #.7 e e w FXKXKXhXfXcXKXLXLXLXLXLXLX\",\n"); $xpm += ("\"LXLXLXLXKXKXFXVXmX.Xe e e e y e q , M.dXgXlX'.Y.`.HXKXLXLXLXLXLX\",\n"); $xpm += ("\"LXLXKXKXKXJXDXNXzX@X3 4 4 e e q < : x.J.H.^.(.R.T.].SXKXLXLXLXLX\",\n"); $xpm += ("\"LXKXKXKXJXFX/ ~ qX$XB n j 2 e e 0 s.S.G.P./._.).~.!.}.SXKXLXLXLX\",\n"); $xpm += ("\"KXKXKXHXZXpXN G E E Q D c . > u 0 a.i.l.U.Q.W.~.).).(.|.SXKXLXLX\",\n"); $xpm += ("\"KXKXHXZXVXaXF ! Q Q S b s 1 t r g.p.i.k.c.x.D.I.E.~.~.{.nXKXLX\",\n"); $xpm += ("\"KXKXFXVXmXu.W ! W V v l . # < t a 1XC.h.d.z.z.z.z.x.F.L.K.[.KXLX\",\n"); $xpm += ("\"KXHXZXNXiXR ! W m x f O X I OXXX5XrXwX2XB.k.l.l.z.v.b.n.m.[.KXLX\",\n"); $xpm += ("\"KXFXVXmXpXZ ! C z f o X $ %XyXuXuXyXtXrXN.p.f.j.Z.A.3XjXvXCXKXLX\",\n"); $xpm += ("\"KXZXVXzX9XS ! M d X X o + XxXmXmXzXuXrXoXV. c Gray29\",\n"); $xpm += ("\", c #4b4b4b\",\n"); $xpm += ("\"< c #4c4c4c\",\n"); $xpm += ("\"1 c Gray30\",\n"); $xpm += ("\"2 c #4e4e4e\",\n"); $xpm += ("\"3 c Gray31\",\n"); $xpm += ("\"4 c #505050\",\n"); $xpm += ("\"5 c #515151\",\n"); $xpm += ("\"6 c Gray32\",\n"); $xpm += ("\"7 c #535353\",\n"); $xpm += ("\"8 c Gray33\",\n"); $xpm += ("\"9 c #555555\",\n"); $xpm += ("\"0 c #565656\",\n"); $xpm += ("\"q c Gray34\",\n"); $xpm += ("\"w c #585858\",\n"); $xpm += ("\"e c #5a5a5a\",\n"); $xpm += ("\"r c #5b5b5b\",\n"); $xpm += ("\"t c Gray36\",\n"); $xpm += ("\"y c #5d5d5d\",\n"); $xpm += ("\"u c Gray37\",\n"); $xpm += ("\"i c #5f5f5f\",\n"); $xpm += ("\"p c #606060\",\n"); $xpm += ("\"a c Gray38\",\n"); $xpm += ("\"s c #626262\",\n"); $xpm += ("\"d c Gray39\",\n"); $xpm += ("\"f c #646464\",\n"); $xpm += ("\"g c #656565\",\n"); $xpm += ("\"h c Gray40\",\n"); $xpm += ("\"j c #676767\",\n"); $xpm += ("\"k c #686868\",\n"); $xpm += ("\"l c Gray41\",\n"); $xpm += ("\"z c #6a6a6a\",\n"); $xpm += ("\"x c Gray42\",\n"); $xpm += ("\"c c #6c6c6c\",\n"); $xpm += ("\"v c #6d6d6d\",\n"); $xpm += ("\"b c Gray43\",\n"); $xpm += ("\"n c #6f6f6f\",\n"); $xpm += ("\"m c Gray44\",\n"); $xpm += ("\"M c #717171\",\n"); $xpm += ("\"N c #727272\",\n"); $xpm += ("\"B c Gray45\",\n"); $xpm += ("\"V c #747474\",\n"); $xpm += ("\"C c Gray46\",\n"); $xpm += ("\"Z c #767676\",\n"); $xpm += ("\"A c #777777\",\n"); $xpm += ("\"S c Gray47\",\n"); $xpm += ("\"D c #797979\",\n"); $xpm += ("\"F c Gray48\",\n"); $xpm += ("\"G c #7b7b7b\",\n"); $xpm += ("\"H c #7c7c7c\",\n"); $xpm += ("\"J c Gray49\",\n"); $xpm += ("\"K c Gray\",\n"); $xpm += ("\"L c #808080\",\n"); $xpm += ("\"P c #818181\",\n"); $xpm += ("\"I c Gray51\",\n"); $xpm += ("\"U c #838383\",\n"); $xpm += ("\"Y c #848484\",\n"); $xpm += ("\"T c Gray52\",\n"); $xpm += ("\"R c #868686\",\n"); $xpm += ("\"E c Gray53\",\n"); $xpm += ("\"W c #898989\",\n"); $xpm += ("\"Q c Gray54\",\n"); $xpm += ("\"! c #8b8b8b\",\n"); $xpm += ("\"~ c Gray55\",\n"); $xpm += ("\"^ c #8d8d8d\",\n"); $xpm += ("\"/ c #8e8e8e\",\n"); $xpm += ("\"( c Gray56\",\n"); $xpm += ("\") c #909090\",\n"); $xpm += ("\"_ c Gray57\",\n"); $xpm += ("\"` c #929292\",\n"); $xpm += ("\"' c #939393\",\n"); $xpm += ("\"] c Gray58\",\n"); $xpm += ("\"[ c #959595\",\n"); $xpm += ("\"{ c Gray59\",\n"); $xpm += ("\"} c #979797\",\n"); $xpm += ("\"| c #989898\",\n"); $xpm += ("\" . c Gray60\",\n"); $xpm += ("\".. c #9a9a9a\",\n"); $xpm += ("\"X. c #9b9b9b\",\n"); $xpm += ("\"o. c Gray61\",\n"); $xpm += ("\"O. c #9d9d9d\",\n"); $xpm += ("\"+. c Gray62\",\n"); $xpm += ("\"@. c #9f9f9f\",\n"); $xpm += ("\"#. c #a0a0a0\",\n"); $xpm += ("\"$. c Gray63\",\n"); $xpm += ("\"%. c #a2a2a2\",\n"); $xpm += ("\"&. c Gray64\",\n"); $xpm += ("\"*. c #a4a4a4\",\n"); $xpm += ("\"=. c #a5a5a5\",\n"); $xpm += ("\"-. c Gray66\",\n"); $xpm += ("\";. c #aaaaaa\",\n"); $xpm += ("\":. c #aeada8\",\n"); $xpm += ("\">. c #afaea9\",\n"); $xpm += ("\",. c #acacac\",\n"); $xpm += ("\"<. c #aeaeae\",\n"); $xpm += ("\"1. c #afafaf\",\n"); $xpm += ("\"2. c #b3b0aa\",\n"); $xpm += ("\"3. c #b7b2ab\",\n"); $xpm += ("\"4. c #b4b2ae\",\n"); $xpm += ("\"5. c #b7b4ab\",\n"); $xpm += ("\"6. c #b9b3ac\",\n"); $xpm += ("\"7. c #b9b6ab\",\n"); $xpm += ("\"8. c #bbb7ad\",\n"); $xpm += ("\"9. c #b8baae\",\n"); $xpm += ("\"0. c #bbbaae\",\n"); $xpm += ("\"q. c #bcb8ad\",\n"); $xpm += ("\"w. c #bdb8ad\",\n"); $xpm += ("\"e. c #beb8ae\",\n"); $xpm += ("\"r. c #bebaae\",\n"); $xpm += ("\"t. c #bebbaf\",\n"); $xpm += ("\"y. c #bcbcae\",\n"); $xpm += ("\"u. c Gray70\",\n"); $xpm += ("\"i. c #b5b4b4\",\n"); $xpm += ("\"p. c Gray71\",\n"); $xpm += ("\"a. c #babcb0\",\n"); $xpm += ("\"s. c #bfbbb0\",\n"); $xpm += ("\"d. c #bfbbb1\",\n"); $xpm += ("\"f. c #b9b9b9\",\n"); $xpm += ("\"g. c #babbb9\",\n"); $xpm += ("\"h. c #bbbbbb\",\n"); $xpm += ("\"j. c #bcbcbc\",\n"); $xpm += ("\"k. c Gray75\",\n"); $xpm += ("\"l. c #c0bcb0\",\n"); $xpm += ("\"z. c #c1bdb2\",\n"); $xpm += ("\"x. c #c2bdb1\",\n"); $xpm += ("\"c. c #c2beb2\",\n"); $xpm += ("\"v. c #c3beb3\",\n"); $xpm += ("\"b. c #c4bfb5\",\n"); $xpm += ("\"n. c #c1bebb\",\n"); $xpm += ("\"m. c #c5bebc\",\n"); $xpm += ("\"M. c #c2c3b6\",\n"); $xpm += ("\"N. c #c4c0b4\",\n"); $xpm += ("\"B. c #c5c0b5\",\n"); $xpm += ("\"V. c #c5c1b6\",\n"); $xpm += ("\"C. c #c6c2b7\",\n"); $xpm += ("\"Z. c #c5c1bb\",\n"); $xpm += ("\"A. c #c6c1bb\",\n"); $xpm += ("\"S. c #c7c2b8\",\n"); $xpm += ("\"D. c #c7c3b8\",\n"); $xpm += ("\"F. c #c7c3ba\",\n"); $xpm += ("\"G. c #c7c8be\",\n"); $xpm += ("\"H. c #c8c4b9\",\n"); $xpm += ("\"J. c #c9c4ba\",\n"); $xpm += ("\"K. c #c9c5bb\",\n"); $xpm += ("\"L. c #cac6bb\",\n"); $xpm += ("\"P. c #cbc6bc\",\n"); $xpm += ("\"I. c #cbc7bd\",\n"); $xpm += ("\"U. c #ccc4bf\",\n"); $xpm += ("\"Y. c #ccc8be\",\n"); $xpm += ("\"T. c #ccc8bf\",\n"); $xpm += ("\"R. c #cdc9bf\",\n"); $xpm += ("\"E. c #c6c4c4\",\n"); $xpm += ("\"W. c #c8c5c1\",\n"); $xpm += ("\"Q. c #cdc6c0\",\n"); $xpm += ("\"!. c #cdc6c1\",\n"); $xpm += ("\"~. c #cec7c2\",\n"); $xpm += ("\"^. c #cacbc1\",\n"); $xpm += ("\"/. c #cdc9c1\",\n"); $xpm += ("\"(. c #cec9c0\",\n"); $xpm += ("\"). c #cecac1\",\n"); $xpm += ("\"_. c #cecac2\",\n"); $xpm += ("\"`. c #cfcbc2\",\n"); $xpm += ("\"'. c #d0c9c1\",\n"); $xpm += ("\"]. c #d0cbc3\",\n"); $xpm += ("\"[. c #d0ccc3\",\n"); $xpm += ("\"{. c #d1cdc4\",\n"); $xpm += ("\"}. c #d1cdc5\",\n"); $xpm += ("\"|. c #d2cec6\",\n"); $xpm += ("\" X c #d3cfc6\",\n"); $xpm += ("\".X c #d3cfc7\",\n"); $xpm += ("\"XX c #d4d0c8\",\n"); $xpm += ("/* pixels */\n"); $xpm += ("\"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n"); $xpm += ("\"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n"); $xpm += ("\"XXXXXXXXXXXXXXXX.X.X.X.X.X.X.X.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n"); $xpm += ("\"XXXXXXXXXXXXXX.X.X.X.X.X^.K Y ^..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n"); $xpm += ("\"XXXXXXXXXXXXXX.X.X.X(.(.;.b w ;..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n"); $xpm += ("\"XXXXXXXXXXXX.X.X.X(.T.M.Y K a b G..XXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n"); $xpm += ("\"XXXXXXXXXXXX.X.X(.T.L.@.S Y b > ` .XXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n"); $xpm += ("\"XXXXXXXXXX.X.X[.T.L.a.P K Y k > 8 g..XXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n"); $xpm += ("\"XXXXXXXXXX.X.X(.L.B...S Y Y k > = V .X.XXXXXXXXXXXXXXXXXXXXXXXXX\",\n"); $xpm += ("\"XXXXXXXX.X.X[.T.S.0.P K Y K j > = < } .XXXXXXXXXXXXXXXXXXXXXXXXX\",\n"); $xpm += ("\"XXXXXXXX.X.X(.L.B.` S Y Y K j < = = a .XXXXXXXXXXXXXXXXXXXXXXXXX\",\n"); $xpm += ("\"XXXXXXXX.X.XT.L.0.K V Y Y Y N 6 = 8 ` .XXXXXXXXXXXXXXXXXXXXXXXXX\",\n"); $xpm += ("\"XXXXXXXX.X[.T.L.y...W K S S b w 6 @.(..X.XXXXXXXXXXXXXXXXXXXXXXX\",\n"); $xpm += ("\"XXXXXXXX.X[.T.L.x.7.:.Y 8 8 6 & y T.[..XXXXXXXXXXXXXXXXXXXXXXXXX\",\n"); $xpm += ("\"XXXXXXXX.X.XT.L.x.w.2.} 6 > = . 8 S.[..X.XXXXXXXXXXXXXXXXXXXXXXX\",\n"); $xpm += ("\"XXXXXXXX.X.X(.L.B.w.*.N 8 > & X a N K .X.X.X.X.X.XXXXXXXXXXXXXXX\",\n"); $xpm += ("\"XXXXXXXX.X.X(.P.B.&.N y y b y y a y j .X.X.Xg.;.j..XXXXXXXXXXXXX\",\n"); $xpm += ("\"XXXXXXXX.X.X(.P.B.K y y y a j a y w a ;.p.j.` V ~ '..XXXXXXXXXXX\",\n"); $xpm += ("\"XXXX.X.X.X[.W.S.x.~ y y y y a y y w a k V Y W P S ..~..XXXXXXXXX\",\n"); $xpm += ("\"XX.X.X.X[.(.&...,...S S n y a a w 6 a j V W ~ ~ W Y ..~..XXXXXXX\",\n"); $xpm += ("\".X.X.X'.T.j.~ } @.@.@...b + q k y < < w b P P Y ~ ~ W @.~..XXXXX\",\n"); $xpm += ("\".X.X'.T.L.,...&.&.&.} P = 8 k j r 8 < 8 a a j V K Y Y @.E..XXX\",\n"); $xpm += ("\".X.X(.L.b.&.@.&.@.~ S j + + y k S } K a w y y y y a j b N ...XXX\",\n"); $xpm += ("\".X'.T.S.s...&.@.W N w = # S E P &.2.:.@.b 8 w w y a j N S } .XXX\",\n"); $xpm += ("\".X(.L.B.p.} &.` N 8 # + < ..8.w.w.8.5.2.S 6 w j V W @.u.m.U..XXX\",\n"); $xpm += ("\".XT.L.x.,.} &.P 6 # + # < ~ b.B.B.x.w.3.` K } *.6.B.L.T.'..X.XXX\",\n"); $xpm += ("\"`.T.S.d.*.....w + + # # # Y S.P.L.S.B.x.w.x.x.x.B.L.P.(.[..X.XXX\",\n"); $xpm += ("\"'.P.B.w...} k + # # < y N ;.(.(.(.T.L.L.S.S.S.L.P.T.(.[..X.X.XXX\",\n"); $xpm += ("\"'.P.B.s.P k = w b K } ,.n.(..X.X.X'.(.T.T.T.T.T.(.[..X.X.X.XXXXX\",\n"); $xpm += ("\"'.T.S.x.b V ~ &.4.x.B.P.(.[..X.X.X.X.X[.[.[..X.X.X.X.X.X.XXXXXXX\",\n"); $xpm += ("\".XT.L.B.x.x.x.x.B.L.P.(.[..X.X.X.X.X.X.X.X.X.X.X.XXXXXXXXXXXXXXX\",\n"); $xpm += ("\".X(.T.L.L.S.S.L.P.T.(.[..X.X.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"\n"); $xpm += ("};\n"); return $xpm; } //end matchBoxWidgetDisabled;