|
| 1 | +// --------------------------------------------------------------------- |
| 2 | +// AEweightDriverTemplate.mel |
| 3 | +// |
| 4 | +// Attribute Editor template the for the weight driver node. |
| 5 | +// |
| 6 | +// --------------------------------------------------------------------- |
| 7 | + |
| 8 | +global proc AEmGearWeightDriverTemplate( string $nodeName ) |
| 9 | +{ |
| 10 | + // the following controls will be in a scrollable layout |
| 11 | + editorTemplate -beginScrollLayout; |
| 12 | + |
| 13 | + editorTemplate -beginLayout "General" -collapse 0; |
| 14 | + editorTemplate -addControl "active"; |
| 15 | + editorTemplate -addControl "type"; |
| 16 | + editorTemplate -addSeparator; |
| 17 | + editorTemplate -addControl "iconSize"; |
| 18 | + editorTemplate -endLayout; |
| 19 | + |
| 20 | + editorTemplate -beginLayout "Vector Angle" -collapse 1; |
| 21 | + editorTemplate -addControl "direction"; |
| 22 | + editorTemplate -addControl "invert"; |
| 23 | + editorTemplate -addSeparator; |
| 24 | + editorTemplate -addControl "useRotate"; |
| 25 | + editorTemplate -addControl "angle"; |
| 26 | + editorTemplate -addControl "centerAngle"; |
| 27 | + editorTemplate -addControl "twist"; |
| 28 | + editorTemplate -addControl "twistAngle"; |
| 29 | + editorTemplate -addSeparator; |
| 30 | + editorTemplate -addControl "useTranslate"; |
| 31 | + editorTemplate -addControl "grow"; |
| 32 | + editorTemplate -addControl "translateMin"; |
| 33 | + editorTemplate -addControl "translateMax"; |
| 34 | + editorTemplate -addSeparator; |
| 35 | + editorTemplate -addControl "interpolation"; |
| 36 | + AEaddRampControl( $nodeName + ".blendCurve" ); |
| 37 | + |
| 38 | + editorTemplate -beginLayout "Cone Display" -collapse 1; |
| 39 | + editorTemplate -beginNoOptimize; |
| 40 | + editorTemplate -addControl "drawCone"; |
| 41 | + editorTemplate -addControl "drawCenterCone"; |
| 42 | + editorTemplate -addControl "drawWeight"; |
| 43 | + editorTemplate -endNoOptimize; |
| 44 | + editorTemplate -endLayout; |
| 45 | + |
| 46 | + editorTemplate -endLayout; |
| 47 | + |
| 48 | + editorTemplate -beginLayout "Radial Basis Function" -collapse 1; |
| 49 | + editorTemplate -beginNoOptimize; |
| 50 | + editorTemplate -addControl "kernel" "mGearWeightDriverUpdateEvaluation"; |
| 51 | + editorTemplate -addControl "bias"; |
| 52 | + editorTemplate -addControl "allowNegativeWeights"; |
| 53 | + editorTemplate -addControl "scale"; |
| 54 | + editorTemplate -endNoOptimize; |
| 55 | + |
| 56 | + editorTemplate -beginLayout "Generic RBF" -collapse 1; |
| 57 | + editorTemplate -addControl "distanceType"; |
| 58 | + editorTemplate -endLayout; |
| 59 | + |
| 60 | + editorTemplate -beginLayout "Matrix RBF" -collapse 1; |
| 61 | + editorTemplate -addControl "twistAxis"; |
| 62 | + |
| 63 | + editorTemplate -beginLayout "Solver Display" -collapse 1; |
| 64 | + editorTemplate -beginNoOptimize; |
| 65 | + editorTemplate -addControl "drawOrigin"; |
| 66 | + editorTemplate -addControl "drawPoses"; |
| 67 | + editorTemplate -addControl "poseLength"; |
| 68 | + editorTemplate -addControl "drawIndices"; |
| 69 | + editorTemplate -addControl "indexDistance"; |
| 70 | + editorTemplate -addControl "drawTwist"; |
| 71 | + editorTemplate -addControl "opposite"; |
| 72 | + editorTemplate -addSeparator; |
| 73 | + editorTemplate -addControl "driverIndex"; |
| 74 | + editorTemplate -endNoOptimize; |
| 75 | + editorTemplate -endLayout; |
| 76 | + |
| 77 | + editorTemplate -endLayout; |
| 78 | + |
| 79 | + editorTemplate -endLayout; |
| 80 | + |
| 81 | + // include/call base class/node attributes |
| 82 | + AEshapeTemplate $nodeName; |
| 83 | + //AEdependNodeTemplate $nodeName; |
| 84 | + |
| 85 | + // add any extra attributes that have been added |
| 86 | + editorTemplate -addExtraControls; |
| 87 | + |
| 88 | + editorTemplate -endScrollLayout; |
| 89 | +} |
| 90 | + |
| 91 | +// --------------------------------------------------------------------- |
| 92 | +// MIT License |
| 93 | +// |
| 94 | +// Copyright (c) 2021 Ingo Clemens, brave rabbit |
| 95 | +// weightDriver is under the terms of the MIT License |
| 96 | +// |
| 97 | +// Permission is hereby granted, free of charge, to any person obtaining |
| 98 | +// a copy of this software and associated documentation files (the |
| 99 | +// "Software"), to deal in the Software without restriction, including |
| 100 | +// without limitation the rights to use, copy, modify, merge, publish, |
| 101 | +// distribute, sublicense, and/or sell copies of the Software, and to |
| 102 | +// permit persons to whom the Software is furnished to do so, subject to |
| 103 | +// the following conditions: |
| 104 | +// |
| 105 | +// The above copyright notice and this permission notice shall be |
| 106 | +// included in all copies or substantial portions of the Software. |
| 107 | +// |
| 108 | +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 109 | +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 110 | +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 111 | +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
| 112 | +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
| 113 | +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| 114 | +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 115 | +// |
| 116 | +// Author: Ingo Clemens www.braverabbit.com |
| 117 | +// --------------------------------------------------------------------- |
0 commit comments