Allow plugins to register scene operations

This commit is contained in:
John Lewin 2019-05-11 14:46:03 -07:00
parent 20dc2f6bd3
commit b0a3d9e40f

View file

@ -2207,6 +2207,20 @@ namespace MatterHackers.MatterControl
items.Add(printItemAction);
}
/// <summary>
/// Register the given SceneSelectionOperation
/// </summary>
/// <param name="operation">The action to register</param>
public void RegisterSceneOperation(SceneSelectionOperation operation)
{
if (operation.OperationType != null)
{
this.Thumbnails.OperationIcons.Add(operation.OperationType, operation.Icon);
}
registeredSceneOperations.Add(operation);
}
/// <summary>
/// Enumerate the given section, returning all registered actions
/// </summary>