UI Builder for Autodesk® MotionBuilder®
The Tool is intended for visual development of the user interface for Open Reality SDK and Python API of MotionBuilder.
UIBuilder is an open source project and it’s avaliable on github.
- creation and convenient handling with regions on tool’s layout
- setting of properties and interconnections of regions
- assignment visual components for regions
- change properties of visual components
- writing the code of events handling for interface’s elements
- a view of the interface with the help of interpreter Python
- an export of the interface both for OpenReality SDK and Python
At present the utility enables to create prepared utilities in Python and to generate quite convenient code for OpenReality SDK. Restrictions concern the absence of possibility to work in the only layout for components.
UIBuilder allows to shorten the time for eigher interface development or the whole utility development.
Package for Autodesk MotionBuilder 2013 64bit – Setup-UIBuilder_07b
MotionBuilder 2012 64bit version –ui_builder64_2012
The plug-in for Autodesk MotionBuilder 2011.
32bit version – uibuilder32_2011
64bit version – motionbuilder 2011 64-bit
The plug-in for Autodesk MotionBuilder 2010.
32bit version – uibuilder2010_32
The plug-in for Autodesk MotionBuilder 2009.
32bit version – setup_UIBuilder
64 bit version – setup_UIBuilder64
Install plugin for MotionBuilder 2009. uibuilder.dll needs to be moved to C:\Program Files\Autodesk\MotionBuilder 2009\bin\win32\plugins\ directory (by default).
When starting MotionBuilder a new utility UIBuilder appears in the main menu amont the other utilities (Open Reality -> Tools)
- Advance renaming tool – http://neill3d.com/utilita-prodvinutogo-pereimenovaniya
- Pose snapshots – http://neill3d.com/mobu-script-pose-shots
- Labeling skeleton – http://neill3d.com/markers-renamer-script-by-the-uibuilder
Description of the editor
- Navigator view. It shows the whole list of the elements in a ui scene. With the help of this you can select elements.
- editor main menu and tool bar
- Main tabs of properties: utility’s parameters tab, tab of the separate region parameters, tab of the separate visual component, tab of the events code
- Property table. It allows to change values by using appropriate table cells.
- tool canvas. There is marking out of regions. Later the visual components are assigned to these regions. An interface is ready.
- status bar. Promt for current hint.
Editor Main menu
- New – to create a new ui scene in editor
- Load – to load saved layout
- Save – to save current layout
- Export CPP – to export layout to C++ source code for Open Reality SDK
- Export Python – to export layout to Python source code
- Undo – cancellation of the last action
- Redo – temporarily is out of order
- Select All – select all the regions
- Select Invert – to invert the current selection
- Select None – clear selection
- Snap – enable / disable of region snapping
- Snap Step – set up snapping step
- Delete – to delete currently selected region
- About – information about the author and contact
Canvas context menu
context menu, right-click in the select mode
In selection mode you can select, move and change the size of regions. Selection is carried out by clicking the left mouse button to region rect
- Shift + LMB – to add region under cursor to selected ones
- Alt + LMB – to remove region from selection under cursor
You can handle (move, size) region using markers when selecting. Left and upper markers are responsible for moving a region. Lower and right ones are responsible for change of the size.
To move several selected regions you should hold the Shift key.
You can add new region to canvas in this mode. To do it you should press the left mouse button in the place, whre you want to set region left upper corner. Then moving the mouse set another opposite corner for the region. To finish the creation click the left button of the mouse one more time.
To cancel, click the right button of the mouse.
To exit from region mode you can use either main tool bar button or press the right button of the mouse on the canvas.
This mode is intended for viewing visual components, assignment to the regions. You can’t peform any manipulations straight on the canvas, but you can do all the other activity here: selection through navigator view, change of properties through the paramaters in the property tables of region and visual component.
To exit from preview mode you can use either the context menu or press the right button of the mouse on the canvas.
Making prepared utilities in the Editor.
This section is devoted to writing events for visual components. There are 2 elements in the 4th tab.
The first list is the list of avaliable events for the selected element of the visual component. The second one is for source code of current event. The code must be written in Python. You can view, what you have by using command button Run on main toolbar or you can export ui scene into the code in Python.
If you writing the code a mistake is found by interpeter, it can be seen in a window of the Python Editor in MotionBuilder.
When writing a script code for an event, you should keep in mind that the function for events has the following header:
def Event (control, event):
This means, that variables control and event can be used in code of the event.
If there aren’t any selection, the events of the utility ifself and it’s layout will be avaliable on the events tab.
OnDeclare – initialization code should be entered here. It will be used after import of MoBu functions and before performing all other operations.
This code can have to do with user’s variables or functions declaration.
OnShow – this code is used when the components are added, their properties are passed. A code, which concerns additional action of the properties, for making different calculations, for filling the elements with values can be entered here.
1. Simple renaming tool
You can see the video on the work with the plug-in on YouTube
The result of demonstration – simple renaming script in two minutes. You can download it here test
In this example we’ll create small but useful utility which can be used for renaming one or several selected objects by changing a part of a name.
Author: Sergey Solohin (Neill)
Site – http://neill3d.com
e-mail to: email@example.com
+ version for Autodesk MotionBuilder 2013 64bit
– fix running an empty tool in MoBu 2012
– fix run command. In MoBu 2012 CreateUniqueTool renamed to FBCreateUniqueTool