Small Feature Wish

 From:  Michael Gibson
3756.9 In reply to 3756.8 
> I thought it might be possible to combine Join & Rebuild
> in a single left-click action - that is, after I've made my
> selection.

Well, that could be possible but combining together actions like
that is somewhat more involved than just making a button, it would
probably involve making a new script command that combined elements
of both those commands together.

> Is it actually possible to have a button respond differently
> to a right and left click?!(That would be very useful for
> minimizing button clutter).

Yup, like you saw with View > CPlane it's possible to have that, it's just not
used in many places currently because it's hard to properly illustrate or describe
the 2 things instead of 1 thing, so it only fits naturally if the things are
pretty closely related.

The right-click is also used on Hide and Lock, where it does an "isolate" of
the selected objects (hiding everything else and leaving only the
selected stuff visible).

Ok, so, let's start with this one:
> 2 - Dedicated Boolean Buttons for Substract and Merge

So for this, go to the \ui sub-folder under MoI's main installation folder, and open
up the file CommandBar.htm in a text editor like notepad or whatever (probably
best not to use some fancy HTML editor as there are tags with custom names
that could get munched).

That file controls the bottom toolbar.

Go to the end of the body, and before the body end tag (just below the
<nobr> that contains the grid and object snap buttons), put in the following:

<moi:CommandButton style="icon:icons/BooleanDifferenceIcon.png;" command="BooleanDifference"><moi:Text textid="BooleanDifference"/></moi:CommandButton>
<moi:CommandButton style="icon:icons/BooleanMergeIcon.png;" command="BooleanMerge"><moi:Text textid="BooleanMerge"/></moi:CommandButton>

With those in place, that will give you 2 new buttons to the right of the Object Snap
button on the bottom bar, for doing boolean difference and boolean merge, pushing
those will be the same as going to Construct > Boolean > ...

By the way the attribute that controls what command is launched is the command=""
part, and if you want a right-click command you can put that on the
button as an rcommand="" attribute.

> 3 - Select only 'compound' paths

Ok, this one does not have a pre-made command for it already, instead it needs to run
some script, so put in this button for it:

<moi:CommandButton onbuttonclick="var crvs = moi.geometryDatabase.getObjects().getCurves(); for ( var i = 0; i < crvs.length; ++i ) { var crv = crvs.item(i); if ( crv.getSubObjects().length > 1 ) crv.selected = true; }">SelPath</moi:CommandButton>

Let me know if that does not work like you want.

If you cook up an icon for it, you can copy that to the \ui\icons folder and then declare it
in the style as the above buttons.

- Michael