Skip to content

Commit

Permalink
Merge branch 'master' into ParallelReplication
Browse files Browse the repository at this point in the history
  • Loading branch information
saintentropy committed Sep 16, 2022
2 parents 6a6d4d5 + 3abb9b4 commit 3e64459
Show file tree
Hide file tree
Showing 108 changed files with 7,253 additions and 6,688 deletions.
1,160 changes: 594 additions & 566 deletions doc/distrib/License.rtf

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ The Custom Dropdown node allows a user to create a dropdown selection input with
___
## Example File

![Number](./CoreNodeModels.Input.CustomSelection_img.jpg)
![Number](./CoreNodeModels.Input.CustomSelection_img.png)
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed extern/Analytics.NET/AdpSDKCSharpWrapper.dll
Binary file not shown.
Binary file removed extern/Analytics.NET/Analytics.NET.Core.dll
Binary file not shown.
Binary file removed extern/Analytics.NET/Analytics.NET.Google.dll
Binary file not shown.
Binary file removed extern/Analytics.NET/Analytics.Net.ADP.dll
Binary file not shown.
Binary file removed extern/Analytics.NET/CSharpAnalytics.Net45.dll
Binary file not shown.
6 changes: 0 additions & 6 deletions extern/Analytics.NET/README.md

This file was deleted.

File renamed without changes.
4 changes: 2 additions & 2 deletions src/AssemblySharedInfoGenerator/AssemblySharedInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
// to distinguish one build from another. AssemblyFileVersion is specified
// in AssemblyVersionInfo.cs so that it can be easily incremented by the
// automated build process.
[assembly: AssemblyVersion("2.16.0.1640")]
[assembly: AssemblyVersion("2.17.0.2366")]


// By default, the "Product version" shown in the file properties window is
Expand All @@ -64,4 +64,4 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("2.16.0.1640")]
[assembly: AssemblyFileVersion("2.17.0.2366")]
2 changes: 1 addition & 1 deletion src/AssemblySharedInfoGenerator/AssemblySharedInfo.tt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyFileVersion("<#= this.MajorVersion #>.<#= this.MinorVersion #>.<#= this.BuildNumber #>.<#= this.RevisionNumber #>")]
<#+
int MajorVersion = 2;
int MinorVersion = 16;
int MinorVersion = 17;
int BuildNumber = 0;
// The datetime baseline we choose using this algorithm will affect build number and all nuget packages uploaded
// Please only change when major or minor version got incremented
Expand Down
3 changes: 3 additions & 0 deletions src/Config/CS_SDK.props
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
<Private>false</Private>
</ProjectReference>
</ItemDefinitionGroup>
<PropertyGroup Condition=" '$(TestProjectDefaults)' == 'true' ">
<TestDependenciesPath>$(OutputPath)\..\..\..\test\test_dependencies</TestDependenciesPath>
</PropertyGroup>
<ItemDefinitionGroup Condition=" '$(TestProjectDefaults)' == 'true' ">
<ProjectReference>
<PrivateAssets>all</PrivateAssets>
Expand Down
4 changes: 2 additions & 2 deletions src/Config/upiconfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<upi_attribute name='id' value='DYN'/>
<upi_element name='level'>
<upi_attribute name='name' value='release'/>
<upi_attribute name='id' value='2.16.0'/>
<upi_attribute name='id' value='2.17.0'/>
<upi_element name='level'>
<upi_attribute name='name' value='master'/>
<upi_attribute name='id' value='Win64'/>
<upi_element name='level'>
<upi_attribute name='name' value='build'/>
<upi_attribute name='id' value='2.16.0' />
<upi_attribute name='id' value='2.17.0' />
</upi_element>
</upi_element>
</upi_element>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public partial class DocumentationBrowserView : UserControl, IDisposable
private const string VIRTUAL_FOLDER_MAPPING = "appassets";
static readonly string HTML_IMAGE_PATH_PREFIX = @"http://";

internal string WebBrowserUserDataFolder { get; set; }
internal string FallbackDirectoryName { get; set; }

/// <summary>
Expand Down Expand Up @@ -116,17 +117,22 @@ protected virtual void Dispose(bool disposing)

async void InitializeAsync()
{
if (!string.IsNullOrEmpty(WebBrowserUserDataFolder))
{
//This indicates in which location will be created the WebView2 cache folder
documentationBrowser.CreationProperties = new CoreWebView2CreationProperties()
{
UserDataFolder = WebBrowserUserDataFolder
};
}

//Initialize the CoreWebView2 component otherwise we can't navigate to a web page
await documentationBrowser.EnsureCoreWebView2Async();

// Context menu disabled
documentationBrowser.CoreWebView2.Settings.AreDefaultContextMenusEnabled = false;

//Due that the Web Browser(WebView2 - Chromium) security CORS is blocking the load of resources like images then we need to create a virtual folder in which the image are located.
this.documentationBrowser.CoreWebView2.SetVirtualHostNameToFolderMapping(VIRTUAL_FOLDER_MAPPING, FallbackDirectoryName, CoreWebView2HostResourceAccessKind.DenyCors);

//This will remove special characters in paths (like <img src="/path")
string htmlContent = HttpUtility.UrlDecode(this.viewModel.GetContent());
string htmlContent = this.viewModel.GetContent();

Dispatcher.BeginInvoke(new Action(() =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class DocumentationBrowserViewExtension : ViewExtensionBase, IViewExtensi
private const string FALLBACK_DOC_DIRECTORY_NAME = "fallback_docs";
//these fields should only be directly set by tests.
internal DirectoryInfo fallbackDocPath;
internal DirectoryInfo webBrowserUserDataFolder;

internal DocumentationBrowserView BrowserView { get; private set; }
internal DocumentationBrowserViewModel ViewModel { get; private set; }
Expand Down Expand Up @@ -71,14 +72,29 @@ public override void Startup(ViewStartupParams viewStartupParams)

if (!string.IsNullOrEmpty(pathManager.HostApplicationDirectory))
{
var docsDir = new DirectoryInfo(Path.Combine(pathManager.HostApplicationDirectory, FALLBACK_DOC_DIRECTORY_NAME));
//when running over any host app like Revit, FormIt, Civil3D... the path to the fallback_docs can change.
//e.g. for Revit the variable HostApplicationDirectory = C:\Program Files\Autodesk\Revit 2023\AddIns\DynamoForRevit\Revit
//Then we need to remove the last folder from the path so we can find the fallback_docs directory.
var hostAppDirectory = Directory.GetParent(pathManager.HostApplicationDirectory).FullName;
var docsDir = new DirectoryInfo(Path.Combine(hostAppDirectory, FALLBACK_DOC_DIRECTORY_NAME));
fallbackDocPath = docsDir.Exists ? docsDir : null;
}

if(this.BrowserView != null)
//When executing Dynamo as Sandbox or inside any host like Revit, FormIt, Civil3D the WebView2 cache folder will be located in the AppData folder
var userDataDir = new DirectoryInfo(pathManager.UserDataDirectory);
webBrowserUserDataFolder = userDataDir.Exists ? userDataDir : null;

if (this.BrowserView == null) return;

if(fallbackDocPath != null)
{
this.BrowserView.FallbackDirectoryName = fallbackDocPath.FullName;
}

if(webBrowserUserDataFolder != null)
{
this.BrowserView.WebBrowserUserDataFolder = webBrowserUserDataFolder.FullName;
}
}

public override void Loaded(ViewLoadedParams viewLoadedParams)
Expand Down
8 changes: 7 additions & 1 deletion src/DynamoCore/Configuration/PreferenceSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,11 @@ public string IronPythonResolveTargetVersion
get { return IronPythonResolveVersion.ToString(); }
set { IronPythonResolveVersion = Version.TryParse(value, out Version newVal) ? newVal : IronPythonResolveVersion; }
}

/// <summary>
/// Stores the notification ids that was read by the user
/// </summary>
public List<string> ReadNotificationIds { get; set; }
#endregion

/// <summary>
Expand Down Expand Up @@ -636,7 +641,7 @@ public PreferenceSettings()
BackupInterval = 60000; // 1 minute
BackupFilesCount = 1;
BackupFiles = new List<string>();

CustomPackageFolders = new List<string>();

PythonTemplateFilePath = "";
Expand All @@ -647,6 +652,7 @@ public PreferenceSettings()
DefaultPythonEngine = string.Empty;
ViewExtensionSettings = new List<ViewExtensionSettings>();
GroupStyleItemsList = new List<GroupStyleItem>();
ReadNotificationIds = new List<string>();
}

/// <summary>
Expand Down
14 changes: 8 additions & 6 deletions src/DynamoCore/Core/CrashPromptArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,21 @@ public CrashErrorReportArgs(Exception e) : base(e)
{}

/// <summary>
/// Allow Dynamo to send the log file to the CER system.
/// Constructs the options class to customize what CER will collect.
/// </summary>
public bool SendLogFile { get; set; } = true;
/// <param name="details">Crash details</param>
internal CrashErrorReportArgs(string details) : base(details)
{ }

/// <summary>
/// Allow Dynamo to send the settings file to the CER system.
/// Allow Dynamo to send the log file to the CER system.
/// </summary>
public bool SendSettingsFile { get; set; } = true;
internal bool SendLogFile { get; set; } = false;

/// <summary>
/// Allow Dynamo to send the model file to the CER system.
/// Allow Dynamo to send the settings file to the CER system.
/// </summary>
public bool SendDynFile { get; set; } = true;
internal bool SendSettingsFile { get; set; } = false;

/// <summary>
/// Allow Dynamo to send the recorded commands file to the CER system.
Expand Down
27 changes: 9 additions & 18 deletions src/DynamoCore/DynamoCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,11 @@
<Reference Include="System.Configuration" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="DynamoVisualProgramming.LibG_228_0_0" Version="2.16.0.2335" GeneratePathProperty="true" />
<PackageReference Include="Greg" Version="2.3.0.1646" />
<PackageReference Include="Newtonsoft.Json" Version="8.0.3" CopyXML="true" />
<PackageReference Include="RestSharp" Version="106.12.0" CopyXML="true" />
<Reference Include="Analytics.Net.ADP, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\extern\Analytics.NET\Analytics.Net.ADP.dll</HintPath>
</Reference>
<Reference Include="Analytics.NET.Core">
<HintPath>..\..\extern\Analytics.NET\Analytics.NET.Core.dll</HintPath>
</Reference>
<Reference Include="Analytics.NET.Google">
<HintPath>..\..\extern\Analytics.NET\Analytics.NET.Google.dll</HintPath>
</Reference>
<PackageReference Include="DynamoVisualProgramming.Analytics" Version="3.0.0.2506" />
<PackageReference Include="DynamoVisualProgramming.LibG_228_0_0" Version="2.16.0.2365" GeneratePathProperty="true" />
<PackageReference Include="Greg" Version="2.3.0.2505" />
<PackageReference Include="Newtonsoft.Json" Version="8.0.3" CopyXML="true" />
<PackageReference Include="RestSharp" Version="106.12.0" CopyXML="true" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -137,8 +128,8 @@
<NodeHelpFiles Include="$(SolutionDir)..\doc\distrib\NodeHelpFiles\**\*.*" />
<OpenSourceLicenses Include="$(SolutionDir)..\doc\distrib\Open Source Licenses\**\*.*" />
<LocalizedResources Include="$(SolutionDir)..\extern\Localized\**\*.*" />
<ExternAnalytics Include="$(SolutionDir)..\extern\Analytics.NET\*.*" />
<LegacyBinariesToBinFolder Include="$(SolutionDir)..\extern\legacy_remove_me\bin\*\*" />
<LegacyBinariesToBinFolder Include="$(SolutionDir)..\extern\legacy_remove_me\bin\*" />
<LegacyBinariesToLibg227Folder Include="$(SolutionDir)..\extern\legacy_remove_me\bin\libg_227_0_0\*" />
<LegacyBinariesToEn-USFolder Include="$(SolutionDir)..\extern\legacy_remove_me\en-US\*" />
<LegacyBinariesToNodesFolder Include="$(SolutionDir)..\extern\legacy_remove_me\nodes\*" />
</ItemGroup>
Expand All @@ -157,15 +148,15 @@
<Exec Command="$(PowerShellCommand) -ExecutionPolicy ByPass -Command Copy-Item -Path $(LibGProtoGeometryLibGLocale) -Destination $(OutputPath) -Recurse -Force" />
<Copy SourceFiles="@(LibG228)" DestinationFolder="$(OutputPath)libg_228_0_0\" />
<Copy SourceFiles="@(ExternSimplexNoise)" DestinationFolder="$(OutputPath)" />
<Copy SourceFiles="@(ExternAnalytics)" DestinationFolder="$(OutputPath)" />
<Copy SourceFiles="@(SampleFiles)" DestinationFolder="$(OutputPath)samples\%(RecursiveDir)" />
<Copy SourceFiles="@(GalleryFiles)" DestinationFolder="$(OutputPath)gallery\%(RecursiveDir)" />
<Copy SourceFiles="@(LocalizedResources)" DestinationFolder="$(OutputPath)%(RecursiveDir)" />
<Copy SourceFiles="$(ProjectDir)\BuiltInAndOperators\Operators.xml" DestinationFolder="$(OutputPath)\$(UICulture)" />
<Copy SourceFiles="$(ProjectDir)\BuiltInAndOperators\BuiltIn.xml" DestinationFolder="$(OutputPath)\$(UICulture)" />
<Copy SourceFiles="$(ProjectDir)\BuiltInAndOperators\BuiltIn.Migrations.xml" DestinationFolder="$(OutputPath)" />
<!--Remove these copy steps at the next launch of host products-->
<Copy SourceFiles="@(LegacyBinariesToBinFolder)" DestinationFolder="$(OutputPath)\%(RecursiveDir)\" />
<Copy SourceFiles="@(LegacyBinariesToBinFolder)" DestinationFolder="$(OutputPath)" />
<Copy SourceFiles="@(LegacyBinariesToLibg227Folder)" DestinationFolder="$(OutputPath)\libg_227_0_0\" />
<Copy SourceFiles="@(LegacyBinariesToEn-USFolder)" DestinationFolder="$(OutputPath)\en-US\" />
<Copy SourceFiles="@(LegacyBinariesToNodesFolder)" DestinationFolder="$(OutputPath)\nodes\" />
<Copy SourceFiles="$(SolutionDir)Config\upiconfig.xml" DestinationFolder="$(OutputPath)" />
Expand Down
2 changes: 1 addition & 1 deletion src/DynamoCore/Logging/AnalyticsService.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Dynamo.Graph.Workspaces;
using Dynamo.Models;
using Analytics.NET.ADP;
using Autodesk.Analytics.ADP;
using Autodesk.Analytics.Core;
using System;

Expand Down
4 changes: 2 additions & 2 deletions src/DynamoCore/Logging/DynamoAnalyticsClient.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Diagnostics;
using Analytics.NET.Google;
using Analytics.NET.ADP;
using Autodesk.Analytics.Google;
using Autodesk.Analytics.ADP;
using Autodesk.Analytics.Core;
using Autodesk.Analytics.Events;
using Dynamo.Interfaces;
Expand Down
31 changes: 17 additions & 14 deletions src/DynamoCore/Models/DynamoModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -962,23 +962,26 @@ protected DynamoModel(IStartConfiguration config)

private void CheckFeatureFlagTest()
{
if (DynamoModel.FeatureFlags.CheckFeatureFlag<bool>("EasterEggIcon1", false))
if (!DynamoModel.IsTestMode)
{
this.Logger.Log("EasterEggIcon1 is true FROM MODEL");
if (DynamoModel.FeatureFlags.CheckFeatureFlag<bool>("EasterEggIcon1", false))
{
this.Logger.Log("EasterEggIcon1 is true FROM MODEL");

}
else
{
this.Logger.Log("EasterEggIcon1 is false FROM MODEL");
}
}
else
{
this.Logger.Log("EasterEggIcon1 is false FROM MODEL");
}

if (DynamoModel.FeatureFlags.CheckFeatureFlag<string>("EasterEggMessage1", "NA") is var s && s != "NA")
{
this.Logger.Log("EasterEggMessage1 is enabled FROM MODEL");
}
else
{
this.Logger.Log("EasterEggMessage1 is disabled FROM MODEL");
if (DynamoModel.FeatureFlags.CheckFeatureFlag<string>("EasterEggMessage1", "NA") is var s && s != "NA")
{
this.Logger.Log("EasterEggMessage1 is enabled FROM MODEL");
}
else
{
this.Logger.Log("EasterEggMessage1 is disabled FROM MODEL");
}
}
}

Expand Down
1 change: 1 addition & 0 deletions src/DynamoCore/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@
[assembly: InternalsVisibleTo("IronPythonTests")]
[assembly: InternalsVisibleTo("DynamoPackagesWPF")]
[assembly: InternalsVisibleTo("GraphNodeManagerViewExtension")]
[assembly: InternalsVisibleTo("ExportSampleImagesViewExtension")]

[assembly: TypeForwardedTo(typeof(Dynamo.Scheduler.Disposable))]
Loading

0 comments on commit 3e64459

Please sign in to comment.