Nurbs Newbie need a little help

 From:  Michael Gibson
604.18 In reply to 604.15 
Hi Will,

> Michael, is there a way you can add a function to >highlight open curves< like this?

Here is one way - you can add a script macro that is launched by a keyboard shortcut to select all open curves. That will effectively highlight the open curves in yellow.

To do this, make sure MoI is closed, and then open up the moi.ini file using notepad. You can find moi.ini under C:\Documents and Settings\<your login name>\Application Data\Moi\moi.ini

Under the [Shortcut Keys] section, add this line (put everything for the O= on just one single long line):

[Shortcut Keys]
O=script:var curves = moi.geometryDatabase.getObjects().getCurves(); for ( var i = 0; i < curves.length; ++i ) if ( !curves.item(i).isClosed ) curves.item(i).selected = true;

With that in place, you can then push the O key on the keyboard to select all open curves.


It's a bit difficult to think of a way to automatically highlight open curves, because there are many situations where open curves are not an error.. Like for instance in the steps I recently showed here: http://moi3d.com/forum/index.php?webtag=MOI&msg=606.4, there are several open curves which are fine being open.

I guess it would be good to warn not just for any open curve, but for ones that seemed like they were almost closed but not quite.

One thing that would be nice if I had a kind of "feedback" or "error" area where I could put a few lines of informative messages about warnings and other such things after a command had finished. But I haven't really figured out a good place in the UI to put stuff like that yet.

- Michael