#include <interface.h>
The Interface class provides access to user interface related functions and events.
To get a pointer to the current Mudbox interface, call Kernel()->Interface().
Definition at line 43 of file interface.h.
Classes | |
class | MenuManipulator |
Public Member Functions | |
Interface (void) | |
QMenu * | DropDownMenu (MenuType eType) const |
QWidget * | MainWindow (void) const |
Returns a pointer to the main window. More... | |
void | ShowNewPaintLayerDialog (void) |
void | ShowBrushRing (bool bShow) |
This function turns on/off displaying the brush indicator ring. More... | |
bool | RestorePreviousBrush (void) |
Restores the current brush to the previous one. More... | |
void | SetSelectedBrush (const QString &sBrushName) |
Set the currently selected brush. More... | |
void | ActivateLayerSystem (LayerUIType eType) |
Activates the given system in the Layer UI window. More... | |
void | Load (QString filename, Scene::LoadData &cData) |
Loads scene data. More... | |
void | ShowProperties (Node *pNode, bool bFloating) const |
Open a new properties dialog for the given node. More... | |
void | ClearProperties () |
Clears the property dialog. More... | |
int | MessageBox (MessageBoxType iType, const QString &sTitle, const QString &sText, int iButtons=buttonNone, int iDefaultButton=buttonNone) |
Displays a modal message box to the user. More... | |
int | OneTimeMessageBox (MessageBoxType iType, const QString &sTitle, const QString &sText, int buttons=0) |
Displays a informational modal message box to the user with a checkbox option to not show the dialog again. More... | |
void | HUDMessageShow (const QString &sMessage, HUDMessageType iType=HUDmsgFade) |
Displays a message as text overlay (HUD) in the 3d view. More... | |
void | HUDMessageHide () |
Hides a text overlay (HUD) message created with a call to HUDMessageShow(). More... | |
void | SetStatus (StatusType iType, const QString &sMsg) |
Display a message in the status bar, which is on the bottom edge of the Mudbox window. More... | |
void | AddClassMenuItem (const QString &sMenu, const QString &sSubmenu, const ClassDesc *pClass, const QString &sCreatorText, const int &index=-1, const int &subindex=-1, const bool addSeparator=false, int version=0) |
Adds a new submenu to the interface that can be used to create and edit instances of a class you define in your plug-in. More... | |
void | AddCallbackMenuItem (const QString &sMenu, const QString &sSubmenu, const QString &sItemName, void(*pCallback)(), const QString &sID="", const int &index=-1, const int &subindex=-1, const bool addSeparator=false, int version=0) |
Adds a new menu item that calls a callback function you specify in your plug-in. More... | |
void | AddWelcomeWindowButton (const QString &sItemName, void(*pCallback)(), const QString &icon="", const QString &styleSheet="") |
Adds a new button to the "More" section of the welcome window. More... | |
void | RemoveWelcomeWindowButton (const QString &sItemName) |
Removes a button that was added via AddWelcomeWindowButton. More... | |
void | SelectHotkeySet (HotkeySetName newKeySet, bool forceSetHotkey=false) |
Changes the hotkeys to more closely match those in other Autodesk applications. More... | |
HotkeySetName | CurrentHotkeySet () const |
Returns a code indicating the current Hotkey presets in use by Mudbox. More... | |
void | AddToCreateMeshMenu (QFileInfo fileInfo) |
Adds a mesh to the Create->Mesh menu. More... | |
void | AddObjectListContextMenuItem (const ClassDesc *pObjectType, const QString &sItemName, void(*pCallback)(), int index=-1, bool addSeparator=false, int version=0) |
Adds a menu item to the context menu that comes up when you right-click an object in the Object List. More... | |
void | AddLayerCallbackMenuItem (mudbox::Interface::LayerUIType ltType, const QString &sItemName, void(*pCallback)(), int version=0) |
Adds a menu item to the context menu that comes up when you right-click on a sculpt or paint layer. More... | |
QAction * | CreateHighlightableMenuItem (const QString &text, QObject *parent, int version=0) |
Returns a special QAction (see Qt documentation) that can be highlighted when the user turns on "What's New Highlighting". More... | |
void | ProgressStart (const QString &sDescription, unsigned int iMaxValue, float fWeight=1.0f, int iDelayTime=0) |
Displays a progress bar, to show a process beginning. This will set the current progess value to 0. More... | |
void | ProgressStartGroup (const QString &sDescription, float fTotalWeight, int iDelayTime=0) |
Displays a progress bar, which embeds other processes which has their own progress bar. More... | |
bool | ProgressSet (unsigned int iValue) |
Updates the current progress bar. Return true if cancel was requested, false otherwise. More... | |
bool | ProgressAdd (void) |
Updates the current progress bar by adding one to the progress value used. Return true if cancel was requested, false otherwise. More... | |
void | ProgressEnd (void) |
Removes the current progress bar, whether or not the process is complete. More... | |
bool | ProgressIsCancelRequested (void) |
Returns true if the user cancelled an operation in progress. More... | |
void | ProgressRequestCancel (void) |
When this function is called, Mudbox is trying to cancel the current operation. More... | |
QString | LoadFileDialog (const QString &sTitle, const QString &sPath, const QString &sFilter, QString *sSelectedFilter=0) const |
Opens a modal file dialog so the user can choose an existing file to open. More... | |
QString | SaveFileDialog (const QString &sTitle, const QString &sPath, const QString &sFilter, bool bAskForOverwrite=true, QString *sSelectedFilter=0) const |
Opens a modal file dialog so the user can choose a file name to save to. More... | |
QString | GetDirectoryDialog (const QString &sTitle, const QString &sPath) const |
Opens a modal file dialog so the user can choose an existing folder. More... | |
QStringList | LoadFilesDialog (const QString &sTitle, const QString &sPath, const QString &sFilter) const |
Opens a modal file dialog so the user can choose existing files to open. More... | |
void | WaitCursorStart (void) |
Show the wait cursor. More... | |
void | WaitCursorEnd (void) |
Restore the previous cursor after calling WaitCursorStart(). More... | |
void | RefreshUI (void) const |
Refresh all dialogs. More... | |
void | AddView (QString className, QString windowTitle, const bool select=false) const |
Adds a view in the central widget. More... | |
float | currentTabletPressure () const |
Returns the current tablet pressure. Range is 0.0 to 1.0. More... | |
float | LastPatchXPosition (void) |
Returns the X coordinate of the screen pixel where the last patch was taken. More... | |
float | LastPatchYPosition (void) |
Returns the Y coordinate of the screen pixel where the last patch was taken. More... | |
bool | IsInStroke () const |
Returns true if we are in the middle of a stroke. More... | |
bool | IsInTumble () const |
Returns true if we are in the middle of tumbling the scene. More... | |
void | SetInTumble (bool b) |
Allows plugin to override and force the in tumble state to be true. More... | |
bool | IsInDoubleClick () const |
Returns true if we are in double-click event. More... | |
bool | IsInCameraNavigation () const |
Returns true if we are in the middle of a camera navigation Currently this is used to indicate viewcube and/or multitouch navigation It should be generalized to include mudbox alt+mouse navigation IsInTumble does not serve this purpose for the following reasons: More... | |
void | SetInCameraNavigation (bool bInCameraNavigation=false) |
Set camera navigation state. More... | |
Public Member Functions inherited from Node | |
Node (const QString &sStringID="", const QString &sDisplayName="") | |
Standard constructor. More... | |
virtual | ~Node (void) |
virtual void | Initialize (void) |
void | LoadTemplate (const QString &sFileName="", bool bStartEvent=false) |
Use an external XML file to initialize the attributes. More... | |
void | SaveTemplate (const QString &sFileName="", bool bSaveOnlyVisible=false) |
Save current attributes as an XML template. More... | |
unsigned int | Version (void) const |
Returns the current version of the node. This number increases when the content of the node changed (when ContentChanged() called). More... | |
void | SetVersion (unsigned int iVersion) |
Sets the current version number for the node. More... | |
unsigned int | ReferenceCount (void) const |
Returns the number of pointers referencing this node. More... | |
Attribute * | ReferencePointer (unsigned int iIndex) const |
Returns the address of an attribute which refers to this node. The type of the attribute is always aptr. More... | |
Node * | ReferenceNode (unsigned int iIndex) const |
Returns the address of a node referencing this node. More... | |
virtual QString | Name (const ClassDesc *pClass=0) const |
Deprecated. More... | |
virtual void | SetName (const QString &sName) |
Deprecated. More... | |
virtual QString | StringID (const ClassDesc *pClass=0) const |
Returns the string id of the node. More... | |
virtual void | SetStringID (const QString &sStringID) |
Sets the string id of the node. More... | |
virtual QString | DisplayName (void) const |
Returns the display name of the node. More... | |
virtual void | SetDisplayName (const QString &sDisplayName) |
Sets the display name of the node. More... | |
virtual QString | HelpID (void) const |
Returns the help entry id of the node. Can be overwritten in derived classes. More... | |
virtual void | SetHelpID (const QString &sHelpID) |
Sets the help entry id of the node. More... | |
void | Annex (Node *pSource, const QString &sCategory="") |
Relink all the attributes of the source node to this one. More... | |
virtual void | Serialize (Stream &s) |
Serializes the node. More... | |
bool | IsKindOf (const ClassDesc *pClass) const |
Returns true if this node is derived from the pClass class. More... | |
void | ContentChanged (void) const |
This function must be called if the content of the node is changed. More... | |
virtual void | CheckValidity (DiagnosticLevel iLevel=dgnLevel2) const |
Checks the validity of this node. More... | |
virtual void | CopyTo (Node *pNode) const |
virtual Node * | Duplicate (void) const |
virtual void | OnNodeEvent (const Attribute &cAttribute, NodeEventType cType) |
This function is called if an event occurs with any of the attributes of the node. More... | |
virtual void | OnEvent (const EventGate &cEvent) |
This function is called when a generic event occurs. See EventGate class. More... | |
void | RequestDeferredEvent (Attribute &cAttribute) |
Request for a deferred event, which will occur only in the main loop. More... | |
unsigned int | AttributeCount (void) const |
Returns the number of attributes owned by the node. More... | |
Attribute * | AttributeByIndex (int iIndex) const |
Returns a specified attribute (or 0 if iIndex is greater than the number of attributes). More... | |
Attribute * | AttributeByName (const QString &sName) const |
Returns a specified attribute by its name. Returns 0 if the attribute not found. More... | |
Attribute * | AttributeByID (const QString &sID) const |
Returns a specified attribute by its ID. Returns 0 if the attribute not found. More... | |
void | SetAttributeValue (const QString &sAttributeID, const QString &sNewValue) |
Set the value of an attribute from a string. More... | |
QString | AttributeValue (const QString &sAttributeID) const |
Returns the current value of an attribute as a string. More... | |
void | LogAttributes (void) const |
Write all attributes into the log file. More... | |
virtual QWidget * | CreatePropertiesWindow (QWidget *pParent) |
Create a window which displays the attributes of the node. Can be overriden to provide a custom interface. More... | |
Attribute * | AddAttribute (Attribute::AttributeType type, const QString &id) |
Allows SDK users to add attributes at runtime. More... | |
Node * | Next (void) const |
Returns the next node in the chain. Used to enumerate the current nodes. See also First(). More... | |
int | ID (void) const |
Returns an ID for the node. The ID is unique in the whole application life. More... | |
bool | SetID (int iID) |
Set ID for the node. More... | |
Public Attributes | |
aptr< BrushOperation > | SelectedBrush |
This pointer contains the address of the currently selected brush. More... | |
aptr< KeyboardEventNotifier > | KeyboardEvent |
This is a pointer to the latest keyboard event. More... | |
aevent | PostUIInitializationEvent |
This event is triggered after the Mudbox main UI window is created. More... | |
aptr< MenuManipulator > | CurrentMenu |
This attribute contains the address of the current menu creator object. More... | |
Public Attributes inherited from Node | |
AttributeThisPointer | m_pThis |
DECLARE_CLASS | |
Static Public Attributes | |
static QString | menuFile |
static QString | menuEdit |
static QString | menuCreate |
static QString | menuCurves |
static QString | menuDisplay |
static QString | menuHelp |
static QString | menuPlugins |
static QString | menuMesh |
static QString | menuRender |
static QString | menuScripts |
static QString | menuMaps |
static QString | menuWindows |
Additional Inherited Members | |
Static Public Member Functions inherited from Node | |
static void | StartHashing () |
This is called once in main once static ctors are done. More... | |
static Node * | First (void) |
This function will return the first node in the memory. Used to enumerate all the current nodes. See also Next(). More... | |
static Node * | ByID (int iID) |
Returns the node with the specified ID, or zero if such a node does not exists. More... | |
static Node * | ByName (const QString &sClass, const QString &sName) |
Search for a node with the name sName. More... | |
enum LayerUIType |
Enumerator | |
---|---|
ltSculptUI |
Sculpt Layer UI. |
ltPaintUI |
Paint Layer UI. |
Definition at line 48 of file interface.h.
enum MessageBoxType |
Enumerator | |
---|---|
msgInformation | |
msgWarning | |
msgQuestion | |
msgError |
Definition at line 53 of file interface.h.
enum MessageBoxButton |
Enumerator | |
---|---|
buttonNone | |
buttonOk | |
buttonCancel | |
buttonClose | |
buttonYes | |
buttonYesToAll | |
buttonNo | |
buttonNoToAll | |
buttonAbort | |
buttonRetry | |
buttonIgnore | |
buttonHelp |
Definition at line 60 of file interface.h.
enum HUDMessageType |
Enumerator | |
---|---|
HUDmsgPin |
keep the HUD message up until specifically cancelled |
HUDmsgFade |
make the message fade away after a few seconds |
Definition at line 75 of file interface.h.
enum StatusType |
Enumerator | |
---|---|
stNormal |
message |
stWarning |
warning |
stError |
error |
Definition at line 81 of file interface.h.
enum HotkeySetName |
Enumerator | |
---|---|
HotkeySetMudbox | |
HotkeySetMaya | |
HotkeySet3dsMax | |
HotkeySetSoftimage |
Definition at line 88 of file interface.h.
enum MenuType |
Definition at line 96 of file interface.h.
void ShowBrushRing | ( | bool | bShow | ) |
This function turns on/off displaying the brush indicator ring.
bool RestorePreviousBrush | ( | void | ) |
Restores the current brush to the previous one.
void ActivateLayerSystem | ( | LayerUIType | eType | ) |
Activates the given system in the Layer UI window.
[in] | eType | The layer system to activate. |
void Load | ( | QString | filename, |
Scene::LoadData & | cData | ||
) |
Loads scene data.
This method loads a file from disk the same way the File Menu > Open command does. Note that this method differs from Scene::Load in that it automatically adds filename to the list of recent files, and updates other UI elements, whereas Scene::Load does not.
[in] | filename | path to the file on disk, by default this can be a .obj, .mud or .fbx file. |
[in] | cData | The load options. Note if m_bMerge is true, the contents of the file are merged into the current scene. Otherwise they are added to a new scene. |
Open a new properties dialog for the given node.
[in] | pNode | Address of the node whose parameters should be shown. |
[in] | bFloating | Declares if the properties shoulod be in a floating panel or in the docked Properties pane |
void ClearProperties | ( | ) |
Clears the property dialog.
int MessageBox | ( | MessageBoxType | iType, |
const QString & | sTitle, | ||
const QString & | sText, | ||
int | iButtons = buttonNone , |
||
int | iDefaultButton = buttonNone |
||
) |
Displays a modal message box to the user.
[in] | iType | One of mudbox::Interface::msgInformation, mudbox::Interface::msgWarning, mudbox::Interface::msgQuestion or mudbox::Interface::msgError |
[in] | sTitle | The title of the message box |
[in] | sText | The text of the message |
[in] | iButtons | The buttons to include. Specify this as a bitwise OR of the available MessageBoxButton flags. |
[in] | iDefaultButton | Specifies which of the buttons should be the default when the window opens |
int OneTimeMessageBox | ( | MessageBoxType | iType, |
const QString & | sTitle, | ||
const QString & | sText, | ||
int | buttons = 0 |
||
) |
Displays a informational modal message box to the user with a checkbox option to not show the dialog again.
Returns the ID of the button pressed by the user. Returns QMessageBox::Ok if the user had previously chosen not to show the dialog again
[in] | iType | One of mudbox::Interface::msgInformation, mudbox::Interface::msgWarning, mudbox::Interface::msgQuestion or mudbox::Interface::msgError |
[in] | sTitle | The title of the message box |
[in] | sText | The text of the message |
[in] | buttons | Buttons to appear in the dialog |
void HUDMessageShow | ( | const QString & | sMessage, |
HUDMessageType | iType = HUDmsgFade |
||
) |
Displays a message as text overlay (HUD) in the 3d view.
You can specify if the message is temporary (fading after a few seconds) or if it should stay "pinned" on the screen until overwritten or dismissed with HUDMessageHide(). New messages will replace previous ones.
[in] | sMessage | The text of the message (may include some HTML tags, such as for bold or italics) |
[in] | iType | One of mudbox::Interface::HUDmsgPin or mudbox::Interface::HUDmsgFade |
void HUDMessageHide | ( | ) |
Hides a text overlay (HUD) message created with a call to HUDMessageShow().
Note: if a message was displayed with the mudbox::Interface::HUDmsgFade parameter, then it will go away after a few seconds with no intervention.
void SetStatus | ( | StatusType | iType, |
const QString & | sMsg | ||
) |
Display a message in the status bar, which is on the bottom edge of the Mudbox window.
[in] | iType | Determines the color of the message. One of mudbox::Interface::stNormal, mudbox::Interface::stWarning, or mudbox::Interface::stError |
[in] | sMsg | The text of the message |
void AddClassMenuItem | ( | const QString & | sMenu, |
const QString & | sSubmenu, | ||
const ClassDesc * | pClass, | ||
const QString & | sCreatorText, | ||
const int & | index = -1 , |
||
const int & | subindex = -1 , |
||
const bool | addSeparator = false , |
||
int | version = 0 |
||
) |
Adds a new submenu to the interface that can be used to create and edit instances of a class you define in your plug-in.
For example, if you call:
A new submenu (named "MyItem") will be added to the end of the "Maps" menu. This new submenu will initially contain one item, called "Make New Instance". If you select this item, a new instance of myClass will be created, and an editor opened for it so you can change its values. The name of the new instance will also be added to the "MyItem" submenu, so that you can go back and edit it later.
Note that "StaticClass()" is automatically defined for any class that uses the IMPLEMENT_CLASS macro.
[in] | sMenu | The name of the menu to which your sub-menu will be added. |
[in] | sSubmenu | The name of the sub-menu to be created |
[in] | pClass | The class to be created by the new menu item |
[in] | sCreatorText | The name of the menu item that will create your new class |
[in] | index | The index where you want to insert the new menu item. -1 means append to the end of menu |
[in] | subindex | The index where you want to insert the submenu if it does not exist already, -1 means append to the end of menu |
[in] | addSeparator | Set this to true if you want separators around this item |
[in] | version | The version of Mudbox where this functionality was added. Use constants found in mudboxVersions.h |
void AddCallbackMenuItem | ( | const QString & | sMenu, |
const QString & | sSubmenu, | ||
const QString & | sItemName, | ||
void(*)() | pCallback, | ||
const QString & | sID = "" , |
||
const int & | index = -1 , |
||
const int & | subindex = -1 , |
||
const bool | addSeparator = false , |
||
int | version = 0 |
||
) |
Adds a new menu item that calls a callback function you specify in your plug-in.
The signature of your callback function must be:
[in] | sMenu | The name of the menu to which the item should be added |
[in] | sSubmenu | The name of a submenu to which the item should be added (if you don't want a submenu, pass in an empty QString) |
[in] | sItemName | The display name of the new menu item that will call your callback |
[in] | pCallback | A pointer to the callback function |
[in] | sID | The internal ID of the new menu item |
[in] | index | The index where you want to insert the new menu item. -1 means append to the end of menu |
[in] | subindex | The index where you want to insert the submenu if it does not exist already, -1 means append to the end of menu |
[in] | addSeparator | Set this to true if you want separators around this item. |
[in] | version | The version of Mudbox where this functionality was added. Use constants found in mudboxVersions.h |
void AddWelcomeWindowButton | ( | const QString & | sItemName, |
void(*)() | pCallback, | ||
const QString & | icon = "" , |
||
const QString & | styleSheet = "" |
||
) |
Adds a new button to the "More" section of the welcome window.
The signature of your callback function must be:
[in] | sItemName | The display name of the new button that will be added (should be unique) |
[in] | pCallback | A pointer to the callback function to be called when the user presses the button |
[in] | icon | A file path to an optional icon, which will be displayed in the button |
[in] | styleSheet | An optional Qt stylesheet, that can be used to change the appearance of the button |
Removes a button that was added via AddWelcomeWindowButton.
[in] | sItemName | The display name of the button to be removed |
void SelectHotkeySet | ( | HotkeySetName | newKeySet, |
bool | forceSetHotkey = false |
||
) |
Changes the hotkeys to more closely match those in other Autodesk applications.
[in] | newKeySet | The desired keyset: HotkeySetMudbox, HotkeySetMaya, HotkeySet3dsMax or HotkeySetSoftimage |
[in] | forceSetHotkey | If true, force an update even if there is no change to the current preset |
HotkeySetName CurrentHotkeySet | ( | ) | const |
Returns a code indicating the current Hotkey presets in use by Mudbox.
void AddObjectListContextMenuItem | ( | const ClassDesc * | pObjectType, |
const QString & | sItemName, | ||
void(*)() | pCallback, | ||
int | index = -1 , |
||
bool | addSeparator = false , |
||
int | version = 0 |
||
) |
Adds a menu item to the context menu that comes up when you right-click an object in the Object List.
[in] | pObjectType | The new menu item will only appear when you click on objects of this type |
[in] | sItemName | The name of the new menu item |
[in] | pCallback | A pointer to the callback function |
[in] | index | The index where you want to insert the new menu item. -1 means append to the end of menu |
[in] | addSeparator | Set this to true if you want separators around this item. |
[in] | version | The version of Mudbox where this functionality was added. Use constants found in mudboxVersions.h |
void AddLayerCallbackMenuItem | ( | mudbox::Interface::LayerUIType | ltType, |
const QString & | sItemName, | ||
void(*)() | pCallback, | ||
int | version = 0 |
||
) |
Adds a menu item to the context menu that comes up when you right-click on a sculpt or paint layer.
[in] | ltType | One of ltSculptUI or ltPaintUI, depending on what kind of layer you want to display this menu item |
[in] | sItemName | The name of the new menu item |
[in] | pCallback | A pointer to the callback function |
[in] | version | The version of Mudbox where this functionality was added. Use constants found in mudboxVersions.h |
Returns a special QAction (see Qt documentation) that can be highlighted when the user turns on "What's New Highlighting".
[in] | text | The name of the menu item |
[in] | parent | A pointer to the parent widget (usually the menu into which the item will be added) |
[in] | version | The version of Mudbox where this functionality was added. Use constants found in mudboxVersions.h |
void ProgressStart | ( | const QString & | sDescription, |
unsigned int | iMaxValue, | ||
float | fWeight = 1.0f , |
||
int | iDelayTime = 0 |
||
) |
Displays a progress bar, to show a process beginning. This will set the current progess value to 0.
[in] | sDescription | A name or description for the process whose progress is being shown |
[in] | iMaxValue | A positive value representing the completion of the process |
iDelayTime | < [in] A number indicating how long does it take to complete this process, compared to others This is only used for approximating the length of groups. See ProgressStartGroup [in] Delay time in millisecond used to hide the progress bar, when time out, the progress bar will be displayed |
Displays a progress bar, which embeds other processes which has their own progress bar.
The progress bar of the embedded processes will not be visible, only a common progress bar for all of them.
[in] | sDescription | A name or description for the process whose progress is being shown |
iDelayTime | < [in] Sum of the weights of all the embedded processes. |
bool ProgressSet | ( | unsigned int | iValue | ) |
Updates the current progress bar. Return true if cancel was requested, false otherwise.
[in] | iValue | The new progress value (the maximum allowed value was specified in ProgressStart() ) |
bool ProgressAdd | ( | void | ) |
Updates the current progress bar by adding one to the progress value used. Return true if cancel was requested, false otherwise.
bool ProgressIsCancelRequested | ( | void | ) |
Returns true if the user cancelled an operation in progress.
When a progress bar is displayed, the user can cancel out of the operation in progress by clicking the cancel button, or by hitting the ESC key. If your plug-in is running a long process with a progress bar showing, it should call this method regularly to see if the user has cancelled the operation.
When this function is called, Mudbox is trying to cancel the current operation.
QString LoadFileDialog | ( | const QString & | sTitle, |
const QString & | sPath, | ||
const QString & | sFilter, | ||
QString * | sSelectedFilter = 0 |
||
) | const |
Opens a modal file dialog so the user can choose an existing file to open.
Returns the path to the file.
If the user cancels out of the file dialog, an empty QString is returned.
[in] | sTitle | The title to display in the file dialog |
[in] | sPath | The initial path to display when the file dialog opens |
[in] | sFilter | A QString that specifies which kind of files should be displayed. For example: "TIFF images (*.tif);;PNG images (*.png)" |
[in,out] | sSelectedFilter | The default filter to be used, and the selected filter by the user, if the pointer is not null |
QString SaveFileDialog | ( | const QString & | sTitle, |
const QString & | sPath, | ||
const QString & | sFilter, | ||
bool | bAskForOverwrite = true , |
||
QString * | sSelectedFilter = 0 |
||
) | const |
Opens a modal file dialog so the user can choose a file name to save to.
Returns the path to the file.
If the user cancels out of the file dialog, an empty QString is returned.
[in] | sTitle | The title to display in the file dialog |
[in] | sPath | The initial path to display when the file dialog opens |
[in] | sFilter | A string that filters which kind of files should be displayed. For example: "TIFF images (*.tif);;PNG images (*.png)" |
[in] | bAskForOverwrite | If true, when the user chooses an existing file, he will be asked if he wants to overwrite it. |
[in,out] | sSelectedFilter | The default filter to be used, and the selected filter by the user, if the pointer is not null |
Opens a modal file dialog so the user can choose an existing folder.
Returns the path to the folder.
If the user cancels out of the file dialog, an empty QString is returned.
[in] | sTitle | The title to display in the file dialog |
[in] | sPath | The initial path to display when the file dialog opens |
QStringList LoadFilesDialog | ( | const QString & | sTitle, |
const QString & | sPath, | ||
const QString & | sFilter | ||
) | const |
Opens a modal file dialog so the user can choose existing files to open.
Returns the paths to these files.
If the user cancels out of the file dialog, an empty QString is returned.
[in] | sTitle | The title to display in the file dialog |
[in] | sPath | The initial path to display when the file dialog opens |
[in] | sFilter | A QString that specifies which kind of files should be displayed. For example: "TIFF images (*.tif);;PNG images (*.png)" |
Restore the previous cursor after calling WaitCursorStart().
Adds a view in the central widget.
float currentTabletPressure | ( | ) | const |
Returns the current tablet pressure. Range is 0.0 to 1.0.
float LastPatchXPosition | ( | void | ) |
Returns the X coordinate of the screen pixel where the last patch was taken.
float LastPatchYPosition | ( | void | ) |
Returns the Y coordinate of the screen pixel where the last patch was taken.
bool IsInStroke | ( | ) | const |
Returns true if we are in the middle of a stroke.
bool IsInTumble | ( | ) | const |
Returns true if we are in the middle of tumbling the scene.
void SetInTumble | ( | bool | b | ) |
Allows plugin to override and force the in tumble state to be true.
Certain optimizations can be performed in a tumble – like postponing rendering pick buffers, and computing texture tile histograms, for example.
bool IsInDoubleClick | ( | ) | const |
Returns true if we are in double-click event.
bool IsInCameraNavigation | ( | ) | const |
Returns true if we are in the middle of a camera navigation Currently this is used to indicate viewcube and/or multitouch navigation It should be generalized to include mudbox alt+mouse navigation IsInTumble does not serve this purpose for the following reasons:
void SetInCameraNavigation | ( | bool | bInCameraNavigation = false | ) |
Set camera navigation state.
|
static |
Definition at line 191 of file interface.h.
|
static |
Definition at line 192 of file interface.h.
|
static |
Definition at line 193 of file interface.h.
|
static |
Definition at line 194 of file interface.h.
|
static |
Definition at line 195 of file interface.h.
|
static |
Definition at line 196 of file interface.h.
|
static |
Definition at line 197 of file interface.h.
|
static |
Definition at line 198 of file interface.h.
|
static |
Definition at line 199 of file interface.h.
|
static |
Definition at line 200 of file interface.h.
|
static |
Definition at line 201 of file interface.h.
|
static |
Definition at line 202 of file interface.h.
aptr<BrushOperation> SelectedBrush |
This pointer contains the address of the currently selected brush.
Plugins can connect their own pointer of the same type to this attribute if they want to respond to brush activation events.
Definition at line 221 of file interface.h.
|
mutable |
This is a pointer to the latest keyboard event.
Plugins can use this pointer to catch and respond to keyboard events. When a new event occurs, the value of this pointer changes to a structure which describes the event. The class should have it's own instance of a pointer with the same type, which should be connected to this pointer using the Attribute::AddTarget() function. The class can then catch and respond any changes made to this variable in its the OnNodeEvent() function.
Definition at line 487 of file interface.h.
aevent PostUIInitializationEvent |
This event is triggered after the Mudbox main UI window is created.
Plugins can connect to this event to add additional UI or make modifications to the existing UI widgets in the window, after the window has been created.
Definition at line 492 of file interface.h.
aptr<MenuManipulator> CurrentMenu |
This attribute contains the address of the current menu creator object.
Each time when mudbox is about to display a new menu, a new menucreator object is created, and its address is stored in this attribute. Plugins can watch this pointer by connecting their own attribute with the same type to it. It is possible to check the type of the menu and other circumstances, and based on those, modify the menu (remove items, add new items, make something disabled, etc..) Do not store the value in this attribute, since the menucreator object is only temporary. See the example plugin MenuMessenger for more details.
Definition at line 507 of file interface.h.