// =========================================================================== // 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: July 2, 1997 // // Description: // Creates a list of resampler names and their creation commands for // use by the deviceEditor. // // Input Arguments: // int Active/Inactive state. // 0 for inactive. // 1 for active. // // Return Value: // string[] An array of resampler names and creation commands. // // The array alternates between a string containing the resampler name // and a string containing the commands to create the resampler. // // global proc string[] createResamplerList(int $active) { if (!`licenseCheck -m "edit" -typ "complete"`) { string $resamplers[]; return $resamplers; } string $activeState = " -deviceEditorActive " + $active + ";"; string $simplify = (uiRes("m_createResamplerList.kSimplify")); string $closestSample = (uiRes("m_createResamplerList.kClosestSample")); string $linear = (uiRes("m_createResamplerList.kLinaer")); string $box = (uiRes("m_createResamplerList.kBox")); string $tent = (uiRes("m_createResamplerList.kTent")); string $gaussianSqrt = (uiRes("m_createResamplerList.kGaussianSqrt")); string $gaussian = (uiRes("m_createResamplerList.kGaussian")); // There must be an even pairing of filter names and creation commands // string $filters[14] = { // NAME // CREATION COMMANDS // ------------------------------------------------------------- $simplify, "filter -t filterSimplify -n \"simplify\"" + $activeState, $closestSample, "filter -t filterResample -n \"closest\" -kernel 200" + $activeState, $linear, "filter -t filterResample -n \"linearInterpolation\" -kernel 300"+ $activeState, $box, "filter -t filterResample -n \"box\" -kernel 400" + $activeState, $tent, "filter -t filterResample -n \"tent\" -kernel 500" + $activeState, $gaussianSqrt, "filter -t filterResample -n \"gaussianSqrt\" -kernel 600" + $activeState, $gaussian, "filter -t filterResample -n \"gaussianHalf\" -kernel 700" + $activeState }; return $filters; }