Autodesk Mudbox 2013 SDK Documentation > What's New / What's Changed? >

# Mudbox 2013

The following changes are listed according to their presence in their respective header files.

brush.h

- BrushOperation::BrushBehavior - Tool behavior structure for storing alternate brushing modes.
  - BrushOperation::AlternateBehaviorCount() - Returns the number of possible alternate behaviors for the brush.
  - BrushOperation::AlternateBehavior() - Returns the given alternate behavior instance.
- BrushOperation::MaskOffset() - Returns the offset of the mask.
- BrushOperation::MouseMove() - Additional parameters have been added to the MouseMove callback to obtain the size, pressure and strength.
- BrushOperation::IsSnapToCurve() - Returns true if the mouse snaps to the active curve.
- BrushOperation::SnapDistance() - Returns the distance tolerance when snapping the mouse to curves.

brushmask.h

- BrushStencil::SetOffset() - Sets the offset.
- BrushStencil::Offset() - Returns the offset.

curve.h

This header file defines the new curve functionality of the Mudbox SDK.

importexport.h

PaintLayerImporter::Prepare() - This function can be empty, you'll have a chance to do some work before the actual import operation happens.

interface.h

The following methods let you change the hotkey set used in Mudbox.

- Interface::SelectHotkeySet() - Changes the hotkeys to more closely match those in other Autodesk applications.
- Interface::CurrentHotkeySet() - Returns a code indicating the current Hotkey presets in use by Mudbox.

When creating a file dialog, you can now specify which file type filter is initially shown, and find out which filter type was selected by the user.

- Interface::LoadFileDialog() - 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 the file dialog, an empty QString is returned.
- Interface::SaveFileDialog() - 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 the file dialog, an empty QString is returned.

kernel.h

Added a new function to turn any string into a legal file name:

- Utility::SanitizeFileName() - Takes a potential file name as input and returns a sanitized version that should be a legal file name on Windows, Mac OSX, and Linux. Illegal characters are escaped with the % character, followed by their numeric unicode character code. The % character is escaped with %%. For example, SanitizeFileName("material::blue") would return "material%58%58blue".

material.h

- Material::ImportPaintLayer() - Import a new paint layer from a file to the material.
- Texture::CopyFrom() - Create the texture content from an image.

mesh.h

- Mesh::BoundingBox() - You can now force the recalculation of a bounding box. This function returns the bounding box of the mesh in local space.
- Mesh::TangentMirroredVertexIndex() - Returns the index of the tangent mirrored vertex.
- Mesh::RecalculateTopologicalSymmetry() - Recalculates the topological symmetry information from the lower subdivision levels if there are any.
- MeshChange::Data() - Returns the float data value stored in the vertex change.

node.h

- Node::SetDisplayName() - Sets the display name of the class (in class ClassDesc).
- NodeEventType.etEditingFinished - New nodeEvent type. Indicates that the editing is finished on the attribute by the user.
- Attribute::SetInstantEdit() - If the parameter is set to True, editing the attribute on the UI will be instant, i.e. the attribute will change value every time the user makes changes in the widget. Default is false.
- Attribute::InstantEdit() - Returns true if the attribute edit should be instant, i.e. the attribute should change every time the user makes any changes to the widget. Default is false.

nurbs.h

New methods have been added for the new curves functionality: NURBSCurve::Interpolate(), NURBSCurve::Render(), NURBSCurve::Recalculate().

operations.h

Added SDK access to the Transfer Details function within the Mudbox UI via class TransferDetailOperation.

renderer.h

- VertexDataProvider::SetVertexData() - Sets the data for a given vertex, component, and dimension. For example, to set the 2nd element of the 1st component, for the 0th vertex:

      VertexDataProvider::ComponentDescription d = Component(1);
      if( d.m_eType == eFloat && d.m_iDimension >= 3 )
      {
          float fNewValue = 1.0f;
          SetVertexData( 0, 1, 2, (const void*)&fNewValue );
      }

scene.h

Added support for the new curve functionality.

- SelectedObjectListNames() - Returns a list of strings of all selected items in the Object List.
- Scene::ActiveCurve() - Returns a pointer to the curve that is currently active.
- SetActiveCurve() - Sets a different curve to be active.
- Scene::CurveCount() - Returns the number of Curve objects in the scene. Returns the number of all objects derived from CurveBase.
- Scene::SelectedCurveCount() - Returns the number of selected Curves.
- Scene::AddCurve() - Adds a curve object to the scene. Returns a pointer to the object added. Once a curve object is added to the scene, the scene is responsible for deleting it.
- Scene::RemoveCurve() - Removes a curve object from the scene. Note that the removed curve is not deleted. Once the curve is removed, it becomes the caller's responsibility to delete it.
- Scene::SelectedCurve() - Returns a pointer to a selected curve object in the scene. If the index is out of range, NULL is returned. To find out how many curve objects are selected, call Scene::SelectedCurveCount().
- Scene::Curve() - Returns a pointer to a Curve object in the scene. If the index is out of range, NULL is returned. To find out how many Curve objects are in the scene, call CurveCount().
- ActiveCameraChangeEvent - This event is triggered after a camera is set as the active camera in Scene::SetActiveCamera(). Plugins can connect to this event to get informed when the active camera is changed to a different one.

subdivision.h

- SubdivisionLevel::ConvertSurfacePoint() - Returns true if it succeeds in converting a surface point from another subdivision level to this level. If true is returned, the surface point p is at the same level as this subdivision level.
- SubdivisionLevel::ConvertFaceIndices() - Converts a set of faces from one subdivision level to another subdivision level. This is useful when you have a set of faces on level n and need to find the corresponding faces on level m for any values n and m.

treenode.h

- TreeNode::MoveChild() - Moves the child after the given node in order.

viewport.h

- ViewPort::ShowCurves() - Returns true if curves are being rendered in this viewport. False otherwise.
- New events:
  - ViewPort::MouseMoveEvent - Triggered when a mouse move event occurs inside the viewport.
  - ViewPort::LeftMouseButtonPressEvent - Triggered when the left mouse button down occurs.
  - ViewPort::LeftMouseButtonReleaseEvent - Triggered when the left mouse button is released.
  - ViewPort::ContextMenuEvent - Triggered on context menu (right mouse button)
  - ViewPort::SceneRenderEvent - Triggered after the scene is rendered. Should be used if a plugin has any widgets to render into the scene.
  - ViewPort::ViewportResizeEvent - Triggered when the viewport's size is changed.

widgets.h

- OnEdit() - New slot for AttributeFileNamebox.
- OnEditFinished() - New slot for AttributeEditBox.