Combine NURBS tools with MEL Script?
Hi there,
In an effort to streamline my workflow I'm in the midst of creating a few new custom shortcuts, but since I'm not that good at scripting, certainly not when it comes to MEL, I've run across an obstacle which I hope you can help me overcome.
You all know that Maya uses separate commands for NURBS curves and NURBS surfaces, and if you for example want to extend a NURBS curve you have to run a command called "ExtendCurve" while you rely on the surface equivalent of that command called "ExtendSurface" when it comes to surfaces. This to me is a bit clunky. It's somewhat of a problem even, which I'm now planning to resolve through the magic of MEL scripting.
What I want to do is simply to create a script which first of all checks whether the selected object(s) is either a NURBS Curve or a NURBS Surface, then depending on the result of the check activates the corresponding tool, which in this example is "ExtendCurve" for curves and "ExtendSurface" for surfaces. As a bonus I would also like it to echo out: "No curve or surface is selected" if that is the case.
I don't think it would be that hard to achieve, but since I'm new to MEL i simply can't do it. Therefor I would really appreciate your help. Thank you in advance!
Regards,
Johan Wendesten