Hi Flowgun, the difficulty in what you're describing is that it isn't a single script that would just run
when you push a shortcut key. What you are describing would need your custom script code to run
after every single command has been run.
There is not currently any mechanism in MoI that is set up like that to run custom script after
every command.
It is possible to modify individual commands to do it though, like for Rectangle like you were
trying, the current Rectangle.js command has this:
code:
#include "GetRect.js"
#include "GetRectRoundCorner.js"
var factory = moi.command.createFactory( 'rectangle' );
if ( GetRect( factory )
&& GetRectRoundCorner( factory, factory.getInput(0).getValue(), 4 ) )
{
factory.commit();
}
You can modify this by adding one line before the factory.commit() like this:
code:
#include "GetRect.js"
#include "GetRectRoundCorner.js"
var factory = moi.command.createFactory( 'rectangle' );
if ( GetRect( factory )
&& GetRectRoundCorner( factory, factory.getInput(0).getValue(), 4 ) )
{
factory.getCreatedObjects().setProperty( 'selected', true );
factory.commit();
}
I don't really recommend changing every command though, because you will run into
problems later on down the line when commands change with new features added to them.
re:
> Another awesome feature would be undo/redo scripts that keep objects as they are
>and undo/redo only selections. This would take MoI's selection capabilities to the next level.
I specifically chose not to do it this way because then there would need to be 2 different kinds
of undo/redo to trigger and that's a good example of the kind of complexity and UI bloat that
I've worked very hard to avoid with MoI.
So there is a selection undo in MoI but it's part of the regular undo and it only applies
to the most recent selection action.
- Michael