Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Ever wanted to quickly draw a line in the center of a 3D object in Maya? Let’s say you need to place a curve there or joints, or both. This short Python script will let you create a curve or joints down the volumetric center of a mesh by way of an edge loop selection.
This came from a help request on some forum – someone was asking if there was a quick way to draw a line down the center of a 3D mesh. The answer is “Yes if it has edge loops” – And here’s a useful python script for generating either NURBS curves, joint chains or both down the middle of an object with edge loops. The script has three functions, depending on what you select.
If you select one edge and run the script, it will generate a curve down the center of the object using all edge loops.
Select two edges, and it will generate a curve BETWEEN those two edge loops.
Select three or more edges, and it will generate a curve only using those selected edge loops (Good for heavy, redundant geo)
There are two flags, make centerline(0,1) creates a joint chain, (1,0) makes a NURBS curve and (1,1) makes both.