Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / MEL / Custom export script of selected NURBs curve / spline?
  RSS 2.0 ATOM  

Custom export script of selected NURBs curve / spline?
Rate this thread
 
53630
 
Permlink of this thread  
avatar
  • Total Posts: 9
  • Joined: 09 October 2006 07:12 PM

Would someone show me the path to start a custom nurbs curve exporter? I just need to know the list of “control vertexes” or “edit points” of the selected nurbs curve. These values would be later used as an animation path in my game.

I have never done mel or python in my life, but I have a strong c++ foundation.

Any help, link, would be very welcome.



Replies: 0
avatar
  • Scott D.
  • Posted: 21 April 2011 11:01 AM

Here are some starters, look in the MEL command reference and search for these commands:
curve
pointOnCurve
pointPosition

Also look at the “Sections” attribute on a nurbs curve as it should give you the number of cvs comprising the curve.  Once you know how many cvs there are and the curve Degree, you should be able to loop over them and write out their positions in local or world space using pointOnCurve or pointPosition.  You could then rebuild the curve using that data.



Replies: 0