GameObject build_modeltools_flyout() { GameObject popupGO = GameObject.Instantiate(Resources.Load <GameObject>("BasicToolMenu")); popupGO.SetName("PrintUtilTools"); CCUIBuilder.AddBasicStartToolButton(popupGO, "Plane Cut", PlaneCutTool.Identifier); CCUIBuilder.AddBasicStartToolButton(popupGO, "Add Hole", AddHoleTool.Identifier, single_selection_or_one_obj); Canvas.AddChild(popupGO, false); UnityUIUtil.PositionRelative2D(popupGO, BoxPosition.TopLeft, Panel, BoxPosition.TopRight, Vector2f.Zero); return(popupGO); }
GameObject build_tritools_flyout() { GameObject popupGO = GameObject.Instantiate(Resources.Load <GameObject>("BasicToolMenu")); popupGO.SetName("PositionTools"); CCUIBuilder.AddBasicStartToolButton(popupGO, "Remesh", RemeshTool.Identifier); CCUIBuilder.AddBasicStartToolButton(popupGO, "Simplify", ReduceTool.Identifier); CCUIBuilder.AddBasicStartToolButton(popupGO, "Map to Target", ReprojectTool.Identifier, pair_selection); Canvas.AddChild(popupGO, false); UnityUIUtil.PositionRelative2D(popupGO, BoxPosition.TopLeft, Panel, BoxPosition.TopRight, Vector2f.Zero); return(popupGO); }
GameObject build_print_util_popup() { GameObject popupGO = GameObject.Instantiate(Resources.Load <GameObject>("BasicToolMenu")); popupGO.SetName("PrintUtilTools"); CCUIBuilder.AddBasicStartToolButton(popupGO, "Brim", BrimTool.Identifier); CCUIBuilder.AddBasicStartToolButton(popupGO, "Purge Spiral", PurgeSpiralTool.Identifier); CCUIBuilder.AddBasicStartToolButton(popupGO, "Block Support", GenerateBlockSupportsTool.Identifier); CCUIBuilder.AddBasicStartToolButton(popupGO, "Tree Support", GenerateGraphSupportsTool.Identifier); Canvas.AddChild(popupGO, false); UnityUIUtil.PositionRelative2D(popupGO, BoxPosition.TopLeft, Panel, BoxPosition.TopRight, Vector2f.Zero); return(popupGO); }
GameObject build_objects_popup() { GameObject popupGO = GameObject.Instantiate(Resources.Load <GameObject>("BasicToolMenu")); popupGO.SetName("ObjectsTools"); CCUIBuilder.AddBasicStartToolButton(popupGO, "Add Shape", GenerateShapeTool.Identifier); CCUIBuilder.AddBasicToolButton(popupGO, "Resize", set_size_clicked); CCUIBuilder.AddBasicToolButton(popupGO, "Duplicate", on_duplicate_clicked, any_so_selected); CCUIBuilder.AddBasicToolButton(popupGO, "Delete", on_delete_clicked, any_so_selected); CCUIBuilder.AddBasicStartToolButton(popupGO, "Separate", SeparateSolidsTool.Identifier); CCUIBuilder.AddBasicStartToolButton(popupGO, "Combine", CombineMeshesTool.Identifier, multi_selection_or_multi_obj); Canvas.AddChild(popupGO, false); UnityUIUtil.PositionRelative2D(popupGO, BoxPosition.TopLeft, Panel, BoxPosition.TopRight, Vector2f.Zero); return(popupGO); }
GameObject build_heal_flyout() { GameObject popupGO = GameObject.Instantiate(Resources.Load <GameObject>("BasicToolMenu")); popupGO.SetName("HealTools"); CCUIBuilder.AddBasicStartToolButton(popupGO, "AutoRepair", MeshAutoRepairTool.Identifier); CCUIBuilder.AddBasicStartToolButton(popupGO, "Solidify", GenerateClosedMeshTool.Identifier); CCUIBuilder.AddBasicStartToolButton(popupGO, "Weld Edges", WeldEdgesTool.Identifier); CCUIBuilder.AddBasicStartToolButton(popupGO, "Fix Normals", RepairOrientationTool.Identifier); CCUIBuilder.AddBasicStartToolButton(popupGO, "Fill Holes", FillHolesTool.Identifier, single_selection_or_one_obj); CCUIBuilder.AddBasicStartToolButton(popupGO, "Remove Hidden", RemoveHiddenFacesTool.Identifier); CCUIBuilder.AddBasicStartToolButton(popupGO, "Edit Mesh", MeshEditorTool.Identifier, single_selection_or_one_obj); Canvas.AddChild(popupGO, false); UnityUIUtil.PositionRelative2D(popupGO, BoxPosition.TopLeft, Panel, BoxPosition.TopRight, Vector2f.Zero); return(popupGO); }
GameObject build_voxtools_flyout() { GameObject popupGO = GameObject.Instantiate(Resources.Load <GameObject>("BasicToolMenu")); popupGO.SetName("VoxelTools"); CCUIBuilder.AddBasicStartToolButton(popupGO, "Solidify", GenerateClosedMeshTool.Identifier); CCUIBuilder.AddBasicStartToolButton(popupGO, "Shell", MeshShellTool.Identifier); CCUIBuilder.AddBasicStartToolButton(popupGO, "VoxWrap", MeshWrapTool.Identifier); CCUIBuilder.AddBasicStartToolButton(popupGO, "VoxBoolean", MeshVoxelBooleanTool.Identifier, multi_selection); CCUIBuilder.AddBasicStartToolButton(popupGO, "VoxBlend", MeshVoxelBlendTool.Identifier, multi_selection); CCUIBuilder.AddBasicStartToolButton(popupGO, "Morphology", MeshMorphologyTool.Identifier); Canvas.AddChild(popupGO, false); UnityUIUtil.PositionRelative2D(popupGO, BoxPosition.TopLeft, Panel, BoxPosition.TopRight, Vector2f.Zero); return(popupGO); }