V4 Wish List

 From:  Michael Gibson
6925.530 In reply to 6925.529 
Hi James, it is a general strategy throughout MoI to try and avoid things being dependent on the natural curve direction. With there also already being an existing way to flip the blend result, having a checkbox option like that doesn't really seem like it would be useful for the regular MoI UI.

For programmatic access that's a different case.

At some point I want to make a different API that scripts could use for making geometry. The current "factory" based interface is set up primarily to be convenient for the regular UI, sometimes this is in conflict with what is convenient for programmatic access like in this case.

But it is possible though to generate a blend curve programmatically that suppresses the automatic detection and just uses the natural directions. This is done by having the "Orientation list" input for the blend factory filled in. If it is not filled in then it gets automatically created by matching the closest ends together.

A curve orientation list is a list made up of CurveOrientation objects in it, each of which has .flipped and .seam properties. You can create one by moi.geometryDatabase.calculateCurveOrientations( curves ), then go through and set the flipped properties to false.

Here's an example, paste this in to the xyz control when you have 2 curves selected, it should generate a blend curve between the same ends and does not switch depending on which ends are closest to each other:

code:
var curves = moi.geometryDatabase.getSelectedObjects();
var orientations = moi.geometryDatabase.calculateCurveOrientations( curves );
for ( var i = 0; i < orientations.length; ++i ) { orientations.item(i).flipped = false; }
var factory = moi.command.createFactory( 'blend' );
factory.setInput( 0, curves );
factory.setInput( 1, orientations );
factory.commit();


Hope that is what you were looking for!

- Michael