Learning to create addon

 From:  Michael Gibson
10889.17 In reply to 10889.16 
Hi Elang,

re:
> However, I can't find the right place to have the reference for each objects, i.e.: how to use
> moi.command.createFactory, what parameters needed, etc.

For using moi.command.createFactory(), the example you posted shows it, you pass it the string name of a factory, in what you posted that's 'box'.

In the regular box command the inputs to the box factory are filled in by picking a point to place the corner point and coordinate frame, and then the width, height, and extrusion values are filled in by either another point pick or by values that are typed in to edit fields.

In your example code it's setting values of 20 each for width, height, and extrusion.

If you instead had:

factory.setInput( 2, 30 ); // Input index 2 is width
factory.setInput( 3, 40 ); // input index 3 is height
factory.setInput( 4, 50 ); // input index 4 is extrusion

that would make a width of 30, a height of 40, and an extrusion of 50 units.

- Michael