This is the main window of the Authoring GUI. On Top you find the menu bar which contains several buttons. To the left you can find all available Actions. The big workspace to the right is used to create your Workflow.
The menu bar consitsts of several buttons (numbered from 1 to 10). Amongst others, they allow the user to save, load and run the workflow. Each button is explained in detail below.
Select an entry from the list to quickly load a recent workflow.
Every Workflow you save / load appears in the list of Recent Workflows. The Workflow you did save / load last, will be the first in the list.
Opens the System Connections window.
System Connections provide 3 different types of global functionality that are executed when you press the key which is assigned to the connection. The following logics are available:
A. Restart Workflow: The execution of the Workflow is stopped and starts again from the beginning.
Opens the Resouce Editor window.
Model resources are handled globally through the Resource Manager. You can add, remove or modify models by clicking on the respective buttons. If you click on the "Add" button, a file browser will pop up and you can locate a model an give it a name. It is not possible to have two models with the same name because of the name is an ID that is used to identify models throughout the workflow. If you want to use the same VRML file twice, add a second model with a unique name that is pointing to the same VRML file as your first model.
Hint: When the Workflow is running, you need to load each model before an Action can use it. Loading a model is done via an Action that loads models. This might be the "Load geometry", "Load multiple geometries" or "Load occlusion geometry" Action for example.
Opens the Action Paths window.
Each Action Path defines a location on your hard disk where custom Actions are stored. Custom Actions, so called Ufa-Actions are XML-files containing C# code logic.
You can add new Action directories by clicking the "+" button in the lower left corner or by right clicking the Action list window and selecting "Add new directoy".
You can delete Action directories again by right clicking an existing directory and selecting "Delete".
The Action tree view (2) displays all Actions that are currently available. Each Action is placed in a group that can be expanded or collapsed by clicking on the small "+" or "-" sign. In order to expand or collapse the whole tree, right click the Action tree view and select "Expand Action tree view" or "Collapse Action tree view"
On top you can find the Action search box (1). Enter a string and the system will look for Actions containing the string. If the system finds an Action that matches the string, it will highlight the Action in light gray. It is possible that more than one Action contains the entered string. Press F3 in order to cycle through all found Actions. If you press ENTER, the highlighted Action is created at the workspace.
A description of each Action is shown in the lower text box (3) after you selected an Action from the Action tree view.
Each workflow contains of Actions which define the application logic. All Actions are placed, edited, connected and selected on the workspace.
You can expand and collapse each Action and Connection panel by clicking on the corresponding collapse or expand-triangle button. Doing so will give you a better overview of the Workflow. Additionally you can expand or collapse all Actions at once. Just right click the Workspace and press on "Expand all Actions" or "Collapse all Actions".
Each Action has an additional Info Field you can use for custom notes.
The application logic of an Action isn't executed immediatelly after the Workflow has been started. First, the Action has to be activated by triggering one of its inputs. During activation the Action can subsequently execute its initialization logic. Sometimes, especially in case of simple Actions, the initialization logic executes all necessery operations and no further processing is required. Such Actions deactivate right after their activation. If the Action requires further processing and didn't deactivate itself after its activation, it can execute further logic in cycles. Such Actions are in the "running" state. Running Actions can be identified in the Authoring GUI through their red border. After all processing is done by the Action, it finally deactivates itself and is put into an idle state, waiting for reactivation,
In summary, Actions make use of the following states:
1. Activated:
How does an Action receive this state?: Action gets triggered through one of its input fields and isn't in the Running state.
Blue line connections indicate a route, meaning a Workflow that is processed step by step, always in direction from output to input, after the “Run Script” button was pressed. You could say that state field connections are used jump from Action to Action so that they can execute their application logic. An action starts to execute its logic after it was activated through one of its state inputs. After the Action is done, it deactivates itself through one of its state outputs. This will trigger all connections which are linked to it. The connections will respond and finally trigger the inputs of other Actions. This process will repeat as long as the Workflow Engine is running the Workflow. In order to get this process started, there is the special "Start Action". In opposite to all other Actions, this Action will get activated immediatelly after the Workflow bas been started.
This subworkflow will rotate and translate the geometry called "projSphere" over time. The rotation Action lasts 1 second; the translation Action lasts 5 seconds. By the help of a Synchronize Action, we can make sure that the Workflow will run parallalel again after 5 seconds.
<?xml version="1.0"?> <!-- 1.0 -->
<unifeyeaction version="2.0"> <!-- 2.0 -->
<name>First Ufa Action</name> <!-- 2.1 -->
<category>Special</category> <!-- 2.1.1 -->
<uid>TheFirstUfaAction</uid> <!-- 2.1.2 -->
<description lang="en">Test</description> <!-- 2.1.3 -->
<description lang="de">TEST</description>
<fields> <!-- 2.2 -->
<activator name="startAction"> <!-- 2.2.1 -->
<description lang="en">Starts the action</description> <!-- 2.2.1.1 -->
<description lang="de">Startet die Action</description>
</activator>
<deactivator name="testActionCompleted"> <!-- 2.2.3 -->
<description lang="en">Deactivates the action</description>
<description lang="de">Deaktiviert die Action</description>
</deactivator>
<dataoutput name="sceneID"/> <!-- 2.2.4 -->
<datainput name="woot" gui="NUMBERBOX" /> <!-- 2.2.5 -->
<variable type="AgInteger" gui="NUMBERBOX" defaultvalue="1"/> <!-- 2.2.6 -->
</fields>
<code> <!-- 2.3 -->
<activation> <!-- 2.3.1 -->
<![CDATA[
//code here
!>
</activation>
<loop> <!-- 2.3.2 -->
<![CDATA[
//code here
!>
</loop>
<deactivation> <!-- 2.3.3 -->
<![CDATA[
//code here
!>
</deactivation>
<libraries>
</libraries>
</code>
</unifeyeaction>
| Tag description table | |
|---|---|
1.0 <?xml version="1.0"?> |
Base definition of every xml file. Always needed on top of each .ufa file. |
2.0 <unifeyeaction>Attributes:
|
Main tag of each Ufa-Action The attribute “version”, gives the action-loader a hint which ufa-action version should be loaded. Use “2.0” here! |
2.1 <name> |
Name tag The Ufa Action is listed with this name in the Action Tree View in the Authoring GUI |
2.1.1 <category> |
Action category All available Actions are grouped in the Action tree view of the Authoring GUI under a category like "Camera" or "Special" for example. You can specifiy the category of the Action with this tag. The category name can be choosen arbitrary. If the category does not exists already, the Authoring GUI will create it for you. |
2.1.2 <uid> |
Unique identifier of the Action The unique identifier is an arbitrary string that has to be unique amongst all available Actions. |
2.1.3 <description>Attributes:
|
Action description This is the Action description and Action explanation which is shown to the user below the Action tree view after he selected the Action. Attribute: lang – “en” Description of the action. The attribute “lang” tells the Action-loader for which language the description was written. Currently only English, “en” is supported and recognized. |
2.2 <fields> |
Defines fields Every field (activator, deactivator, datainput, dataouput and variable) has to be listed in this tag. |
2.2.1 <activator>Attributes:
|
Defines a state input |
2.2.1.1 <description>Attributes:
|
Field description This description is shown as a tooltip when you hover with your mouse over a data field GUI element of an Action . The attribute “lang” tells the Action-loader for which language the description was written. Currently only English, “en” is supported and recognized. |
2.2.3 <deactivator>Attributes:
|
Defines a state output Tag-definition of a state output that is able to deactivate the action. After the Action was deactivated, it calls the code segment defined in the <deactivation> tag. The “name” attribute defines the name of the output as it is show by the Authoring GUI as well as the variable name of the state output. Therefore each deactivator name has to follow the nameing conventions of C# variables. The variable can be used later in the code segment <deactivation>. The Authoring GUI visualizes this tag as a blue state output. |
2.2.4 <dataoutput>Attributes:
|
Defines a data output Tag-definiton of a data output that is able to pass data from this action to another. The data is flushed automatically, everytime this action changes it! The “name” attribute defines the name of the variable, as it is used in the code segments <activation>, <deactivation> and <loop>. The name has to follow the nameing conventions of C# variables. The “type” attribute defines the type of data. Here you can find all possible data types. |
2.2.5 <datainput>Attributes:
|
Defines a data input Tag-definition of a data input that is able to receive data from another action. The “name” attribute defines the name of the variable, as it is used in the code segments <activation>, <deactivation> and <loop>. The name has to follow the nameing conventions of C# variables. The “type” attribute defines the type of data. Here you can find all possible types of data. The “gui” attribute defines the GUI that is bound to the field. The “defaultvalue” attribute defines the default value that is assigned to the field and that is passed to its GUI element (is present) The “guiArguments” attribute defines additional information on GUI components. This way you can give text-field multiline capabilities and stuff like that. |
2.2.6 <variable>Attributes:
|
Defines an internal data field Tag-definition of a data field that is neither an input, nor an output, but an internal variable of this action. A GUI can be attached anyways. The “name” attribute defines the name of the variable, as it is used in the code segments <activation>, <deactivation> and <loop>. The name has to follow the nameing conventions of C# variables. The “type” attribute defines the type of data. Here you can find all possible types of data. The “gui” attribute defines the GUI that is bound to the field. Just omit it if you simply want to have an internal variable. The “defaultvalue” attribute defines the default value that is assigned to the field and that is passed to its GUI element (is present) The “guiArguments” attribute defines additional information on GUI components. This way you can give text-field multiline capabilities and stuff like that. |
2.3 <code> |
Defines the Action logic The <activation>, <deactivation> and <loop> code segments are listed in this tag. |
2.3.1 <activation> |
Defines the activation code segment The <activation> tag contains a <![CDATA[ !> tag where the code for action activation can be defined. |
2.3.2 <loop> |
Defines the loop code segment The <loop> tag contains a <![CDATA[ !> tag where the code for actions in the running state can be defined. |
2.3.3 <deactivation> |
Defines the deactivation code segment The <deactivation> tag contains a <![CDATA[ !> tag where the code for action deactivation can be defined. |
2.3.4 <libraries> |
Add third party libraries to the Action. See code |
| Attribute name | description | basic data |
|---|---|---|
| AgInteger | An integer type | Yes |
| AgBool | A bool type | Yes |
| AgFloat | A float type | Yes |
| AgString | A string type | Yes |
| AgColor | A Color argument | No |
| AgVector | A 3D Vector type | No |
| AgTransform | A 4x4 double precision matrix type | No |
<variablename>.ValueWhere <variablename> represents the "name" attribute of the <datainput>, <dataouput> or <variable> field.
| Attribute Name | Description | Available data types |
|---|---|---|
| TEXTBOX | Standard Textfield the user can enter a string. | AgString |
| NUMBERBOX | Simple numberbox where the user can enter a value. | AgFloat, AgInteger (value is casted to int) |
| CHECKBOX | Simple checkbox. | AgBool, AgFloat (1 = true, 0 = false), AgInteger (1 = ture, 0 = false) |
| COLORSELECTOR | Color chooser. | AgColor, AgFloat, AgInteger |
| XYZCONTROL | Control where the user can add three values. (x, y and z). | AgVector |
| PATHTEXTFIELD | Similar to a text field, but a path can be chosen by the user via a file dialog. | AgString |
| FILESELECTOR | Same as PATHTEXTFIELD | AgString |
| RESOURCEBOX | This GUI element allows you to reference models from the resource editor in your code. | AgString |
void cmdcreateCADGroupNoUndo(string groupName); void cmddeleteCADGroupNoUndo(string groupName); void cmdaddNodeToCADGroupNoUndo(string groupName, int sceneID, int nodeID); void cmdremoveNodeFromCADGroupNoUndo(string groupName, int sceneID, int nodeID); void cmdloadCADNodeNoUndo(int sceneID, int nodeID); void cmdunloadCADNodeNoUndo(int sceneID, int nodeID); void cmdsetCADNodeOcclusionNoUndo(int sceneID, int nodeID, int occluding); void cmdsetCADNodeRotationNoUndo(int sceneID, int nodeID, float x, float y, float z, float rad); void cmdsetCADNodeScaleNoUndo(int sceneID, int nodeID, float x, float y, float z); void cmdsetCADNodeTranslationNoUndo(int sceneID, int nodeID, float x, float y, float z); void cmdsetCADNodeVisibleNoUndo(int sceneID, int nodeID, int visible); void cmdsetCADNodeWireframeNoUndo(int sceneID, int nodeID, int isWireframe); void cmdsetClippingPlaneDirectionNoUndo(int planeID, string direction); void cmdsetClippingPlaneCosIdNoUndo(int planeID, int cosID); void cmdsetWireframeNoUndo(int sceneID, bool wireframe); void cmdsetVisibleNoUndo(int sceneID, bool visible); void cmdsetDragableNoUndo(int sceneID, bool dragable); int cmdloadGeometryNoUndo(string geoUrl); int cmdloadDragableGeometryNoUndo(string geoUrl); void cmdunloadGeometryNoUndo(int sceneID); void cmdsetShadowModeNoUndo(int sceneID, int shadowMode); void cmdsetDragTranslationNoUndo(int sceneID, float x, float y, float z); void cmdsetMoveTranslationNoUndo(int sceneID, float x, float y, float z); void cmdsetMoveScaleNoUndo(int sceneID, float x, float y, float z); void cmdsetMoveRotationNoUndo(int sceneID, float x, float y, float z, float rad); void cmdremoveClippingPlaneNoUndo(int cpID); void cmdsetCOSClippingPlaneNoUndo(int planeID, int cosID, string direction); void cmdsetGlobalClippingPlaneNoUndo(int planeID, string direction); void cmdsetClippingPlaneRotationNoUndo(int sceneID, float x, float y, float z, float rad); void cmdsetClippingPlaneDragTranslationNoUndo(int sceneID, float x, float y, float z); void cmdsetClippingPlaneTranslationNoUndo(int sceneID, float x, float y, float z); void cmdsetCameraTimestampAdjustmentNoUndo(double timestampAdjustment);Example: If you want to use the Unifeye SDK API function for activating a camera (http://doxygen.metaio.com/UnifeyeSDK/UnifeyeSDK_doxygen/group__SourceCapture.html#gae2430406215fc1272c4ee88881428fd0) the Unifeye SDK API function name is:
activateCamera(int index) which translates into cmdactivateCamera(int index) when used inside a custom action.
If( %yourStateInput_1% == input )
{
// state field 1 triggered this action
}
else if( %yourStateInput_2% == input)
{
// state field 2 triggered this action
}
If your action needs no running state and the activation part is sufficient (like in Workflow Authoring GUI 1.0), call
%yourStateOutput%.trigger();
at the end of your code segment. This will activate all Actions connected to the output %yourStateOutput% and deactivate this Ufa-Action.
if(keyPresses[i].state == ButtonState2.DOWN)or
if(keyPresses[i].state == ButtonState2.UP)if you handled a keyinput its necessary you call:
<libraries>
<library>
<name>mydll.dll</name>
<namespaces>
<namespace>myNameSpace.MyClass</namespace>
<!-- ... more namespace imports here -->
</namespaces>
</library>
<!-- ... more libraries here -->
</libraries>
includes the library "mydll.dll" and imports the class "MyClass".
In order to use the library and action do not forget to copy your DLL (and potential dependencies) to the folder of your Action which is using the DLL. If the execution of the workflow fails you might also have to put the DLLs into the installation directory of the Workflow Authoring GUI (e.g. C:\Program Files (x86)\metaio\Unifeye Design\WorkflowAuthoringGUI\).