// =========================================================================== // 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. // =========================================================================== // PLUGIN NAME: nearestPointOnMesh v1.0 // FILE: AEnearestPointOnMeshTemplate.mel // DESCRIPTION: -Defines the attribute template for the "nearestPointOnMesh" node. // -Please see readme.txt for full details. // REFERENCES: -This plugin is based off of the "nearestPointOnSurface" node. // -The MEL script AEnearestPointOnSurfaceTemplate.mel was referred to for this script. global proc AEnearestPointOnMeshTemplate(string $nodeName) { editorTemplate -beginScrollLayout; string $inputMesh = (uiRes("m_AEnearestPointOnMeshTemplate.kInputMesh")); editorTemplate -beginLayout (uiRes("m_AEnearestPointOnMeshTemplate.kNPOMAttributes")) -collapse 0; editorTemplate -callCustom ("AEinputNew \""+$inputMesh+"\"") ("AEinputReplace \""+$inputMesh+"\"") "inMesh"; editorTemplate -addControl "inPosition"; editorTemplate -beginLayout (uiRes("m_AEnearestPointOnMeshTemplate.kResult")); editorTemplate -addControl "position"; editorTemplate -addControl "normal"; editorTemplate -addControl "parameterU"; editorTemplate -addControl "parameterV"; editorTemplate -addControl "nearestFaceIndex"; editorTemplate -endLayout; editorTemplate -endLayout; AEabstractBaseCreateTemplate $nodeName; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; }