-
-
Notifications
You must be signed in to change notification settings - Fork 185
Plugin Types
Uranium has a number of different plugin types. This page tries to give a short summary what these mean and how they need to be used.
Plugin translation can be done by using:
from UM.i18n import i18nCatalog
i18n_catalog = i18nCatalog("uranium") # can also be "cura" or any other type.
i18n_catalog.i18nc(translation_hint, text_to_be_translated)
All plugins must have meta data, which is read from the init.py file of the plugin. Uranium assumes that there is a getMetaData() function for each plugin which returns a JSON dict. A number of objects can be inside this JSON which provides certain meta data. 'plugin' -> General meta data of the plugin. Can contain name, author, version and description.
Views are responsible for displaying Scene information to the user. An example of this type is the MeshView, which displays all mesh data in the scene as polygon objects. It is also capable of highlighting overhang (based on preferences).
It must be noted that certain SceneNodes can have their own renderer. In this case calling their render function will return True. Views can decide to ignore these and still interpret the data as they see fit, although this is not recomended (as nodes with their own Renderer will probably have a very good reason for doing so).
Tools are plugins that enable the user to modify data in the scene. Good examples of these are the Mirror tool, Rotate tool, Scale Tool and Translate tool. Tools tend to also have ToolHandles, which usually contain meshes that can be drawn on a certain location. In the case of the translate tool, the tool handle is responsible for drawing the colored arrows by which the user can move the (selected) object.
Tools can be active as three different kinds; Camera tools, Selection tool and active tool. Events are passed in order to these tools (Camera tool will receive any event first. If it does not handle it or there is no camera tool it will be passed to the selection tool and so forth).
- Core Development
- Plugins
- Version Upgrading