// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== global proc int iges_export_options ( string $parent, string $action, string $initialSettings, string $resultCallback ) // // Description: // This script posts the iges file translator options. // The optionsString is of the form: // varName1=value1;varName2=value2;... // // Parameters: // $parent - the elf parent layout for this options layout. It is // always a scrollLayout. // $action - the action to be performed when this method is invoked. // Valid options are: // "query" - construct the options string and // pass it to the resultCallback. // "post" - post all the elf controls. // $initialSettings - the current options string in effect at the // time this script is invoked. // $resultCallback - // This is the proc to be called with the result string. // resultCallback ( string $optionsString ) // // Returns: // 1 if successfull. // 0 otherwise. { int $bResult; string $currentOptions; if ($action == "post") { setParent $parent; formLayout -e -vis false optionsBoxForm; columnLayout -adj true -cal left igesExportCol; frameLayout -cll true -cl false -label (uiRes("m_iges_export_options.kIGESOptions")); columnLayout -adj true; rowLayout -numberOfColumns 3 -columnWidth 1 50; text -label ""; text -label (uiRes("m_iges_export_options.kScaleFactor")); floatSliderGrp -min 0.000001 -max 10.0 -fmn 0.000001 -fmx 10.0 -f true -pre 6 -s 1.0 -value 1.0 iges_expScaleFactor; setParent ..; setParent ..; setParent ..; columnLayout; text -label ""; button -label (uiRes("m_iges_export_options.kDefaults")) -c restoreIgesExportDefaultOptions -w 115 -h 19; setParent ..; formLayout -e -vis true optionsBoxForm; $bResult = 1; } else if ($action == "query") { $currentOptions = $currentOptions + ";scaleFactor=" + (`floatSliderGrp -q -v iges_expScaleFactor`); eval($resultCallback+" \""+$currentOptions+"\""); $bResult = 1; } else { $bResult = 0; } return $bResult; } global proc restoreIgesExportDefaultOptions () { floatSliderGrp -e -v 1.0 iges_expScaleFactor; }