Hi Peer,
re:
> Thanks for telling me about these factories. When I search across all text files in the
> package contents I don't find these. The only place they seem to be mentioned is in
> moi_lib.dylib. Is that right, or am I missing some .js or .htm in my search?
No, they just are being used only by the core C++ code and not being used by scripts.
The internal C++ code can call the same functions that scripts can, and sometimes it's convenient for things that are happening not inside the context of a "command" to be run that way.
For these functions on the object properties dialog, they have to be prepared that it may take some time to number crunch out the result. If they take more than 1 second a "Calculating..." dialog is shown which will let you cancel it. That cancel dialog functionality is set up inside the C++ side with the entry point being moi.ui.propertiesPanel.calcCurveLength() , moi.ui.propertiesPanel.calcSurfaceArea() , or moi.ui.propertiesPanel.calcSolidVolume().
Because you can work with the object properties dialog while you are not running inside a command, the regular command infrastructure was not as suitable for this particular functionality.
- Michael
|