Consolidation operations into button groups
This commit is contained in:
parent
426a923fc5
commit
0c8f8a782c
1 changed files with 80 additions and 66 deletions
|
|
@ -867,78 +867,92 @@ namespace MatterHackers.MatterControl
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new SceneSelectionSeparator(),
|
new SceneSelectionSeparator(),
|
||||||
new SceneSelectionOperation()
|
new OperationGroup("Array")
|
||||||
{
|
{
|
||||||
OperationType = typeof(ArrayLinearObject3D),
|
StickySelection = true,
|
||||||
TitleResolver = () => "Linear Array".Localize(),
|
Operations = new List<SceneSelectionOperation>()
|
||||||
Action = (sceneContext) =>
|
|
||||||
{
|
{
|
||||||
var array = new ArrayLinearObject3D();
|
new SceneSelectionOperation()
|
||||||
array.AddSelectionAsChildren(sceneContext.Scene, sceneContext.Scene.SelectedItem);
|
{
|
||||||
},
|
OperationType = typeof(ArrayLinearObject3D),
|
||||||
Icon = (invertIcon) => AggContext.StaticData.LoadIcon("array_linear.png").SetPreMultiply(),
|
TitleResolver = () => "Linear Array".Localize(),
|
||||||
IsEnabled = (scene) => scene.SelectedItem != null && !(scene.SelectedItem is SelectionGroupObject3D),
|
Action = (sceneContext) =>
|
||||||
},
|
{
|
||||||
new SceneSelectionOperation()
|
var array = new ArrayLinearObject3D();
|
||||||
{
|
array.AddSelectionAsChildren(sceneContext.Scene, sceneContext.Scene.SelectedItem);
|
||||||
OperationType = typeof(ArrayRadialObject3D),
|
},
|
||||||
TitleResolver = () => "Radial Array".Localize(),
|
Icon = (invertIcon) => AggContext.StaticData.LoadIcon("array_linear.png").SetPreMultiply(),
|
||||||
Action = (sceneContext) =>
|
IsEnabled = (scene) => scene.SelectedItem != null && !(scene.SelectedItem is SelectionGroupObject3D),
|
||||||
{
|
},
|
||||||
var array = new ArrayRadialObject3D();
|
new SceneSelectionOperation()
|
||||||
array.AddSelectionAsChildren(sceneContext.Scene, sceneContext.Scene.SelectedItem);
|
{
|
||||||
},
|
OperationType = typeof(ArrayRadialObject3D),
|
||||||
Icon = (invertIcon) => AggContext.StaticData.LoadIcon("array_radial.png").SetPreMultiply(),
|
TitleResolver = () => "Radial Array".Localize(),
|
||||||
IsEnabled = (scene) => scene.SelectedItem != null && !(scene.SelectedItem is SelectionGroupObject3D),
|
Action = (sceneContext) =>
|
||||||
},
|
{
|
||||||
new SceneSelectionOperation()
|
var array = new ArrayRadialObject3D();
|
||||||
{
|
array.AddSelectionAsChildren(sceneContext.Scene, sceneContext.Scene.SelectedItem);
|
||||||
OperationType = typeof(ArrayAdvancedObject3D),
|
},
|
||||||
TitleResolver = () => "Advanced Array".Localize(),
|
Icon = (invertIcon) => AggContext.StaticData.LoadIcon("array_radial.png").SetPreMultiply(),
|
||||||
Action = (sceneContext) =>
|
IsEnabled = (scene) => scene.SelectedItem != null && !(scene.SelectedItem is SelectionGroupObject3D),
|
||||||
{
|
},
|
||||||
var array = new ArrayAdvancedObject3D();
|
new SceneSelectionOperation()
|
||||||
array.AddSelectionAsChildren(sceneContext.Scene, sceneContext.Scene.SelectedItem);
|
{
|
||||||
},
|
OperationType = typeof(ArrayAdvancedObject3D),
|
||||||
Icon = (invertIcon) => AggContext.StaticData.LoadIcon("array_advanced.png").SetPreMultiply(),
|
TitleResolver = () => "Advanced Array".Localize(),
|
||||||
IsEnabled = (scene) => scene.SelectedItem != null && !(scene.SelectedItem is SelectionGroupObject3D),
|
Action = (sceneContext) =>
|
||||||
|
{
|
||||||
|
var array = new ArrayAdvancedObject3D();
|
||||||
|
array.AddSelectionAsChildren(sceneContext.Scene, sceneContext.Scene.SelectedItem);
|
||||||
|
},
|
||||||
|
Icon = (invertIcon) => AggContext.StaticData.LoadIcon("array_advanced.png").SetPreMultiply(),
|
||||||
|
IsEnabled = (scene) => scene.SelectedItem != null && !(scene.SelectedItem is SelectionGroupObject3D),
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
new SceneSelectionSeparator(),
|
new SceneSelectionSeparator(),
|
||||||
new SceneSelectionOperation()
|
new OperationGroup("ModifyMesh")
|
||||||
{
|
{
|
||||||
OperationType = typeof(PinchObject3D_2),
|
StickySelection = true,
|
||||||
TitleResolver = () => "Pinch".Localize(),
|
Operations = new List<SceneSelectionOperation>()
|
||||||
Action = (sceneContext) =>
|
|
||||||
{
|
{
|
||||||
var pinch = new PinchObject3D_2();
|
new SceneSelectionOperation()
|
||||||
pinch.WrapSelectedItemAndSelect(sceneContext.Scene);
|
{
|
||||||
},
|
OperationType = typeof(CurveObject3D_2),
|
||||||
Icon = (invertIcon) => AggContext.StaticData.LoadIcon("pinch.png", 16, 16, invertIcon),
|
TitleResolver = () => "Curve".Localize(),
|
||||||
IsEnabled = (scene) => scene.SelectedItem != null,
|
Action = (sceneContext) =>
|
||||||
},
|
{
|
||||||
new SceneSelectionOperation()
|
var curve = new CurveObject3D_2();
|
||||||
{
|
curve.WrapSelectedItemAndSelect(sceneContext.Scene);
|
||||||
OperationType = typeof(CurveObject3D_2),
|
},
|
||||||
TitleResolver = () => "Curve".Localize(),
|
Icon = (invertIcon) => AggContext.StaticData.LoadIcon("curve.png", 16, 16, invertIcon),
|
||||||
Action = (sceneContext) =>
|
IsEnabled = (scene) => scene.SelectedItem != null,
|
||||||
{
|
},
|
||||||
var curve = new CurveObject3D_2();
|
new SceneSelectionOperation()
|
||||||
curve.WrapSelectedItemAndSelect(sceneContext.Scene);
|
{
|
||||||
},
|
OperationType = typeof(PinchObject3D_2),
|
||||||
Icon = (invertIcon) => AggContext.StaticData.LoadIcon("curve.png", 16, 16, invertIcon),
|
TitleResolver = () => "Pinch".Localize(),
|
||||||
IsEnabled = (scene) => scene.SelectedItem != null,
|
Action = (sceneContext) =>
|
||||||
},
|
{
|
||||||
new SceneSelectionOperation()
|
var pinch = new PinchObject3D_2();
|
||||||
{
|
pinch.WrapSelectedItemAndSelect(sceneContext.Scene);
|
||||||
OperationType = typeof(TwistObject3D),
|
},
|
||||||
TitleResolver = () => "Twist".Localize(),
|
Icon = (invertIcon) => AggContext.StaticData.LoadIcon("pinch.png", 16, 16, invertIcon),
|
||||||
Action = (sceneContext) =>
|
IsEnabled = (scene) => scene.SelectedItem != null,
|
||||||
{
|
},
|
||||||
var curve = new TwistObject3D();
|
new SceneSelectionOperation()
|
||||||
curve.WrapSelectedItemAndSelect(sceneContext.Scene);
|
{
|
||||||
},
|
OperationType = typeof(TwistObject3D),
|
||||||
Icon = (invertIcon) => AggContext.StaticData.LoadIcon("twist.png", 16, 16, invertIcon),
|
TitleResolver = () => "Twist".Localize(),
|
||||||
IsEnabled = (scene) => scene.SelectedItem != null,
|
Action = (sceneContext) =>
|
||||||
|
{
|
||||||
|
var curve = new TwistObject3D();
|
||||||
|
curve.WrapSelectedItemAndSelect(sceneContext.Scene);
|
||||||
|
},
|
||||||
|
Icon = (invertIcon) => AggContext.StaticData.LoadIcon("twist.png", 16, 16, invertIcon),
|
||||||
|
IsEnabled = (scene) => scene.SelectedItem != null,
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
new SceneSelectionOperation()
|
new SceneSelectionOperation()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue