-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds an alpha mapping functionality in DUI and Rhino (#1840)
* wip: rhino mappings in dui * feat(dui): load mapping panel in rhino * feat(mapping): pulls available types from schema builder * wip: almost working * feat(mapping): UI work * feat(core): fallback to default Objects folder if no converter is found * feat(mappings): addes reference to Objects and sets it not to be copied * feat(mappings): adds direct shapes and freeformelements * feat(mapping): better stream selection * feat(mappings): existing mappings & display conduit * feat(mapping): selection and other minor touches * feat(mappings): clear schema * fix(rhino): do not build DUI launcher proj on release * fix(rhino): attempts fixing resx issue on mac * Revert "fix(rhino): attempts fixing resx issue on mac" This reverts commit 4a656c9. * fix(mapping): rhino mac now build but not loads * fix(rhino): prevents rhino nugets going in the bin folder * feat(mapping): show mapping tool in rhino mac
- Loading branch information
Showing
45 changed files
with
2,344 additions
and
79 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
ConnectorGrasshopper/ConnectorGrasshopper6/ConnectorGrasshopper6.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
ConnectorRhino/ConnectorRhino/ConnectorRhinoShared/Entry/SpeckleMappingsCommandMac.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
using System.Threading; | ||
using Avalonia; | ||
using Avalonia.Controls; | ||
using Avalonia.ReactiveUI; | ||
using DesktopUI2.ViewModels; | ||
using DesktopUI2.ViewModels.MappingTool; | ||
using DesktopUI2.Views; | ||
using Rhino; | ||
using Rhino.Commands; | ||
using Speckle.Core.Models.Extensions; | ||
|
||
namespace SpeckleRhino | ||
{ | ||
#if MAC | ||
public class SpeckleMappingsCommandMac : Command | ||
{ | ||
|
||
public static SpeckleMappingsCommandMac Instance { get; private set; } | ||
|
||
public override string EnglishName => "SpeckleMappings"; | ||
public static Window MainWindow { get; private set; } | ||
|
||
public SpeckleMappingsCommandMac() | ||
{ | ||
Instance = this; | ||
} | ||
|
||
protected override Result RunCommand(RhinoDoc doc, RunMode mode) | ||
{ | ||
|
||
try | ||
{ | ||
if (MainWindow == null) | ||
{ | ||
var viewModel = new MappingsViewModel(SpeckleRhinoConnectorPlugin.Instance.MappingBindings); | ||
MainWindow = new MappingsWindow | ||
{ | ||
DataContext = viewModel | ||
}; | ||
} | ||
|
||
MainWindow.Show(); | ||
MainWindow.Activate(); | ||
return Result.Success; | ||
} | ||
catch (Exception e) | ||
{ | ||
RhinoApp.CommandLineOut.WriteLine($"Speckle Error - {e.ToFormattedString()}"); | ||
return Result.Failure; | ||
} | ||
} | ||
|
||
|
||
|
||
} | ||
#endif | ||
} |
Oops, something went wrong.