// =========================================================================== // 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. // =========================================================================== // // // // // // // Creation Date: 9 Oct 2011 // // Description: // This procedure add select type to UI. // // Input Arguments: // The maskGroup is select group of the select type, // the selTypeName is the select type name, // and the menuLabel is the select type menu item label. // // Return Value: // None // global string $gSelMarkerMenuLabelList[]; global string $gSelMarkerFilterTypeList[]; global string $gSelJointMenuLabelList[]; global string $gSelJointFilterTypeList[]; global string $gSelCurveMenuLabelList[]; global string $gSelCurveFilterTypeList[]; global string $gSelSurfaceMenuLabelList[]; global string $gSelSurfaceFilterTypeList[]; global string $gSelDeformerMenuLabelList[]; global string $gSelDeformerFilterTypeList[]; global string $gSelDynamicMenuLabelList[]; global string $gSelDynamicFilterTypeList[]; global string $gSelOtherMenuLabelList[]; global string $gSelOtherFilterTypeList[]; proc addSelTypeFromTypeArr(string $selTypeName,string $menuLabel, string $selFilterTypeList[], string $selMenuLabelList[]) { int $indexMenu = stringArrayFind( $menuLabel, 0, $selMenuLabelList ); int $indexfilter = stringArrayFind( $selTypeName, 0, $selFilterTypeList ); if ((-1 == $indexMenu ) && (-1 == $indexfilter)) { $selMenuLabelList = AWAppendStringsToStringArray({$menuLabel}, $selMenuLabelList); $selFilterTypeList = AWAppendStringsToStringArray({$selTypeName}, $selFilterTypeList); } } global proc addSelectTypeItem( string $maskGroup, string $selTypeName, string $menuLabel ) { global string $gSelMarkerMenuLabelList[]; global string $gSelMarkerFilterTypeList[]; global string $gSelJointMenuLabelList[]; global string $gSelJointFilterTypeList[]; global string $gSelCurveMenuLabelList[]; global string $gSelCurveFilterTypeList[]; global string $gSelSurfaceMenuLabelList[]; global string $gSelSurfaceFilterTypeList[]; global string $gSelDeformerMenuLabelList[]; global string $gSelDeformerFilterTypeList[]; global string $gSelDynamicMenuLabelList[]; global string $gSelDynamicFilterTypeList[]; global string $gSelRenderingMenuLabelList[]; global string $gSelRenderingFilterTypeList[]; global string $gSelOtherMenuLabelList[]; global string $gSelOtherFilterTypeList[]; int $indexMenu = 0; int $indexfilter = 0; switch ($maskGroup) { case "Marker": addSelTypeFromTypeArr($selTypeName, $menuLabel, $gSelMarkerFilterTypeList, $gSelMarkerMenuLabelList); break; case "Joint": addSelTypeFromTypeArr($selTypeName, $menuLabel, $gSelJointFilterTypeList, $gSelJointMenuLabelList); break; case "Curve": addSelTypeFromTypeArr($selTypeName, $menuLabel, $gSelCurveFilterTypeList, $gSelCurveMenuLabelList); break; case "Surface": addSelTypeFromTypeArr($selTypeName, $menuLabel, $gSelSurfaceFilterTypeList, $gSelSurfaceMenuLabelList); break; case "Deformer": addSelTypeFromTypeArr($selTypeName, $menuLabel, $gSelDeformerFilterTypeList, $gSelDeformerMenuLabelList); break; case "Dynamic": addSelTypeFromTypeArr($selTypeName, $menuLabel, $gSelDynamicFilterTypeList, $gSelDynamicMenuLabelList); break; case "Rendering": addSelTypeFromTypeArr($selTypeName, $menuLabel, $gSelRenderingFilterTypeList, $gSelRenderingMenuLabelList); break; case "Other": addSelTypeFromTypeArr($selTypeName, $menuLabel,$gSelOtherFilterTypeList, $gSelOtherMenuLabelList); break; } // update SelectTypeItem state after added. updateSelectTypeItemState($maskGroup, $selTypeName); }